diff --git a/content/pages/dioikitiko-symvoulio.md b/content/pages/dioikitiko-symvoulio.md
index a275e03..2bbd4f5 100644
--- a/content/pages/dioikitiko-symvoulio.md
+++ b/content/pages/dioikitiko-symvoulio.md
@@ -1,5 +1,5 @@
---
-title: "Διοικητικό Συμβούλιο"
+title: "Διοικητικό Συμβούλιο - Board of Directors"
layout: "pages"
bannertemplate: "hellug-banner.html"
date: 2013-04-24
@@ -14,12 +14,26 @@ menu:
Το ΔΣ παίρνει αποφάσεις σχετικές με το Σύλλογο.
-Τα μέλη ΔΣ περιόδου 2024-25 είναι οι:
-* Πρόεδρος - Ιάκωβος Στέλλας
-* Αντιπρόεδρος - Richard Kweskin
-* Γραμματέας - Γιάννης Τσιάγκας
-* Ταμίας - Φάνης Δοκιανάκης
-* Έφορος - Παναγιώτης Πάνος
+**Τα μέλη ΔΣ περιόδου 2025-26 είναι οι:**
+
++ Πρόεδρος - Ιάκωβος Στέλλας
++ Αντιπρόεδρος - Γιάννης Τσιάγκας
++ Γραμματέας - Παναγιώτης Πάνος
++ Ταμίας - Φάνης Δοκιανάκης
++ Έφορος - Richard Kweskin
+
+---
+
+The Board of Directors makes decisions regarding the Association.
+
+**The members of the Board of Directors for the period 2025-26 are:**
+
++ President - Iakovos Stellas
++ Vice President - Yiannis Tsiagkas
++ Secretary - Panagiotis Panos
++ Treasurer - Fanis Dokianakis
++ Supervisor - Richard Kweskin
---
-Μπορείτε να επικοινωνίσετε με το ΔΣ, αποστέλοντας email στο board@hellug.gr
+Μπορείτε να επικοινωνίσετε με το ΔΣ, αποστέλοντας email στο board@hellug.gr
+You can contact the Board by sending an email to board@hellug.gr
diff --git a/content/pages/syndromes.md b/content/pages/syndromes.md
index 3551ef8..3d23899 100644
--- a/content/pages/syndromes.md
+++ b/content/pages/syndromes.md
@@ -12,7 +12,7 @@ menu:
weight: 2
---
-1) Ως μέλος, μπορείτε **να ελέγξετε** τις οικονομικές εκκρεμότητες σας από την **[Βάση Μελών]({{< ref "/pages/member" >}})**
+1) Ως μέλος, μπορείτε **να ελέγξετε** τις οικονομικές εκκρεμότητες σας από την **[Βάση Μελών]({{< ref "/pages/member" >}})** ή τη [σελίδα διαχείρισης μέλους](/api/ui/member/).
2) Ως μέλος μπορείτε **να εξοφλήσετε** την συνδρομή σας, επικοινωνώντας στο finance@hellug.gr, για τους τρόπους πληρωμής.
diff --git a/content/posts/meetup-250309-hellug-GS2025.html b/content/posts/meetup-250309-hellug-GS2025.html
new file mode 100644
index 0000000..8d72b36
--- /dev/null
+++ b/content/posts/meetup-250309-hellug-GS2025.html
@@ -0,0 +1,24 @@
+---
+title: "Προκήρυξη Γενικής Συνέλευσης HEL.L.U.G.- Κυριακή 09 Μαρτίου 2025"
+layout: "meetups"
+bannertemplate: "hellug-banner.html"
+date: 2025-02-18
+category_title: Δράσεις
+tags: [Meetups]
+draseis: [meetups]
+meetupdate: 2025-03-09T18:30:00+03:00
+meetuplocation: "Εξ Αποστάσεως Γεν.Συνέλευση & Ψηφοφορία 2025"
+summary: "Η Ένωση Χρηστών και Φίλων Λίνουξ Ελλάδας-Hellenic Linux User Group (HEL.L.U.G.) προκηρύσει την Ετήσια Εκλογοαπολογιστική Γενική Συνέλευση 2025 !"
+---
+
+Η Ένωση Χρηστών και Φίλων Λίνουξ Ελλάδας-Hellenic Linux User Group (HEL.L.U.G.) προκηρύσει την Ετήσια Εκλογοαπολογιστική Γενική Συνέλευση την ....ΚΥΡΙΑΚΗ 09 ΜΑΡΤΙΟΥ 2025 και ώρα 18:30–21:30 !
+
+
+
+Καλούνται τα Μέλη του Συλλόγου, να παραστούν προσωπικά, στη διεξαγωγή της 27ης Τακτικής Γενικής Εκλογο-Απολογιστικής Συνέλευσης και Ψηφοφορίας για τα Όργανα του Σωματείου, που θα διεξαχθούν αποκλειστικά ΕΞ ΑΠΟΣΤΑΣΕΩΣ μέσω των Συστημάτων Jitsi/Meet Hellug και ZEUS/GRNEΤ.
+
+
+Τα Μέλη μπορούν να ενημερωθούν αναλυτικά από την ΠΡΟΚΗΡΥΞΗ της Γ.Σ. 2025.
+
Για την συμμετοχή τους στη Ψηφοφορία θα λάβουν προσωπικό μήνυμα και σύνδεσμο, από το Σύστημα ZEUS/GRNEΤ.
+
+
diff --git a/content/posts/meetup-250517-hellug-fsf40-celebration.html b/content/posts/meetup-250517-hellug-fsf40-celebration.html
new file mode 100644
index 0000000..7bd3984
--- /dev/null
+++ b/content/posts/meetup-250517-hellug-fsf40-celebration.html
@@ -0,0 +1,26 @@
+---
+title: "O HEL.L.U.G.συμμετέχει στον Εορτασμό των 40 Ετών του Ιδρύματος F.S.F."
+layout: "meetups"
+bannertemplate: "hellug-banner.html"
+date: 2025-05-06
+category_title: Δράσεις
+tags: [Meetups]
+draseis: [meetups]
+meetupdate: 2025-05-17T11:00:00+02:00
+meetuplocation: "Ελληνικό Μουσείο Πληροφορικής - Μοσχάτο - Αθήνα"
+summary: "Η Ένωση Χρηστών και Φίλων Λίνουξ Ελλάδας-Hellenic Linux User Group (HEL.L.U.G.) συνδιοργανώνει μαζί με άλλους Φορείς, Εκδήλωση για τον Εορτασμό των 40 Ετών λειτουργίας του Ιδρύματος για το Ελεύθερο Λογισμικό - Free Software Foundation (FSF)"
+---
+
+
+ Ο Σύλλογος, με την ευκαιρία της συμπλήρωσης 40 χρόνων από την ίδρυση του Ιδρύματος για το Ελεύθερο Λογισμικό - Free Software Foundation (FSF), συνδιοργανώνει μαζί με τον Οργανισμό Ανοικτών Τεχνολογιών (ΕΕΛΛΑΚ) και τον Ελληνικό Ελεύθερο Πλανήτη (LibrePlanetGR),
+
+ Εορταστική Εκδήλωση,
+
το Σάββατο 17 Μαΐου 2025, από τις 11:00 και μετά..
+
στις εγκαταστάσεις του Ελληνικού Μουσείου Πληροφορικής
(Π. Σπυρόπουλου 2 & Θεσσαλονίκης, Μοσχάτο, Τ.Κ. 183 46)
+
+
Προβολή μεγαλύτερου χάρτη
+
+ Μπορείτε να δείτε την Αφίσα και το Πρόγραμμα της Εκδήλωσης.
+
ΣΑΣ ΠΕΡΙΜΕΝΟΥΜΕ ΟΛΟΥΣ/-ΕΣ !!!
+
+
diff --git a/static/admin/config.yml b/static/admin/config.yml
index 86458b8..95a923d 100644
--- a/static/admin/config.yml
+++ b/static/admin/config.yml
@@ -22,10 +22,10 @@ collections:
- {label: "Title", name: "title", widget: "string"}
- {label: "Layout", name: "layout", widget: "hidden", default: "news"}
- {label: "Banner template", name: "bannertemplate", widget: "hidden", default: "hellug-banner.html"}
- - {label: "Ημερομηνία Δημοσίευσης", name: "date", widget: "datetime", picker_utc: "false"}
+ - {label: "Ημερομηνία Δημοσίευσης", name: "date", widget: "datetime", picker_utc: false}
- {label: "Τίτλος κατηγορίας", name: "category_title", widget: "string", default: "Δράσεις"}
- {label: "Ετικέτες", name: "tags", widget: "list", min: 1, default: ["Νέα"]}
- - {label: "Συντόμευση", name: "aliases", widget: "list", min: 0, max: 1, widget: string}
+ - {label: "Συντόμευση", name: "aliases", widget: "list", min: 0, max: 1}
- {label: "Περίληψη", name: "summary", required: false, widget: "string"}
- {label: "Body", name: "body", widget: "markdown"}
- name: "meetups" # Used in routes, e.g., /admin/collections/blog
@@ -39,13 +39,13 @@ collections:
- {label: "Title", name: "title", widget: "string"}
- {label: "Layout", name: "layout", widget: "hidden", default: "meetups"}
- {label: "Banner template", name: "bannertemplate", widget: "hidden", default: "hellug-banner.html"}
- - {label: "Ημερομηνία Δημοσίευσης", name: "date", widget: "datetime"}, picker_utc: "false"
- - {label: "Ημερομηνία Συνάντησης", name: "meetupdate", widget: "datetime", picker_utc: "false"}
+ - {label: "Ημερομηνία Δημοσίευσης", name: "date", widget: "datetime", picker_utc: false}
+ - {label: "Ημερομηνία Συνάντησης", name: "meetupdate", widget: "datetime", picker_utc: false}
- {label: "Τοποθεσία", name: "meetuplocation", widget: "string"}
- {label: "Τίτλος κατηγορίας", name: "category_title", widget: "string", default: "Δράσεις"}
- {label: "Ετικέτες κατηγορίας", name: "draseis", widget: "list", allow_add: false, default: [meetups]}
- {label: "Ετικέτες", name: "tags", widget: "list", allow_add: false, default: ["Meetups"]}
- - {label: "Συντόμευση", name: "aliases", widget: "list", min: 0, max: 1, widget: string}
+ - {label: "Συντόμευση", name: "aliases", widget: "list", min: 0, max: 1}
- {label: "Περίληψη", name: "summary", required: false, widget: "string"}
- {label: "Body", name: "body", widget: "markdown"}
- name: "events" # Used in routes, e.g., /admin/collections/blog
@@ -59,12 +59,12 @@ collections:
- {label: "Title", name: "title", widget: "string"}
- {label: "Layout", name: "layout", widget: "hidden", default: "events"}
- {label: "Banner template", name: "bannertemplate", widget: "hidden", default: "hellug-banner.html"}
- - {label: "Ημερομηνία Δημοσίευσης", name: "date", widget: "datetime", picker_utc: "false"}
- - {label: "Ημερομηνία εκδήλωσης", name: "eventdate", widget: "datetime", picker_utc: "false"}
- - {label: "Ημερομηνία λήξης εκδήλωσης", name: "eventend", required: "false", widget: "datetime", picker_utc: "false"}
+ - {label: "Ημερομηνία Δημοσίευσης", name: "date", widget: "datetime", picker_utc: false}
+ - {label: "Ημερομηνία εκδήλωσης", name: "eventdate", widget: "datetime", picker_utc: false}
+ - {label: "Ημερομηνία λήξης εκδήλωσης", name: "eventend", required: false, widget: "datetime", picker_utc: false}
- {label: "Τίτλος κατηγορίας", name: "category_title", widget: "string", default: "Δράσεις"}
- {label: "Ετικέτες κατηγορίας", name: "draseis", widget: "list", allow_add: false, default: [news,event]}
- {label: "Ετικέτες", name: "tags", widget: "list", allow_add: false, default: ["Εκδηλώσεις","Νέα"]}
- - {label: "Συντόμευση", name: "aliases", widget: "list", min: 0, max: 1, widget: string}
+ - {label: "Συντόμευση", name: "aliases", widget: "list", min: 0, max: 1}
- {label: "Περίληψη", name: "summary", required: false, widget: "string"}
- {label: "Body", name: "body", widget: "markdown"}
diff --git a/static/admin/decap-cms.js b/static/admin/decap-cms.js
index 4654436..de1d3c1 100644
--- a/static/admin/decap-cms.js
+++ b/static/admin/decap-cms.js
@@ -1,46 +1,77 @@
/*! For license information please see decap-cms.js.LICENSE.txt */
-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("DecapCms",[],t):"object"==typeof exports?exports.DecapCms=t():e.DecapCms=t()}(window,(()=>(()=>{var __webpack_modules__={61540:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AutoScrollActivator:()=>_e,DndContext:()=>Ye,DragOverlay:()=>mt,KeyboardCode:()=>oe,KeyboardSensor:()=>ce,MeasuringFrequency:()=>Se,MeasuringStrategy:()=>Ee,MouseSensor:()=>ye,PointerSensor:()=>me,TouchSensor:()=>we,TraversalOrder:()=>xe,applyModifiers:()=>Ge,closestCenter:()=>T,closestCorners:()=>O,defaultAnnouncements:()=>p,defaultCoordinates:()=>b,defaultDropAnimation:()=>ft,defaultDropAnimationSideEffects:()=>dt,defaultScreenReaderInstructions:()=>f,getClientRect:()=>F,getFirstCollision:()=>S,getScrollableAncestors:()=>z,pointerWithin:()=>D,rectIntersection:()=>P,useDndContext:()=>tt,useDndMonitor:()=>d,useDraggable:()=>et,useDroppable:()=>it,useSensor:()=>v,useSensors:()=>y});var r=n(2784),i=n(28316),o=n(82851);const a={display:"none"};function s(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:a},n)}const l={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function u(e){let{id:t,announcement:n}=e;return r.createElement("div",{id:t,style:l,role:"status","aria-live":"assertive","aria-atomic":!0},n)}const c=(0,r.createContext)(null);function d(e){const t=(0,r.useContext)(c);(0,r.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)}),[e,t])}const f={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},p={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function h(e){let{announcements:t=p,container:n,hiddenTextDescribedById:a,screenReaderInstructions:l=f}=e;const{announce:c,announcement:h}=function(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),m=(0,o.useUniqueId)("DndLiveRegion"),[g,v]=(0,r.useState)(!1);if((0,r.useEffect)((()=>{v(!0)}),[]),d((0,r.useMemo)((()=>({onDragStart(e){let{active:n}=e;c(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&c(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;c(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;c(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;c(t.onDragCancel({active:n,over:r}))}})),[c,t])),!g)return null;const y=r.createElement(r.Fragment,null,r.createElement(s,{id:a,value:l.draggable}),r.createElement(u,{id:m,announcement:h}));return n?(0,i.createPortal)(y,n):y}var m;function g(){}function v(e,t){return(0,r.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function y(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter((e=>null!=e))),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(m||(m={}));const b=Object.freeze({x:0,y:0});function w(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function _(e,t){const n=(0,o.getEventCoordinates)(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function x(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function k(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function E(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function S(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function C(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const T=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=C(t,t.left,t.top),o=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=w(C(r),i);o.push({id:t,data:{droppableContainer:e,value:n}})}}return o.sort(x)},O=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=E(t),o=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=E(r),a=i.reduce(((e,t,r)=>e+w(n[r],t)),0),s=Number((a/4).toFixed(4));o.push({id:t,data:{droppableContainer:e,value:s}})}}return o.sort(x)};function A(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const e of r){const{id:r}=e,o=n.get(r);if(o){const n=A(o,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(k)};function R(e,t){const{top:n,left:r,bottom:i,right:o}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=o}const D=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const i=[];for(const e of t){const{id:t}=e,o=n.get(t);if(o&&R(r,o)){const n=E(o).reduce(((e,t)=>e+w(r,t)),0),a=Number((n/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:a}})}}return i.sort(x)};function M(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:b}function I(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const L=I(1);function j(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const N={ignoreTransform:!1};function F(e,t){void 0===t&&(t=N);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=(0,o.getWindow)(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=j(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=e.left-a-(1-i)*parseFloat(n),u=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l}}(n,t,r))}const{top:r,left:i,width:a,height:s,bottom:l,right:u}=n;return{top:r,left:i,width:a,height:s,bottom:l,right:u}}function B(e){return F(e,{ignoreTransform:!0})}function z(e,t){const n=[];return e?function r(i){if(null!=t&&n.length>=t)return n;if(!i)return n;if((0,o.isDocument)(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!(0,o.isHTMLElement)(i)||(0,o.isSVGElement)(i))return n;if(n.includes(i))return n;const a=(0,o.getWindow)(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=(0,o.getWindow)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(i,a)&&n.push(i),function(e,t){return void 0===t&&(t=(0,o.getWindow)(e).getComputedStyle(e)),"fixed"===t.position}(i,a)?n:r(i.parentNode)}(e):n}function U(e){const[t]=z(e,1);return null!=t?t:null}function q(e){return o.canUseDOM&&e?(0,o.isWindow)(e)?e:(0,o.isNode)(e)?(0,o.isDocument)(e)||e===(0,o.getOwnerDocument)(e).scrollingElement?window:(0,o.isHTMLElement)(e)?e:null:null:null}function W(e){return(0,o.isWindow)(e)?e.scrollX:e.scrollLeft}function $(e){return(0,o.isWindow)(e)?e.scrollY:e.scrollTop}function H(e){return{x:W(e),y:$(e)}}var V;function G(e){return!(!o.canUseDOM||!e)&&e===document.scrollingElement}function K(e){const t={x:0,y:0},n=G(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(V||(V={}));const Z={x:.2,y:.2};function Y(e,t,n,r,i){let{top:o,left:a,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===i&&(i=Z);const{isTop:u,isBottom:c,isLeft:d,isRight:f}=K(e),p={x:0,y:0},h={x:0,y:0},m=t.height*i.y,g=t.width*i.x;return!u&&o<=t.top+m?(p.y=V.Backward,h.y=r*Math.abs((t.top+m-o)/m)):!c&&l>=t.bottom-m&&(p.y=V.Forward,h.y=r*Math.abs((t.bottom-m-l)/m)),!f&&s>=t.right-g?(p.x=V.Forward,h.x=r*Math.abs((t.right-g-s)/g)):!d&&a<=t.left+g&&(p.x=V.Backward,h.x=r*Math.abs((t.left+g-a)/g)),{direction:p,speed:h}}function X(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Q(e){return e.reduce(((e,t)=>(0,o.add)(e,H(t))),b)}function J(e,t){if(void 0===t&&(t=F),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);U(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const ee=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+W(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+$(t)),0)}]];class te{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=z(t),r=Q(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,i]of ee)for(const o of t)Object.defineProperty(this,o,{get:()=>{const t=i(n),a=r[e]-t;return this.rect[o]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ne{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function re(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var ie,oe;function ae(e){e.preventDefault()}function se(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(ie||(ie={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(oe||(oe={}));const le={start:[oe.Space,oe.Enter],cancel:[oe.Esc],end:[oe.Space,oe.Enter]},ue=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case oe.Right:return{...n,x:n.x+25};case oe.Left:return{...n,x:n.x-25};case oe.Down:return{...n,y:n.y+25};case oe.Up:return{...n,y:n.y-25}}};class ce{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new ne((0,o.getOwnerDocument)(t)),this.windowListeners=new ne((0,o.getWindow)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ie.Resize,this.handleCancel),this.windowListeners.add(ie.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(ie.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&J(n),t(b)}handleKeyDown(e){if((0,o.isKeyboardEvent)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=le,coordinateGetter:a=ue,scrollBehavior:s="smooth"}=r,{code:l}=e;if(i.end.includes(l))return void this.handleEnd(e);if(i.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:u}=n.current,c=u?{x:u.left,y:u.top}:b;this.referenceCoordinates||(this.referenceCoordinates=c);const d=a(e,{active:t,context:n.current,currentCoordinates:c});if(d){const t=(0,o.subtract)(d,c),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(const n of i){const i=e.code,{isTop:o,isRight:a,isLeft:l,isBottom:u,maxScroll:c,minScroll:f}=K(n),p=X(n),h={x:Math.min(i===oe.Right?p.right-p.width/2:p.right,Math.max(i===oe.Right?p.left:p.left+p.width/2,d.x)),y:Math.min(i===oe.Down?p.bottom-p.height/2:p.bottom,Math.max(i===oe.Down?p.top:p.top+p.height/2,d.y))},m=i===oe.Right&&!a||i===oe.Left&&!l,g=i===oe.Down&&!u||i===oe.Up&&!o;if(m&&h.x!==d.x){const e=n.scrollLeft+t.x,o=i===oe.Right&&e<=c.x||i===oe.Left&&e>=f.x;if(o&&!t.y)return void n.scrollTo({left:e,behavior:s});r.x=o?n.scrollLeft-e:i===oe.Right?n.scrollLeft-c.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:s});break}if(g&&h.y!==d.y){const e=n.scrollTop+t.y,o=i===oe.Down&&e<=c.y||i===oe.Up&&e>=f.y;if(o&&!t.x)return void n.scrollTo({top:e,behavior:s});r.y=o?n.scrollTop-e:i===oe.Down?n.scrollTop-c.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:s});break}}this.handleMove(e,(0,o.add)((0,o.subtract)(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function de(e){return Boolean(e&&"distance"in e)}function fe(e){return Boolean(e&&"delay"in e)}ce.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=le,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=o.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==i||i({event:e.nativeEvent}),0))}return!1}}];class pe{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,o.getWindow)(e);return e instanceof t?e:(0,o.getOwnerDocument)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:a}=i;this.props=e,this.events=t,this.document=(0,o.getOwnerDocument)(a),this.documentListeners=new ne(this.document),this.listeners=new ne(n),this.windowListeners=new ne((0,o.getWindow)(a)),this.initialCoordinates=null!=(r=(0,o.getEventCoordinates)(i))?r:b,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(ie.Resize,this.handleCancel),this.windowListeners.add(ie.DragStart,ae),this.windowListeners.add(ie.VisibilityChange,this.handleCancel),this.windowListeners.add(ie.ContextMenu,ae),this.documentListeners.add(ie.Keydown,this.handleKeydown),t){if(de(t))return;if(fe(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ie.Click,se,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ie.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:a,options:{activationConstraint:s}}=i;if(!r)return;const l=null!=(t=(0,o.getEventCoordinates)(e))?t:b,u=(0,o.subtract)(r,l);if(!n&&s){if(fe(s))return re(u,s.tolerance)?this.handleCancel():void 0;if(de(s))return null!=s.tolerance&&re(u,s.tolerance)?this.handleCancel():re(u,s.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),a(l)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===oe.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const he={move:{name:"pointermove"},end:{name:"pointerup"}};class me extends pe{constructor(e){const{event:t}=e,n=(0,o.getOwnerDocument)(t.target);super(e,he,n)}}me.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const ge={move:{name:"mousemove"},end:{name:"mouseup"}};var ve;!function(e){e[e.RightClick=2]="RightClick"}(ve||(ve={}));class ye extends pe{constructor(e){super(e,ge,(0,o.getOwnerDocument)(e.event.target))}}ye.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==ve.RightClick&&(null==r||r({event:n}),!0)}}];const be={move:{name:"touchmove"},end:{name:"touchend"}};class we extends pe{constructor(e){super(e,be)}static setup(){return window.addEventListener(be.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(be.move.name,e)};function e(){}}}var _e,xe;we.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return!(i.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(_e||(_e={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(xe||(xe={}));const ke={x:{[V.Backward]:!1,[V.Forward]:!1},y:{[V.Backward]:!1,[V.Forward]:!1}};var Ee,Se;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Ee||(Ee={})),function(e){e.Optimized="optimized"}(Se||(Se={}));const Ce=new Map;function Te(e,t){return(0,o.useLazyMemo)((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Oe(e){let{callback:t,disabled:n}=e;const i=(0,o.useEvent)(t),a=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)}),[n]);return(0,r.useEffect)((()=>()=>null==a?void 0:a.disconnect()),[a]),a}function Ae(e){return new te(F(e),e)}function Pe(e,t,n){void 0===t&&(t=Ae);const[i,a]=(0,r.useReducer)((function(r){if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=r?r:n)?i:null;const o=t(e);return JSON.stringify(r)===JSON.stringify(o)?r:o}),null),s=function(e){let{callback:t,disabled:n}=e;const i=(0,o.useEvent)(t),a=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)}),[i,n]);return(0,r.useEffect)((()=>()=>null==a?void 0:a.disconnect()),[a]),a}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),l=Oe({callback:a});return(0,o.useIsomorphicLayoutEffect)((()=>{a(),e?(null==l||l.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==l||l.disconnect(),null==s||s.disconnect())}),[e]),i}const Re=[];function De(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{n.current=null}),t),(0,r.useEffect)((()=>{const t=e!==b;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?(0,o.subtract)(e,n.current):b}function Me(e){return(0,r.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Ie=[];function Le(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,o.isHTMLElement)(t)?t:e}const je=[{sensor:me,options:{}},{sensor:ce,options:{}}],Ne={current:{}},Fe={draggable:{measure:B},droppable:{measure:B,strategy:Ee.WhileDragging,frequency:Se.Optimized},dragOverlay:{measure:F}};class Be extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const ze={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Be,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:g},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Fe,measureDroppableContainers:g,windowRect:null,measuringScheduled:!1},Ue={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:g,draggableNodes:new Map,over:null,measureDroppableContainers:g},qe=(0,r.createContext)(Ue),We=(0,r.createContext)(ze);function $e(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Be}}}function He(e,t){switch(t.type){case m.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case m.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case m.DragEnd:case m.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case m.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Be(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case m.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new Be(e.droppable.containers);return a.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case m.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Be(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function Ve(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:a}=(0,r.useContext)(qe),s=(0,o.usePrevious)(i),l=(0,o.usePrevious)(null==n?void 0:n.id);return(0,r.useEffect)((()=>{if(!t&&!i&&s&&null!=l){if(!(0,o.isKeyboardEvent)(s))return;if(document.activeElement===s.target)return;const e=a.get(l);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,o.findFirstFocusableNode)(e);if(t){t.focus();break}}}))}}),[i,t,a,l,s]),null}function Ge(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}const Ke=(0,r.createContext)({...b,scaleX:1,scaleY:1});var Ze;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Ze||(Ze={}));const Ye=(0,r.memo)((function(e){var t,n,a,s;let{id:l,accessibility:u,autoScroll:d=!0,children:f,sensors:p=je,collisionDetection:g=P,measuring:v,modifiers:y,...w}=e;const _=(0,r.useReducer)(He,void 0,$e),[x,k]=_,[E,C]=function(){const[e]=(0,r.useState)((()=>new Set)),t=(0,r.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,r.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[T,O]=(0,r.useState)(Ze.Uninitialized),A=T===Ze.Initialized,{draggable:{active:R,nodes:D,translate:I},droppable:{containers:j}}=x,N=R?D.get(R):null,B=(0,r.useRef)({initial:null,translated:null}),W=(0,r.useMemo)((()=>{var e;return null!=R?{id:R,data:null!=(e=null==N?void 0:N.data)?e:Ne,rect:B}:null}),[R,N]),$=(0,r.useRef)(null),[K,Z]=(0,r.useState)(null),[X,J]=(0,r.useState)(null),ee=(0,o.useLatestValue)(w,Object.values(w)),ne=(0,o.useUniqueId)("DndDescribedBy",l),re=(0,r.useMemo)((()=>j.getEnabled()),[j]),ie=(oe=v,(0,r.useMemo)((()=>({draggable:{...Fe.draggable,...null==oe?void 0:oe.draggable},droppable:{...Fe.droppable,...null==oe?void 0:oe.droppable},dragOverlay:{...Fe.dragOverlay,...null==oe?void 0:oe.dragOverlay}})),[null==oe?void 0:oe.draggable,null==oe?void 0:oe.droppable,null==oe?void 0:oe.dragOverlay]));var oe;const{droppableRects:ae,measureDroppableContainers:se,measuringScheduled:le}=function(e,t){let{dragging:n,dependencies:i,config:a}=t;const[s,l]=(0,r.useState)(null),{frequency:u,measure:c,strategy:d}=a,f=(0,r.useRef)(e),p=function(){switch(d){case Ee.Always:return!1;case Ee.BeforeDragging:return n;default:return!n}}(),h=(0,o.useLatestValue)(p),m=(0,r.useCallback)((function(e){void 0===e&&(e=[]),h.current||l((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[h]),g=(0,r.useRef)(null),v=(0,o.useLazyMemo)((t=>{if(p&&!n)return Ce;if(!t||t===Ce||f.current!==e||null!=s){const t=new Map;for(let n of e){if(!n)continue;if(s&&s.length>0&&!s.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new te(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,s,n,p,c]);return(0,r.useEffect)((()=>{f.current=e}),[e]),(0,r.useEffect)((()=>{p||m()}),[n,p]),(0,r.useEffect)((()=>{s&&s.length>0&&l(null)}),[JSON.stringify(s)]),(0,r.useEffect)((()=>{p||"number"!=typeof u||null!==g.current||(g.current=setTimeout((()=>{m(),g.current=null}),u))}),[u,p,m,...i]),{droppableRects:v,measureDroppableContainers:m,measuringScheduled:null!=s}}(re,{dragging:A,dependencies:[I.x,I.y],config:ie.droppable}),ue=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return(0,o.useLazyMemo)((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(D,R),ce=(0,r.useMemo)((()=>X?(0,o.getEventCoordinates)(X):null),[X]),de=function(){const e=!1===(null==K?void 0:K.autoScrollEnabled),t="object"==typeof d?!1===d.enabled:!1===d,n=A&&!e&&!t;return"object"==typeof d?{...d,enabled:n}:{enabled:n}}(),fe=function(e,t){return Te(e,t)}(ue,ie.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:i,config:a=!0}=e;const s=(0,r.useRef)(!1),{x:l,y:u}="boolean"==typeof a?{x:a,y:a}:a;(0,o.useIsomorphicLayoutEffect)((()=>{if(!l&&!u||!t)return void(s.current=!1);if(s.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=M(n(e),i);if(l||(r.x=0),u||(r.y=0),s.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=U(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,l,u,i,n])}({activeNode:R?D.get(R):null,config:de.layoutShiftCompensation,initialRect:fe,measure:ie.draggable.measure});const pe=Pe(ue,ie.draggable.measure,fe),he=Pe(ue?ue.parentElement:null),me=(0,r.useRef)({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:ae,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:j,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ge=j.getNodeFor(null==(t=me.current.over)?void 0:t.id),ve=function(e){let{measure:t}=e;const[n,i]=(0,r.useState)(null),a=Oe({callback:(0,r.useCallback)((e=>{for(const{target:n}of e)if((0,o.isHTMLElement)(n)){i((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),s=(0,r.useCallback)((e=>{const n=Le(e);null==a||a.disconnect(),n&&(null==a||a.observe(n)),i(n?t(n):null)}),[t,a]),[l,u]=(0,o.useNodeRef)(s);return(0,r.useMemo)((()=>({nodeRef:l,rect:n,setRef:u})),[n,l,u])}({measure:ie.dragOverlay.measure}),ye=null!=(n=ve.nodeRef.current)?n:ue,be=A?null!=(a=ve.rect)?a:pe:null,we=Boolean(ve.nodeRef.current&&ve.rect),Se=M(Ae=we?null:pe,Te(Ae));var Ae;const Be=Me(ye?(0,o.getWindow)(ye):null),ze=function(e){const t=(0,r.useRef)(e),n=(0,o.useLazyMemo)((n=>e?n&&n!==Re&&e&&t.current&&e.parentNode===t.current.parentNode?n:z(e):Re),[e]);return(0,r.useEffect)((()=>{t.current=e}),[e]),n}(A?null!=ge?ge:ue:null),Ue=function(e,t){void 0===t&&(t=F);const[n]=e,i=Me(n?(0,o.getWindow)(n):null),[a,s]=(0,r.useReducer)((function(){return e.length?e.map((e=>G(e)?i:new te(t(e),e))):Ie}),Ie),l=Oe({callback:s});return e.length>0&&a===Ie&&s(),(0,o.useIsomorphicLayoutEffect)((()=>{e.length?e.forEach((e=>null==l?void 0:l.observe(e))):(null==l||l.disconnect(),s())}),[e]),a}(ze),Ye=Ge(y,{transform:{x:I.x-Se.x,y:I.y-Se.y,scaleX:1,scaleY:1},activatorEvent:X,active:W,activeNodeRect:pe,containerNodeRect:he,draggingNodeRect:be,over:me.current.over,overlayNodeRect:ve.rect,scrollableAncestors:ze,scrollableAncestorRects:Ue,windowRect:Be}),Xe=ce?(0,o.add)(ce,I):null,Qe=function(e){const[t,n]=(0,r.useState)(null),i=(0,r.useRef)(e),a=(0,r.useCallback)((e=>{const t=q(e.target);t&&n((e=>e?(e.set(t,H(t)),new Map(e)):null))}),[]);return(0,r.useEffect)((()=>{const t=i.current;if(e!==t){r(t);const o=e.map((e=>{const t=q(e);return t?(t.addEventListener("scroll",a,{passive:!0}),[t,H(t)]):null})).filter((e=>null!=e));n(o.length?new Map(o):null),i.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=q(e);null==t||t.removeEventListener("scroll",a)}))}}),[a,e]),(0,r.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,o.add)(e,t)),b):Q(e):b),[e,t])}(ze),Je=De(Qe),et=De(Qe,[pe]),tt=(0,o.add)(Ye,Je),nt=be?L(be,Ye):null,rt=W&&nt?g({active:W,collisionRect:nt,droppableRects:ae,droppableContainers:re,pointerCoordinates:Xe}):null,it=S(rt,"id"),[ot,at]=(0,r.useState)(null),st=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(we?Ye:(0,o.add)(Ye,et),null!=(s=null==ot?void 0:ot.rect)?s:null,pe),lt=(0,r.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==$.current)return;const o=D.get($.current);if(!o)return;const a=e.nativeEvent,s=new n({active:$.current,activeNode:o,event:a,options:r,context:me,onStart(e){const t=$.current;if(null==t)return;const n=D.get(t);if(!n)return;const{onDragStart:r}=ee.current,o={active:{id:t,data:n.data,rect:B}};(0,i.unstable_batchedUpdates)((()=>{null==r||r(o),O(Ze.Initializing),k({type:m.DragStart,initialCoordinates:e,active:t}),E({type:"onDragStart",event:o})}))},onMove(e){k({type:m.DragMove,coordinates:e})},onEnd:l(m.DragEnd),onCancel:l(m.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=me.current;let s=null;if(t&&o){const{cancelDrop:i}=ee.current;s={activatorEvent:a,active:t,collisions:n,delta:o,over:r},e===m.DragEnd&&"function"==typeof i&&await Promise.resolve(i(s))&&(e=m.DragCancel)}$.current=null,(0,i.unstable_batchedUpdates)((()=>{k({type:e}),O(Ze.Uninitialized),at(null),Z(null),J(null);const t=e===m.DragEnd?"onDragEnd":"onDragCancel";if(s){const e=ee.current[t];null==e||e(s),E({type:t,event:s})}}))}}(0,i.unstable_batchedUpdates)((()=>{Z(s),J(e.nativeEvent)}))}),[D]),ut=(0,r.useCallback)(((e,t)=>(n,r)=>{const i=n.nativeEvent,o=D.get(r);if(null!==$.current||!o||i.dndKit||i.defaultPrevented)return;const a={active:o};!0===e(n,t.options,a)&&(i.dndKit={capturedBy:t.sensor},$.current=r,lt(n,t))}),[D,lt]),ct=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(p,ut);!function(e){(0,r.useEffect)((()=>{if(!o.canUseDOM)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(p),(0,o.useIsomorphicLayoutEffect)((()=>{pe&&T===Ze.Initializing&&O(Ze.Initialized)}),[pe,T]),(0,r.useEffect)((()=>{const{onDragMove:e}=ee.current,{active:t,activatorEvent:n,collisions:r,over:o}=me.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:tt.x,y:tt.y},over:o};(0,i.unstable_batchedUpdates)((()=>{null==e||e(a),E({type:"onDragMove",event:a})}))}),[tt.x,tt.y]),(0,r.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=me.current;if(!e||null==$.current||!t||!o)return;const{onDragOver:a}=ee.current,s=r.get(it),l=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,u={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:l};(0,i.unstable_batchedUpdates)((()=>{at(l),null==a||a(u),E({type:"onDragOver",event:u})}))}),[it]),(0,o.useIsomorphicLayoutEffect)((()=>{me.current={activatorEvent:X,active:W,activeNode:ue,collisionRect:nt,collisions:rt,droppableRects:ae,draggableNodes:D,draggingNode:ye,draggingNodeRect:be,droppableContainers:j,over:ot,scrollableAncestors:ze,scrollAdjustedTranslate:tt},B.current={initial:be,translated:nt}}),[W,ue,rt,nt,D,ye,be,ae,j,ot,ze,tt]),function(e){let{acceleration:t,activator:n=_e.Pointer,canScroll:i,draggingRect:a,enabled:s,interval:l=5,order:u=xe.TreeOrder,pointerCoordinates:c,scrollableAncestors:d,scrollableAncestorRects:f,delta:p,threshold:h}=e;const m=function(e){let{delta:t,disabled:n}=e;const r=(0,o.usePrevious)(t);return(0,o.useLazyMemo)((e=>{if(n||!r||!e)return ke;const i=Math.sign(t.x-r.x),o=Math.sign(t.y-r.y);return{x:{[V.Backward]:e.x[V.Backward]||-1===i,[V.Forward]:e.x[V.Forward]||1===i},y:{[V.Backward]:e.y[V.Backward]||-1===o,[V.Forward]:e.y[V.Forward]||1===o}}}),[n,t,r])}({delta:p,disabled:!s}),[g,v]=(0,o.useInterval)(),y=(0,r.useRef)({x:0,y:0}),b=(0,r.useRef)({x:0,y:0}),w=(0,r.useMemo)((()=>{switch(n){case _e.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case _e.DraggableRect:return a}}),[n,a,c]),_=(0,r.useRef)(null),x=(0,r.useCallback)((()=>{const e=_.current;if(!e)return;const t=y.current.x*b.current.x,n=y.current.y*b.current.y;e.scrollBy(t,n)}),[]),k=(0,r.useMemo)((()=>u===xe.TreeOrder?[...d].reverse():d),[u,d]);(0,r.useEffect)((()=>{if(s&&d.length&&w){for(const e of k){if(!1===(null==i?void 0:i(e)))continue;const n=d.indexOf(e),r=f[n];if(!r)continue;const{direction:o,speed:a}=Y(e,r,w,t,h);for(const e of["x","y"])m[e][o[e]]||(a[e]=0,o[e]=0);if(a.x>0||a.y>0)return v(),_.current=e,g(x,l),y.current=a,void(b.current=o)}y.current={x:0,y:0},b.current={x:0,y:0},v()}else v()}),[t,x,i,v,s,l,JSON.stringify(w),JSON.stringify(m),g,d,k,f,JSON.stringify(h)])}({...de,delta:I,draggingRect:nt,pointerCoordinates:Xe,scrollableAncestors:ze,scrollableAncestorRects:Ue});const dt=(0,r.useMemo)((()=>({active:W,activeNode:ue,activeNodeRect:pe,activatorEvent:X,collisions:rt,containerNodeRect:he,dragOverlay:ve,draggableNodes:D,droppableContainers:j,droppableRects:ae,over:ot,measureDroppableContainers:se,scrollableAncestors:ze,scrollableAncestorRects:Ue,measuringConfiguration:ie,measuringScheduled:le,windowRect:Be})),[W,ue,pe,X,rt,he,ve,D,j,ae,ot,se,ze,Ue,ie,le,Be]),ft=(0,r.useMemo)((()=>({activatorEvent:X,activators:ct,active:W,activeNodeRect:pe,ariaDescribedById:{draggable:ne},dispatch:k,draggableNodes:D,over:ot,measureDroppableContainers:se})),[X,ct,W,pe,k,ne,D,ot,se]);return r.createElement(c.Provider,{value:C},r.createElement(qe.Provider,{value:ft},r.createElement(We.Provider,{value:dt},r.createElement(Ke.Provider,{value:st},f)),r.createElement(Ve,{disabled:!1===(null==u?void 0:u.restoreFocus)})),r.createElement(h,{...u,hiddenTextDescribedById:ne}))})),Xe=(0,r.createContext)(null),Qe="button",Je="Droppable";function et(e){let{id:t,data:n,disabled:i=!1,attributes:a}=e;const s=(0,o.useUniqueId)(Je),{activators:l,activatorEvent:u,active:c,activeNodeRect:d,ariaDescribedById:f,draggableNodes:p,over:h}=(0,r.useContext)(qe),{role:m=Qe,roleDescription:g="draggable",tabIndex:v=0}=null!=a?a:{},y=(null==c?void 0:c.id)===t,b=(0,r.useContext)(y?Ke:Xe),[w,_]=(0,o.useNodeRef)(),[x,k]=(0,o.useNodeRef)(),E=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e}),{})),[e,t])}(l,t),S=(0,o.useLatestValue)(n);return(0,o.useIsomorphicLayoutEffect)((()=>(p.set(t,{id:t,key:s,node:w,activatorNode:x,data:S}),()=>{const e=p.get(t);e&&e.key===s&&p.delete(t)})),[p,t]),{active:c,activatorEvent:u,activeNodeRect:d,attributes:(0,r.useMemo)((()=>({role:m,tabIndex:v,"aria-disabled":i,"aria-pressed":!(!y||m!==Qe)||void 0,"aria-roledescription":g,"aria-describedby":f.draggable})),[i,m,v,y,g,f.draggable]),isDragging:y,listeners:i?void 0:E,node:w,over:h,setNodeRef:_,setActivatorNodeRef:k,transform:b}}function tt(){return(0,r.useContext)(We)}const nt="Droppable",rt={timeout:25};function it(e){let{data:t,disabled:n=!1,id:i,resizeObserverConfig:a}=e;const s=(0,o.useUniqueId)(nt),{active:l,dispatch:u,over:c,measureDroppableContainers:d}=(0,r.useContext)(qe),f=(0,r.useRef)({disabled:n}),p=(0,r.useRef)(!1),h=(0,r.useRef)(null),g=(0,r.useRef)(null),{disabled:v,updateMeasurementsFor:y,timeout:b}={...rt,...a},w=(0,o.useLatestValue)(null!=y?y:i),_=Oe({callback:(0,r.useCallback)((()=>{p.current?(null!=g.current&&clearTimeout(g.current),g.current=setTimeout((()=>{d(Array.isArray(w.current)?w.current:[w.current]),g.current=null}),b)):p.current=!0}),[b]),disabled:v||!l}),x=(0,r.useCallback)(((e,t)=>{_&&(t&&(_.unobserve(t),p.current=!1),e&&_.observe(e))}),[_]),[k,E]=(0,o.useNodeRef)(x),S=(0,o.useLatestValue)(t);return(0,r.useEffect)((()=>{_&&k.current&&(_.disconnect(),p.current=!1,_.observe(k.current))}),[k,_]),(0,o.useIsomorphicLayoutEffect)((()=>(u({type:m.RegisterDroppable,element:{id:i,key:s,disabled:n,node:k,rect:h,data:S}}),()=>u({type:m.UnregisterDroppable,key:s,id:i}))),[i]),(0,r.useEffect)((()=>{n!==f.current.disabled&&(u({type:m.SetDroppableDisabled,id:i,key:s,disabled:n}),f.current.disabled=n)}),[i,s,n,u]),{active:l,rect:h,isOver:(null==c?void 0:c.id)===i,node:k,over:c,setNodeRef:E}}function ot(e){let{animation:t,children:n}=e;const[i,a]=(0,r.useState)(null),[s,l]=(0,r.useState)(null),u=(0,o.usePrevious)(n);return n||i||!u||a(u),(0,o.useIsomorphicLayoutEffect)((()=>{if(!s)return;const e=null==i?void 0:i.key,n=null==i?void 0:i.props.id;null!=e&&null!=n?Promise.resolve(t(n,s)).then((()=>{a(null)})):a(null)}),[t,i,s]),r.createElement(r.Fragment,null,n,i?(0,r.cloneElement)(i,{ref:l}):null)}const at={x:0,y:0,scaleX:1,scaleY:1};function st(e){let{children:t}=e;return r.createElement(qe.Provider,{value:Ue},r.createElement(Ke.Provider,{value:at},t))}const lt={position:"fixed",touchAction:"none"},ut=e=>(0,o.isKeyboardEvent)(e)?"transform 250ms ease":void 0,ct=(0,r.forwardRef)(((e,t)=>{let{as:n,activatorEvent:i,adjustScale:a,children:s,className:l,rect:u,style:c,transform:d,transition:f=ut}=e;if(!u)return null;const p=a?d:{...d,scaleX:1,scaleY:1},h={...lt,width:u.width,height:u.height,top:u.top,left:u.left,transform:o.CSS.Transform.toString(p),transformOrigin:a&&i?_(i,u):void 0,transition:"function"==typeof f?f(i):f,...c};return r.createElement(n,{className:l,style:h,ref:t},s)})),dt=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(null!=o&&o.active)for(const[e,t]of Object.entries(o.active))void 0!==t&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=o&&o.dragOverlay)for(const[e,t]of Object.entries(o.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(i))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},ft={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:o.CSS.Transform.toString(t)},{transform:o.CSS.Transform.toString(n)}]},sideEffects:dt({styles:{active:{opacity:"0"}}})};let pt=0;function ht(e){return(0,r.useMemo)((()=>{if(null!=e)return pt++,pt}),[e])}const mt=r.memo((e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:a,transition:s,modifiers:l,wrapperElement:u="div",className:c,zIndex:d=999}=e;const{activatorEvent:f,active:p,activeNodeRect:h,containerNodeRect:m,draggableNodes:g,droppableContainers:v,dragOverlay:y,over:b,measuringConfiguration:w,scrollableAncestors:_,scrollableAncestorRects:x,windowRect:k}=tt(),E=(0,r.useContext)(Ke),S=ht(null==p?void 0:p.id),C=Ge(l,{activatorEvent:f,active:p,activeNodeRect:h,containerNodeRect:m,draggingNodeRect:y.rect,over:b,overlayNodeRect:y.rect,scrollableAncestors:_,scrollableAncestorRects:x,transform:E,windowRect:k}),T=Te(h),O=function(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return(0,o.useEvent)(((e,a)=>{if(null===t)return;const s=n.get(e);if(!s)return;const l=s.node.current;if(!l)return;const u=Le(a);if(!u)return;const{transform:c}=(0,o.getWindow)(a).getComputedStyle(a),d=j(c);if(!d)return;const f="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}={...ft,...e};return e=>{let{active:o,dragOverlay:a,transform:s,...l}=e;if(!t)return;const u=a.rect.left-o.rect.left,c=a.rect.top-o.rect.top,d={scaleX:1!==s.scaleX?o.rect.width*s.scaleX/a.rect.width:1,scaleY:1!==s.scaleY?o.rect.height*s.scaleY/a.rect.height:1},f={x:s.x-u,y:s.y-c,...d},p=i({...l,active:o,dragOverlay:a,transform:{initial:s,final:f}}),[h]=p,m=p[p.length-1];if(JSON.stringify(h)===JSON.stringify(m))return;const g=null==r?void 0:r({active:o,dragOverlay:a,...l}),v=a.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{v.onfinish=()=>{null==g||g(),e()}}))}}(t);return J(l,i.draggable.measure),f({active:{id:e,data:s.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:d})}))}({config:i,draggableNodes:g,droppableContainers:v,measuringConfiguration:w}),A=T?y.setRef:void 0;return r.createElement(st,null,r.createElement(ot,{animation:O},p&&S?r.createElement(ct,{key:S,id:p.id,ref:A,as:u,activatorEvent:f,adjustScale:t,className:c,transition:s,rect:T,style:{zIndex:d,...a},transform:C},n):null))}))},88366:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createSnapModifier:()=>i,restrictToFirstScrollableAncestor:()=>l,restrictToHorizontalAxis:()=>o,restrictToParentElement:()=>s,restrictToVerticalAxis:()=>u,restrictToWindowEdges:()=>c,snapCenterToCursor:()=>d});var r=n(82851);function i(e){return t=>{let{transform:n}=t;return{...n,x:Math.ceil(n.x/e)*e,y:Math.ceil(n.y/e)*e}}}const o=e=>{let{transform:t}=e;return{...t,y:0}};function a(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const s=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return n&&t?a(r,n,t):r},l=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:r}=e;const i=r[0];return t&&i?a(n,t,i):n},u=e=>{let{transform:t}=e;return{...t,x:0}},c=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return n&&r?a(t,n,r):t},d=e=>{let{activatorEvent:t,draggingNodeRect:n,transform:i}=e;if(n&&t){const e=(0,r.getEventCoordinates)(t);if(!e)return i;const o=e.x-n.left,a=e.y-n.top;return{...i,x:i.x+o-n.width/2,y:i.y+a-n.height/2}}return i}},66548:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SortableContext:()=>y,arrayMove:()=>a,arraySwap:()=>s,defaultAnimateLayoutChanges:()=>w,defaultNewIndexGetter:()=>b,hasSortableData:()=>C,horizontalListSortingStrategy:()=>d,rectSortingStrategy:()=>f,rectSwappingStrategy:()=>p,sortableKeyboardCoordinates:()=>O,useSortable:()=>S,verticalListSortingStrategy:()=>m});var r=n(2784),i=n(61540),o=n(82851);function a(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function s(e,t,n){const r=e.slice();return r[t]=e[n],r[n]=e[t],r}function l(e,t){return e.reduce(((e,n,r)=>{const i=t.get(n);return i&&(e[r]=i),e}),Array(e.length))}function u(e){return null!==e&&e>=0}const c={scaleX:1,scaleY:1},d=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:i,overIndex:o,index:a}=e;const s=null!=(t=n[i])?t:r;if(!s)return null;const l=function(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];return r&&(i||o)?ni&&a<=o?{x:-s.width-l,y:0,...c}:a=o?{x:s.width+l,y:0,...c}:{x:0,y:0,...c}},f=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=a(t,r,n),s=t[i],l=o[i];return l&&s?{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}:null},p=e=>{let t,n,{activeIndex:r,index:i,rects:o,overIndex:a}=e;return i===r&&(t=o[i],n=o[a]),i===a&&(t=o[i],n=o[r]),n&&t?{x:n.left-t.left,y:n.top-t.top,scaleX:n.width/t.width,scaleY:n.height/t.height}:null},h={scaleX:1,scaleY:1},m=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:a}=e;const s=null!=(t=o[n])?t:r;if(!s)return null;if(i===n){const e=o[a];return e?{x:0,y:nn&&i<=a?{x:0,y:-s.height-l,...h}:i=a?{x:0,y:s.height+l,...h}:{x:0,y:0,...h}},g="Sortable",v=r.createContext({activeIndex:-1,containerId:g,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:f,disabled:{draggable:!1,droppable:!1}});function y(e){let{children:t,id:n,items:a,strategy:s=f,disabled:u=!1}=e;const{active:c,dragOverlay:d,droppableRects:p,over:h,measureDroppableContainers:m}=(0,i.useDndContext)(),y=(0,o.useUniqueId)(g,n),b=Boolean(null!==d.rect),w=(0,r.useMemo)((()=>a.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[a]),_=null!=c,x=c?w.indexOf(c.id):-1,k=h?w.indexOf(h.id):-1,E=(0,r.useRef)(w),S=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{S&&_&&m(w)}),[S,w,_,m]),(0,r.useEffect)((()=>{E.current=w}),[w]);const O=(0,r.useMemo)((()=>({activeIndex:x,containerId:y,disabled:T,disableTransforms:C,items:w,overIndex:k,useDragOverlay:b,sortedRects:l(w,p),strategy:s})),[x,y,T.draggable,T.droppable,C,w,k,p,b,s]);return r.createElement(v.Provider,{value:O},t)}const b=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return a(n,r,i).indexOf(t)},w=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:l,transition:u}=e;return!(!u||!r||s!==o&&i===a||!n&&(a===i||t!==l))},_={duration:200,easing:"ease"},x="transform",k=o.CSS.Transition.toString({property:x,duration:0,easing:"linear"}),E={roleDescription:"sortable"};function S(e){let{animateLayoutChanges:t=w,attributes:n,disabled:a,data:s,getNewIndex:l=b,id:c,strategy:d,resizeObserverConfig:f,transition:p=_}=e;const{items:h,containerId:m,activeIndex:g,disabled:y,disableTransforms:S,sortedRects:C,overIndex:T,useDragOverlay:O,strategy:A}=(0,r.useContext)(v),P=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(a,y),R=h.indexOf(c),D=(0,r.useMemo)((()=>({sortable:{containerId:m,index:R,items:h},...s})),[m,s,R,h]),M=(0,r.useMemo)((()=>h.slice(h.indexOf(c))),[h,c]),{rect:I,node:L,isOver:j,setNodeRef:N}=(0,i.useDroppable)({id:c,data:D,disabled:P.droppable,resizeObserverConfig:{updateMeasurementsFor:M,...f}}),{active:F,activatorEvent:B,activeNodeRect:z,attributes:U,setNodeRef:q,listeners:W,isDragging:$,over:H,setActivatorNodeRef:V,transform:G}=(0,i.useDraggable)({id:c,data:D,attributes:{...E,...n},disabled:P.draggable}),K=(0,o.useCombinedRefs)(N,q),Z=Boolean(F),Y=Z&&!S&&u(g)&&u(T),X=!O&&$,Q=X&&Y?G:null,J=Y?null!=Q?Q:(null!=d?d:A)({rects:C,activeNodeRect:z,activeIndex:g,overIndex:T,index:R}):null,ee=u(g)&&u(T)?l({id:c,items:h,activeIndex:g,overIndex:T}):R,te=null==F?void 0:F.id,ne=(0,r.useRef)({activeId:te,items:h,newIndex:ee,containerId:m}),re=h!==ne.current.items,ie=t({active:F,containerId:m,isDragging:$,isSorting:Z,id:c,index:R,items:h,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:p,wasDragging:null!=ne.current.activeId}),oe=function(e){let{disabled:t,index:n,node:a,rect:s}=e;const[l,u]=(0,r.useState)(null),c=(0,r.useRef)(n);return(0,o.useIsomorphicLayoutEffect)((()=>{if(!t&&n!==c.current&&a.current){const e=s.current;if(e){const t=(0,i.getClientRect)(a.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&u(n)}}n!==c.current&&(c.current=n)}),[t,n,a,s]),(0,r.useEffect)((()=>{l&&u(null)}),[l]),l}({disabled:!ie,index:R,node:L,rect:I});return(0,r.useEffect)((()=>{Z&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),m!==ne.current.containerId&&(ne.current.containerId=m),h!==ne.current.items&&(ne.current.items=h)}),[Z,ee,m,h]),(0,r.useEffect)((()=>{if(te===ne.current.activeId)return;if(te&&!ne.current.activeId)return void(ne.current.activeId=te);const e=setTimeout((()=>{ne.current.activeId=te}),50);return()=>clearTimeout(e)}),[te]),{active:F,activeIndex:g,attributes:U,data:D,rect:I,index:R,newIndex:ee,items:h,isOver:j,isSorting:Z,isDragging:$,listeners:W,node:L,overIndex:T,over:H,setNodeRef:K,setActivatorNodeRef:V,setDroppableNodeRef:N,setDraggableNodeRef:q,transform:null!=oe?oe:J,transition:oe||re&&ne.current.newIndex===R?k:X&&!(0,o.isKeyboardEvent)(B)||!p?void 0:Z||ie?o.CSS.Transition.toString({...p,property:x}):void 0}}function C(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const T=[i.KeyboardCode.Down,i.KeyboardCode.Right,i.KeyboardCode.Up,i.KeyboardCode.Left],O=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:a,droppableContainers:s,over:l,scrollableAncestors:u}}=t;if(T.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];s.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const o=a.get(n.id);if(o)switch(e.code){case i.KeyboardCode.Down:r.topo.top&&t.push(n);break;case i.KeyboardCode.Left:r.left>o.left&&t.push(n);break;case i.KeyboardCode.Right:r.left1&&(p=f[1].id),null!=p){const e=s.get(n.id),t=s.get(p),l=t?a.get(t.id):null,f=null==t?void 0:t.node.current;if(f&&l&&e&&t){const n=(0,i.getScrollableAncestors)(f).some(((e,t)=>u[t]!==e)),a=A(e,t),s=(d=t,!(!C(c=e)||!C(d))&&!!A(c,d)&&c.data.current.sortable.index{"use strict";n.r(t),n.d(t,{CSS:()=>A,add:()=>k,canUseDOM:()=>o,findFirstFocusableNode:()=>R,getEventCoordinates:()=>O,getOwnerDocument:()=>f,getWindow:()=>l,hasViewportRelativeCoordinates:()=>S,isDocument:()=>u,isHTMLElement:()=>c,isKeyboardEvent:()=>C,isNode:()=>s,isSVGElement:()=>d,isTouchEvent:()=>T,isWindow:()=>a,subtract:()=>E,useCombinedRefs:()=>i,useEvent:()=>h,useInterval:()=>m,useIsomorphicLayoutEffect:()=>p,useLatestValue:()=>g,useLazyMemo:()=>v,useNodeRef:()=>y,usePrevious:()=>b,useUniqueId:()=>_});var r=n(2784);function i(){for(var e=arguments.length,t=new Array(e),n=0;ne=>{t.forEach((t=>t(e)))}),t)}const o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function s(e){return"nodeType"in e}function l(e){var t,n;return e?a(e)?e:s(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function u(e){const{Document:t}=l(e);return e instanceof t}function c(e){return!a(e)&&e instanceof l(e).HTMLElement}function d(e){return e instanceof l(e).SVGElement}function f(e){return e?a(e)?e.document:s(e)?u(e)?e:c(e)?e.ownerDocument:document:document:document}const p=o?r.useLayoutEffect:r.useEffect;function h(e){const t=(0,r.useRef)(e);return p((()=>{t.current=e})),(0,r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r{e.current=setInterval(t,n)}),[]),(0,r.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}function g(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return p((()=>{n.current!==e&&(n.current=e)}),t),n}function v(e,t){const n=(0,r.useRef)();return(0,r.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function y(e){const t=h(e),n=(0,r.useRef)(null),i=(0,r.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,i]}function b(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}let w={};function _(e,t){return(0,r.useMemo)((()=>{if(t)return t;const n=null==w[e]?0:w[e]+1;return w[e]=n,e+"-"+n}),[e,t])}function x(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{const r=Object.entries(n);for(const[n,i]of r){const r=t[n];null!=r&&(t[n]=r+e*i)}return t}),{...t})}}const k=x(1),E=x(-1);function S(e){return"clientX"in e&&"clientY"in e}function C(e){if(!e)return!1;const{KeyboardEvent:t}=l(e.target);return t&&e instanceof t}function T(e){if(!e)return!1;const{TouchEvent:t}=l(e.target);return t&&e instanceof t}function O(e){if(T(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return S(e)?{x:e.clientX,y:e.clientY}:null}const A=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[A.Translate.toString(e),A.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),P="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function R(e){return e.matches(P)?e:e.querySelector(P)}},39721:(e,t,n)=>{"use strict";n.d(t,{Z:()=>re});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?c(w,--y):0,g--,10===b&&(g=1,m--),b}function E(){return b=y2||O(b)>3?"":" "}function M(e,t){for(;--t&&E()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return T(e,C()+(t<6&&32==S()&&32==E()))}function I(e){for(;E();)switch(b){case e:return y;case 34:case 39:34!==e&&39!==e&&I(b);break;case 40:41===e&&I(e);break;case 92:E()}return y}function L(e,t){for(;E()&&e+b!==57&&(e+b!==84||47!==S()););return"/*"+T(t,y-1)+"*"+o(47===e?e:E())}function j(e){for(;!O(S());)E();return T(e,y)}var N="-ms-",F="-moz-",B="-webkit-",z="comm",U="rule",q="decl",W="@keyframes";function $(e,t){for(var n="",r=p(e),i=0;i0&&f(F)-v&&h(b>32?Y(F+";",r,n,v-1):Y(l(F," ","")+";",r,n,v-2),p);break;case 59:F+=";";default:if(h(N=K(F,t,n,m,g,i,d,A,P=[],I=[],v),a),123===O)if(0===g)G(F,t,N,N,P,a,v,d,I);else switch(99===y&&110===c(F,3)?100:y){case 100:case 108:case 109:case 115:G(e,N,N,r&&h(K(e,N,N,0,0,i,d,A,i,P=[],v),I),i,I,v,d,r?P:I);break;default:G(F,N,N,N,[""],I,0,d,I)}}m=g=b=0,_=T=1,A=F="",v=s;break;case 58:v=1+f(F),b=w;default:if(_<1)if(123==O)--_;else if(125==O&&0==_++&&125==k())continue;switch(F+=o(O),O*_){case 38:T=g>0?1:(F+="\f",-1);break;case 44:d[m++]=(f(F)-1)*T,T=1;break;case 64:45===S()&&(F+=R(E())),y=S(),g=v=f(A=F+=j(C())),O++;break;case 45:45===w&&2==f(F)&&(_=0)}}return a}function K(e,t,n,r,o,a,u,c,f,h,m){for(var g=o-1,v=0===o?a:[""],y=p(v),b=0,w=0,x=0;b0?v[k]+" "+E:l(E,/&\f/g,v[k])))&&(f[x++]=S);return _(e,t,n,0===o?U:c,f,h,m)}function Z(e,t,n){return _(e,t,n,z,o(b),d(e,2,-2),0)}function Y(e,t,n,r){return _(e,t,n,q,d(e,0,r),d(e,r+1,-1),r)}var X=function(e,t,n){for(var r=0,i=0;r=i,i=S(),38===r&&12===i&&(t[n]=1),!O(i);)E();return T(e,y)},Q=new WeakMap,J=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Q.get(n))&&!r){Q.set(e,!0);for(var i=[],a=function(e,t){return P(function(e,t){var n=-1,r=44;do{switch(O(r)){case 0:38===r&&12===S()&&(t[n]=1),e[n]+=X(y-1,t,n);break;case 2:e[n]+=R(r);break;case 4:if(44===r){e[++n]=58===S()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=o(r)}}while(r=E());return e}(A(e),t))}(t,i),s=n.props,l=0,u=0;l6)switch(c(e,t+1)){case 109:if(45!==c(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+F+(108==c(e,t+3)?"$3":"$2-$3"))+e;case 115:return~u(e,"stretch")?te(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==c(e,t+1))break;case 6444:switch(c(e,f(e)-3-(~u(e,"!important")&&10))){case 107:return l(e,":",":"+B)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+B+(45===c(e,14)?"inline-":"")+"box$3$1"+B+"$2$3$1"+N+"$2box$3")+e}break;case 5936:switch(c(e,t+11)){case 114:return B+e+N+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return B+e+N+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return B+e+N+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return B+e+N+e+e}return e}var ne=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case q:e.return=te(e.value,e.length);break;case W:return $([x(e,{value:l(e.value,"@","@"+B)})],r);case U:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return $([x(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return $([x(e,{props:[l(t,/:(plac\w+)/,":"+B+"input-$1")]}),x(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),x(e,{props:[l(t,/:(plac\w+)/,N+"input-$1")]})],r)}return""}))}}],re=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i,o,a=e.stylisPlugins||ne,s={},l=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n{"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{Z:()=>r})},33895:(e,t,n)=>{"use strict";n.d(t,{C:()=>g,E:()=>T,T:()=>b,_:()=>v,a:()=>x,b:()=>k,c:()=>S,h:()=>h,i:()=>p,u:()=>w,w:()=>y});var r=n(2784),i=n(39721),o=n(7896),a=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}},s=n(73463),l=n.n(s),u=function(e,t){return l()(e,t)},c=n(82792),d=n(44188),f=n(82668),p=!0,h={}.hasOwnProperty,m=r.createContext("undefined"!=typeof HTMLElement?(0,i.Z)({key:"css"}):null),g=m.Provider,v=function(){return(0,r.useContext)(m)},y=function(e){return(0,r.forwardRef)((function(t,n){var i=(0,r.useContext)(m);return e(t,i,n)}))};p||(y=function(e){return function(t){var n=(0,r.useContext)(m);return null===n?(n=(0,i.Z)({key:"css"}),r.createElement(m.Provider,{value:n},e(t,n))):e(t,n)}});var b=r.createContext({}),w=function(){return r.useContext(b)},_=a((function(e){return a((function(t){return function(e,t){return"function"==typeof t?t(e):(0,o.Z)({},e,t)}(e,t)}))})),x=function(e){var t=r.useContext(b);return e.theme!==t&&(t=_(t)(e.theme)),r.createElement(b.Provider,{value:t},e.children)};function k(e){var t=e.displayName||e.name||"Component",n=function(t,n){var i=r.useContext(b);return r.createElement(e,(0,o.Z)({theme:i,ref:n},t))},i=r.forwardRef(n);return i.displayName="WithTheme("+t+")",u(i,e)}var E="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",S=function(e,t){var n={};for(var r in t)h.call(t,r)&&(n[r]=t[r]);return n[E]=e,n},C=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,c.hC)(t,n,r),(0,f.L)((function(){return(0,c.My)(t,n,r)})),null},T=y((function(e,t,n){var i=e.css;"string"==typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var o=e[E],a=[i],s="";"string"==typeof e.className?s=(0,c.fp)(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var l=(0,d.O)(a,void 0,r.useContext(b));s+=t.key+"-"+l.name;var u={};for(var f in e)h.call(e,f)&&"css"!==f&&f!==E&&(u[f]=e[f]);return u.ref=n,u.className=s,r.createElement(r.Fragment,null,r.createElement(C,{cache:t,serialized:l,isStringTag:"string"==typeof o}),r.createElement(o,u))}))},28165:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CacheProvider:()=>r.C,ClassNames:()=>h,Global:()=>u,ThemeContext:()=>r.T,ThemeProvider:()=>r.a,__unsafe_useEmotionCache:()=>r._,createElement:()=>l,css:()=>c,jsx:()=>l,keyframes:()=>d,useTheme:()=>r.u,withEmotionCache:()=>r.w,withTheme:()=>r.b});var r=n(33895),i=n(2784),o=n(82792),a=n(82668),s=n(44188),l=(n(39721),n(73463),function(e,t){var n=arguments;if(null==t||!r.h.call(t,"css"))return i.createElement.apply(void 0,n);var o=n.length,a=new Array(o);a[0]=r.E,a[1]=(0,r.c)(e,t);for(var s=2;s{"use strict";n.d(t,{O:()=>h});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(86894),o=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!=typeof e},u=(0,i.Z)((function(e){return s(e)?e:e.replace(o,"-$&").toLowerCase()})),c=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(a,(function(e,t,n){return f={name:t,styles:n,next:f},t}))}return 1===r[e]||s(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return f={name:n.name,styles:n.styles,next:f},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)f={name:r.name,styles:r.styles,next:f},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:u,styles:i,next:f}}},70894:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>v});var r=n(7896),i=n(2784),o=n(86894),a=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=(0,o.Z)((function(e){return a.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=n(33895),u=n(82792),c=n(44188),d=n(82668),f=s,p=function(e){return"theme"!==e},h=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?f:p},m=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},g=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,u.hC)(t,n,r),(0,d.L)((function(){return(0,u.My)(t,n,r)})),null},v=function e(t,n){var o,a,s=t.__emotion_real===t,d=s&&t.__emotion_base||t;void 0!==n&&(o=n.label,a=n.target);var f=m(t,n,s),p=f||h(d),v=!p("as");return function(){var y=arguments,b=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&b.push("label:"+o+";"),null==y[0]||void 0===y[0].raw)b.push.apply(b,y);else{b.push(y[0][0]);for(var w=y.length,_=1;_{"use strict";var r;n.d(t,{L:()=>a,j:()=>s});var i=n(2784),o=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,a=o||function(e){return e()},s=o||i.useLayoutEffect},82792:(e,t,n)=>{"use strict";function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}n.d(t,{My:()=>o,fp:()=>r,hC:()=>i});var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},o=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}},55034:(e,t,n)=>{"use strict";const r=n(11976),i=n.g.Date;class o extends i{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${r(2,this.getUTCMonth()+1)}-${r(2,this.getUTCDate())}`}}e.exports=e=>{const t=new o(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},59697:(e,t,n)=>{"use strict";const r=n(11976);class i extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){return`${this.getUTCFullYear()}-${r(2,this.getUTCMonth()+1)}-${r(2,this.getUTCDate())}T${r(2,this.getUTCHours())}:${r(2,this.getUTCMinutes())}:${r(2,this.getUTCSeconds())}.${r(3,this.getUTCMilliseconds())}`}}e.exports=e=>{const t=new i(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},12446:e=>{"use strict";e.exports=e=>{const t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},70256:(e,t,n)=>{"use strict";const r=n(11976);class i extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${r(2,this.getUTCHours())}:${r(2,this.getUTCMinutes())}:${r(2,this.getUTCSeconds())}.${r(3,this.getUTCMilliseconds())}`}}e.exports=e=>{const t=new i(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},11976:e=>{"use strict";e.exports=(e,t)=>{for(t=String(t);t.length{"use strict";const t=1114112;class n extends Error{constructor(e,t,r){super("[ParserError] "+e,t,r),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,n)}}class r{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}}class i{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new r(this.parseStart)}parse(e){if(0===e.length||null==e.length)return;let t;for(this._buf=String(e),this.ii=-1,this.char=-1;!1===t||this.nextChar();)t=this.runOne();this._buf=null}nextChar(){return 10===this.char&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii{"use strict";module.exports=makeParserClass(__webpack_require__(86056)),module.exports.makeParserClass=makeParserClass;class TomlError extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,TomlError),this.fromTOML=!0,this.wrapped=null}}TomlError.wrap=e=>{const t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t},module.exports.TomlError=TomlError;const createDateTime=__webpack_require__(12446),createDateTimeFloat=__webpack_require__(59697),createDate=__webpack_require__(55034),createTime=__webpack_require__(70256),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:"\t",[CHAR_n]:"\n",[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}const _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return!!hasOwnProperty.call(e,t)||("__proto__"===t&&defineProperty(e,"__proto__",descriptor),!1)}const INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_TABLE}const TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return null!==e&&"object"==typeof e&&e[_type]===TABLE}const _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_LIST}const LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return null!==e&&"object"==typeof e&&e[_type]===LIST}let _custom;try{const utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}const _inspect=_custom||"inspect";class BoxedBigInt{constructor(e){try{this.value=__webpack_require__.g.BigInt.asIntN(64,e)}catch(e){this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return null===this.value}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}}const INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),__webpack_require__.g.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return null!==e&&"object"==typeof e&&e[_type]===INTEGER}const FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return null!==e&&"object"==typeof e&&e[_type]===FLOAT}function tomlType(e){const t=typeof e;if("object"===t){if(null===e)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){return class extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(e){let t=this.ctx,n=e.key.pop();for(let n of e.key){if(hasKey(t,n)&&(!isTable(t[n])||t[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[n]=t[n]||Table()}if(hasKey(t,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[n]=e.value.valueOf():t[n]=e.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(e){return this.state.resultTable?this.state.resultTable.push(e):this.state.resultTable=[e],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){return this.char===CHAR_PERIOD?this.next(this.parseAssignKeywordPostDot):this.char!==CHAR_SP&&this.char!==CTRL_I?this.goto(this.parseAssignEqual):void 0}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(e){return this.returnNow({key:this.state.resultTable,value:e})}parseComment(){do{if(this.char===e.END||this.char===CTRL_J)return this.return()}while(this.nextChar())}parseTableOrList(){if(this.char!==CHAR_LSQB)return this.goto(this.parseTable);this.next(this.parseList)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)&&(!isTable(this.ctx[e])||this.ctx[e][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[e]=this.ctx[e]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e))if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else{if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine existing key"));this.ctx=this.ctx[e][this.ctx[e].length-1]}else this.ctx=this.ctx[e]=Table();return this.next(this.parseTableNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)||(this.ctx[e]=List()),isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));{const t=Table();this.ctx[e].push(t),this.ctx=t}return this.next(this.parseListEnd)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e)){if(isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else{if(!isTable(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));this.ctx=this.ctx[e]}}else this.ctx=this.ctx[e]=Table();return this.next(this.parseListNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(e){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(e){return this.returnNow(e)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return"-"===this.state.buf?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(!isAlphaNumHyphen(this.char)){if(0===this.state.buf.length)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}this.consume()}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let e="\\u00";return this.char<16&&(e+="0"),e+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${e} instead`))}recordMultiEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(e){try{const t=parseInt(e,16);if(t>=SURROGATE_FIRST&&t<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(t))}catch(e){throw this.error(TomlError.wrap(e))}}parseSmallUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=4)return this.return()}parseLargeUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=8)return this.return()}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(!isDigit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberFloat):isDigit(this.char)?void this.consume():this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS)throw this.error(new TomlError("Unexpected character, expected -, + or digit"));this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent)}parseNumberExponent(){if(!isDigit(this.char))return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf));this.consume()}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberInteger):isDigit(this.char)?(this.consume(),void(this.state.buf.length>4&&this.next(this.parseNumberInteger))):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(!isHexit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerOct(){if(!isOctit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerBin(){if(!isBit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseTimeMin(){if(!(this.state.buf.length<2&&isDigit(this.char))){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}this.consume()}parseTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));if(this.consume(),2===this.state.buf.length)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(!(this.state.buf.length<2&&isDigit(this.char))){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}this.consume()}parseOnlyTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete time"));if(this.consume(),2===this.state.buf.length)return this.next(this.parseOnlyTimeFractionMaybe)}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char!==CHAR_PERIOD)return this.return(createTime(this.state.result));this.state.buf="",this.next(this.parseOnlyTimeFraction)}parseOnlyTimeFraction(){if(!isDigit(this.char)){if(this.atEndOfWord()){if(0===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume()}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else{if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(1===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseTimeZoneHour(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}parseTimeZoneSep(){if(this.char!==CHAR_COLON)throw this.error(new TomlError("Unexpected character in datetime, expected colon"));this.consume(),this.next(this.parseTimeZoneMin)}parseTimeZoneMin(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}parseBoolean(){return this.char===CHAR_t?(this.consume(),this.next(this.parseTrue_r)):this.char===CHAR_f?(this.consume(),this.next(this.parseFalse_a)):void 0}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(e){if(this.state.resultArr){const t=this.state.resultArr[_contentType],n=tomlType(e);if(t!==n)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${t} and ${n}`))}else this.state.resultArr=InlineList(tomlType(e));return isFloat(e)||isInteger(e)?this.state.resultArr.push(e.valueOf()):this.state.resultArr.push(e),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(e){let t=this.state.resultTable,n=e.key.pop();for(let n of e.key){if(hasKey(t,n)&&(!isTable(t[n])||t[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[n]=t[n]||Table()}if(hasKey(t,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[n]=e.value.valueOf():t[n]=e.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}}},66615:(e,t,n)=>{"use strict";e.exports=function(e,t){t||(t={});const n=t.blocksize||40960,o=new r;return new Promise(((e,t)=>{setImmediate(a,0,n,e,t)}));function a(t,n,r,s){if(t>=e.length)try{return r(o.finish())}catch(t){return s(i(t,e))}try{o.parse(e.slice(t,t+n)),setImmediate(a,t+n,n,r,s)}catch(t){s(i(t,e))}}};const r=n(77146),i=n(53146)},53146:e=>{"use strict";e.exports=function(e,t){if(null==e.pos||null==e.line)return e;let n=e.message;if(n+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:\n`,t&&t.split){const r=t.split(/\n/),i=String(Math.min(r.length,e.line+3)).length;let o=" ";for(;o.length "+r[t]+"\n",n+=o+" ";for(let t=0;t{"use strict";e.exports=function(e){return e?function(e){const t=new i;return e.setEncoding("utf8"),new Promise(((n,r)=>{let i,o=!1,a=!1;function s(){if(o=!0,!i)try{n(t.finish())}catch(e){r(e)}}function l(e){a=!0,r(e)}e.once("end",s),e.once("error",l),function n(){let r;for(i=!0;null!==(r=e.read());)try{t.parse(r)}catch(e){return l(e)}if(i=!1,o)return s();a||e.once("readable",n)}()}))}(e):function(){const e=new i;return new r.Transform({objectMode:!0,transform(t,n,r){try{e.parse(t.toString(n))}catch(e){this.emit("error",e)}r()},flush(t){try{this.push(e.finish())}catch(e){this.emit("error",e)}t()}})}()};const r=n(54851),i=n(77146)},13475:(e,t,n)=>{"use strict";e.exports=function(e){n.g.Buffer&&n.g.Buffer.isBuffer(e)&&(e=e.toString("utf8"));const t=new r;try{return t.parse(e),t.finish()}catch(t){throw i(t,e)}};const r=n(77146),i=n(53146)},53279:(e,t,n)=>{"use strict";e.exports=n(13475),e.exports.async=n(66615),e.exports.stream=n(24312),e.exports.prettyError=n(53146)},57573:e=>{"use strict";function t(e){return new Error("Can only stringify objects, not "+e)}function n(e){return Object.keys(e).filter((t=>o(e[t])))}function r(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let n of Object.keys(e))e[n]&&"function"==typeof e[n].toJSON&&!("toISOString"in e[n])?t[n]=e[n].toJSON():t[n]=e[n];return t}function i(e,l,u){var d,f;d=n(u=r(u)),f=function(e){return Object.keys(e).filter((t=>!o(e[t])))}(u);var h=[],m=l||"";d.forEach((e=>{var t=a(u[e]);"undefined"!==t&&"null"!==t&&h.push(m+s(e)+" = "+c(u[e],!0))})),h.length>0&&h.push("");var g=e&&d.length>0?l+" ":"";return f.forEach((o=>{h.push(function(e,o,l,u){var c=a(u);if("array"===c)return function(e,n,o,l){p(l=r(l));var u=a(l[0]);if("table"!==u)throw t(u);var c=e+s(o),d="";return l.forEach((e=>{d.length>0&&(d+="\n"),d+=n+"[["+c+"]]\n",d+=i(c+".",n,e)})),d}(e,o,l,u);if("table"===c)return function(e,t,r,o){var a=e+s(r),l="";return n(o).length>0&&(l+=t+"["+a+"]\n"),l+i(a+".",t,o)}(e,o,l,u);throw t(c)}(e,g,o,u[o]))})),h.join("\n")}function o(e){switch(a(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return 0===e.length||"table"!==a(e[0]);case"table":return 0===Object.keys(e).length;default:return!1}}function a(e){return void 0===e?"undefined":null===e?"null":"bigint"==typeof e||Number.isInteger(e)&&!Object.is(e,-0)?"integer":"number"==typeof e?"float":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"toISOString"in e?isNaN(e)?"undefined":"datetime":Array.isArray(e)?"array":"table"}function s(e){var t=String(e);return/^[-A-Za-z0-9_]+$/.test(t)?t:l(t)}function l(e){return'"'+u(e).replace(/"/g,'\\"')+'"'}function u(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,(e=>"\\u"+function(e,t){for(;t.length<4;)t="0"+t;return t}(0,e.codePointAt(0).toString(16))))}function c(e,t){let n=a(e);return"string"===n&&(t&&/\n/.test(e)?n="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(n="string-literal")),d(e,n)}function d(e,n){switch(n||(n=a(e)),n){case"string-multiline":return function(e){let t=e.split(/\n/).map((e=>u(e).replace(/"(?="")/g,'\\"'))).join("\n");return'"'===t.slice(-1)&&(t+="\\\n"),'"""\n'+t+'"""'}(e);case"string":return l(e);case"string-literal":return"'"+e+"'";case"integer":return f(e);case"float":return function(e){if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Object.is(e,NaN))return"nan";if(Object.is(e,-0))return"-0.0";var t=String(e).split("."),n=t[0],r=t[1]||0;return f(n)+"."+r}(e);case"boolean":return function(e){return String(e)}(e);case"datetime":return function(e){return e.toISOString()}(e);case"array":return function(e){const t=p(e=r(e));var n="[",i=e.map((e=>d(e,t)));return i.join(", ").length>60||/\n/.test(i)?n+="\n "+i.join(",\n ")+"\n":n+=" "+i.join(", ")+(i.length>0?" ":""),n+"]"}(e.filter((e=>"null"!==a(e)&&"undefined"!==a(e)&&"nan"!==a(e))));case"table":return function(e){e=r(e);var t=[];return Object.keys(e).forEach((n=>{t.push(s(n)+" = "+c(e[n],!1))})),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}(e);default:throw t(n)}}function f(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function p(e){const t=function(e){var t=a(e[0]);return e.every((e=>a(e)===t))?t:e.every((e=>{return"float"===(t=a(e))||"integer"===t;var t}))?"float":"mixed"}(e);if("mixed"===t)throw new Error("Array values can't have mixed types");return t}e.exports=function(e){if(null===e)throw t("null");if(void 0===e)throw t("undefined");if("object"!=typeof e)throw t(typeof e);if("function"==typeof e.toJSON&&(e=e.toJSON()),null==e)return null;const n=a(e);if("table"!==n)throw t(n);return i("","",e)},e.exports.value=d},6901:(e,t,n)=>{"use strict";t.parse=n(53279),t.stringify=n(57573)},47988:(e,t,n)=>{"use strict";var r,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:a,height:l},c)},d),o.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},16331:(e,t,n)=>{"use strict";var r,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:a,height:l},c)},d),o.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},38229:(e,t,n)=>{"use strict";n.d(t,{D:()=>s});var r=Object.prototype,i=r.toString,o=r.hasOwnProperty,a=new Map;function s(e,t){try{return l(e,t)}finally{a.clear()}}function l(e,t){if(e===t)return!0;var n=i.call(e);if(n!==i.call(t))return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(u(e,t))return!0;var r=Object.keys(e),a=Object.keys(t),s=r.length;if(s!==a.length)return!1;for(var c=0;c{"use strict";n.r(t),n.d(t,{HeuristicFragmentMatcher:()=>V,InMemoryCache:()=>pe,IntrospectionFragmentMatcher:()=>G,ObjectCache:()=>te,StoreReader:()=>X,StoreWriter:()=>oe,WriteError:()=>re,assertIdValue:()=>ee,defaultDataIdFromObject:()=>ce,defaultNormalizedCacheFactory:()=>ne,enhanceErrorWithDocument:()=>ie});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;nthis.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),_=new y,x=[],k=[],E=100;function S(e,t){if(!e)throw new Error(t||"assertion failure")}function C(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var T=function(){function e(t,n){this.fn=t,this.args=n,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],++e.count}return e.prototype.recompute=function(){if(S(!this.recomputing,"already recomputing"),function(e){var t=_.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),A(e)?D(t,e):M(t,e),t}(this)||!L(this))return A(this)?(t=j(e=this),_.withValue(e,O,[e]),function(e){if("function"==typeof e.subscribe)try{F(e),e.unsubscribe=e.subscribe.apply(null,e.args)}catch(t){return e.setDirty(),!1}return!0}(e)&&function(e){e.dirty=!1,A(e)||R(e)}(e),t.forEach(L),C(e.value)):C(this.value);var e,t},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,P(this),F(this))},e.prototype.dispose=function(){var e=this;j(this).forEach(L),F(this),this.parents.forEach((function(t){t.setDirty(),N(t,e)}))},e.count=0,e}();function O(e){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,e.args)}catch(t){e.value[1]=t}e.recomputing=!1}function A(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function P(e){e.parents.forEach((function(t){return D(t,e)}))}function R(e){e.parents.forEach((function(t){return M(t,e)}))}function D(e,t){if(S(e.childValues.has(t)),S(A(t)),e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=k.pop()||new Set;e.dirtyChildren.add(t),P(e)}function M(e,t){S(e.childValues.has(t)),S(!A(t));var n,r,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(n=o,r=t.value,(i=n.length)>0&&i===r.length&&n[i-1]===r[i-1]||e.setDirty()),I(e,t),A(e)||R(e)}function I(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(k.length0&&(t=[],e.childValues.forEach((function(n,r){N(e,r),t.push(r)}))),S(null===e.dirtyChildren),t}function N(e,t){t.parents.delete(e),e.childValues.delete(t),I(e,t)}function F(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var B=function(){function e(e){this.weakness=e}return e.prototype.lookup=function(){for(var e=[],t=0;t-1)},e.prototype.parseIntrospectionResult=function(e){var t={};return e.__schema.types.forEach((function(e){"UNION"!==e.kind&&"INTERFACE"!==e.kind||(t[e.name]=e.possibleTypes.map((function(e){return e.name})))})),t},e}(),K=Object.prototype.hasOwnProperty,Z=function(){function e(e){var t=this;void 0===e&&(e=Object.create(null)),this.data=e,this.depend=W((function(e){return t.data[e]}),{disposable:!0,makeCacheKey:function(e){return e}})}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.depend(e),this.data[e]},e.prototype.set=function(e,t){t!==this.data[e]&&(this.data[e]=t,this.depend.dirty(e))},e.prototype.delete=function(e){K.call(this.data,e)&&(delete this.data[e],this.depend.dirty(e))},e.prototype.clear=function(){this.replace(null)},e.prototype.replace=function(e){var t=this;e?(Object.keys(e).forEach((function(n){t.set(n,e[n])})),Object.keys(this.data).forEach((function(n){K.call(e,n)||t.delete(n)}))):Object.keys(this.data).forEach((function(e){t.delete(e)}))},e}();function Y(e){return new Z(e)}var X=function(){function e(e){var t=this,n=void 0===e?{}:e,r=n.cacheKeyRoot,i=void 0===r?new B(a.mr):r,o=n.freezeResults,s=void 0!==o&&o,l=this,u=l.executeStoreQuery,c=l.executeSelectionSet,d=l.executeSubSelectedArray;this.freezeResults=s,this.executeStoreQuery=W((function(e){return u.call(t,e)}),{makeCacheKey:function(e){var t=e.query,n=e.rootValue,r=e.contextValue,o=e.variableValues,a=e.fragmentMatcher;if(r.store instanceof Z)return i.lookup(r.store,t,a,JSON.stringify(o),n.id)}}),this.executeSelectionSet=W((function(e){return c.call(t,e)}),{makeCacheKey:function(e){var t=e.selectionSet,n=e.rootValue,r=e.execContext;if(r.contextValue.store instanceof Z)return i.lookup(r.contextValue.store,t,r.fragmentMatcher,JSON.stringify(r.variableValues),n.id)}}),this.executeSubSelectedArray=W((function(e){return d.call(t,e)}),{makeCacheKey:function(e){var t=e.field,n=e.array,r=e.execContext;if(r.contextValue.store instanceof Z)return i.lookup(r.contextValue.store,t,n,JSON.stringify(r.variableValues))}})}return e.prototype.readQueryFromStore=function(e){return this.diffQueryAgainstStore(o(o({},e),{returnPartialData:!1})).result},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,r=e.variables,i=e.previousResult,o=e.returnPartialData,s=void 0===o||o,l=e.rootId,u=void 0===l?"ROOT_QUERY":l,c=e.fragmentMatcherFunction,d=e.config,p=(0,a.iW)(n);r=(0,a.f0)({},(0,a.O4)(p),r);var h={store:t,dataIdFromObject:d&&d.dataIdFromObject,cacheRedirects:d&&d.cacheRedirects||{}},m=this.executeStoreQuery({query:n,rootValue:{type:"id",id:u,generated:!0,typename:"Query"},contextValue:h,variableValues:r,fragmentMatcher:c}),g=m.missing&&m.missing.length>0;return g&&!s&&m.missing.forEach((function(e){if(!e.tolerable)throw new $.ej(8)})),i&&(0,f.D)(i,m.result)&&(m.result=i),{result:m.result,complete:!g}},e.prototype.executeStoreQuery=function(e){var t=e.query,n=e.rootValue,r=e.contextValue,i=e.variableValues,o=e.fragmentMatcher,s=void 0===o?J:o,l=(0,a.p$)(t),u=(0,a.kU)(t),c={query:t,fragmentMap:(0,a.F)(u),contextValue:r,variableValues:i,fragmentMatcher:s};return this.executeSelectionSet({selectionSet:l.selectionSet,rootValue:n,execContext:c})},e.prototype.executeSelectionSet=function(e){var t=this,n=e.selectionSet,r=e.rootValue,i=e.execContext,s=i.fragmentMap,l=i.contextValue,u=i.variableValues,c={result:null},d=[],f=l.store.get(r.id),p=f&&f.__typename||"ROOT_QUERY"===r.id&&"Query"||void 0;function h(e){var t;return e.missing&&(c.missing=c.missing||[],(t=c.missing).push.apply(t,e.missing)),e.result}return n.selections.forEach((function(e){var n;if((0,a.LZ)(e,u))if((0,a.My)(e)){var c=h(t.executeField(f,p,e,i));void 0!==c&&d.push(((n={})[(0,a.u2)(e)]=c,n))}else{var m=void 0;if((0,a.Ao)(e))m=e;else if(!(m=s[e.name.value]))throw new $.ej(9);var g=m.typeCondition&&m.typeCondition.name.value,v=!g||i.fragmentMatcher(r,g,l);if(v){var y=t.executeSelectionSet({selectionSet:m.selectionSet,rootValue:r,execContext:i});"heuristic"===v&&y.missing&&(y=o(o({},y),{missing:y.missing.map((function(e){return o(o({},e),{tolerable:!0})}))})),d.push(h(y))}}})),c.result=(0,a.bw)(d),this.freezeResults,c},e.prototype.executeField=function(e,t,n,r){var i=r.variableValues,o=r.contextValue,s=function(e,t,n,r,i,o){var s=o.directives,l=n;(r||s)&&(l=(0,a.PT)(l,r,s));var u=void 0;if(e&&void 0===(u=e[l])&&i.cacheRedirects&&"string"==typeof t){var c=i.cacheRedirects[t];if(c){var d=c[n];d&&(u=d(e,r,{getCacheKey:function(e){var t=i.dataIdFromObject(e);return t&&(0,a.aX)({id:t,typename:e.__typename})}}))}}return void 0===u?{result:u,missing:[{object:e,fieldName:l,tolerable:!1}]}:((0,a.v4)(u)&&(u=u.json),{result:u})}(e,t,n.name.value,(0,a.NC)(n,i),o,{resultKey:(0,a.u2)(n),directives:(0,a.Qy)(n,i)});return Array.isArray(s.result)?this.combineExecResults(s,this.executeSubSelectedArray({field:n,array:s.result,execContext:r})):n.selectionSet?null==s.result?s:this.combineExecResults(s,this.executeSelectionSet({selectionSet:n.selectionSet,rootValue:s.result,execContext:r})):(Q(n,s.result),this.freezeResults,s)},e.prototype.combineExecResults=function(){for(var e,t=[],n=0;n=0)return!0;n[e].push(t)}else n[e]=[t];return!1}var ue={fragmentMatcher:new V,dataIdFromObject:ce,addTypename:!0,resultCaching:!0,freezeResults:!1};function ce(e){if(e.__typename){if(void 0!==e.id)return e.__typename+":"+e.id;if(void 0!==e._id)return e.__typename+":"+e._id}return null}var de=Object.prototype.hasOwnProperty,fe=function(e){function t(t,n,r){var i=e.call(this,Object.create(null))||this;return i.optimisticId=t,i.parent=n,i.transaction=r,i}return i(t,e),t.prototype.toObject=function(){return o(o({},this.parent.toObject()),this.data)},t.prototype.get=function(e){return de.call(this.data,e)?this.data[e]:this.parent.get(e)},t}(te),pe=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;n.watches=new Set,n.typenameDocumentCache=new Map,n.cacheKeyRoot=new B(a.mr),n.silenceBroadcast=!1,n.config=o(o({},ue),t),n.config.customResolvers&&(n.config.cacheRedirects=n.config.customResolvers),n.config.cacheResolvers&&(n.config.cacheRedirects=n.config.cacheResolvers),n.addTypename=!!n.config.addTypename,n.data=n.config.resultCaching?new Z:new te,n.optimisticData=n.data,n.storeWriter=new oe,n.storeReader=new X({cacheKeyRoot:n.cacheKeyRoot,freezeResults:t.freezeResults});var r=n,i=r.maybeBroadcastWatch;return n.maybeBroadcastWatch=W((function(e){return i.call(n,e)}),{makeCacheKey:function(e){if(!e.optimistic&&!e.previousResult)return r.data instanceof Z?r.cacheKeyRoot.lookup(e.query,JSON.stringify(e.variables)):void 0}}),n}return i(t,e),t.prototype.restore=function(e){return e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).toObject()},t.prototype.read=function(e){if("string"==typeof e.rootId&&void 0===this.data.get(e.rootId))return null;var t=this.config.fragmentMatcher,n=t&&t.match;return this.storeReader.readQueryFromStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,rootId:e.rootId,fragmentMatcherFunction:n,previousResult:e.previousResult,config:this.config})||null},t.prototype.write=function(e){var t=this.config.fragmentMatcher,n=t&&t.match;this.storeWriter.writeResultToStore({dataId:e.dataId,result:e.result,variables:e.variables,document:this.transformDocument(e.query),store:this.data,dataIdFromObject:this.config.dataIdFromObject,fragmentMatcherFunction:n}),this.broadcastWatches()},t.prototype.diff=function(e){var t=this.config.fragmentMatcher,n=t&&t.match;return this.storeReader.diffQueryAgainstStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,returnPartialData:e.returnPartialData,previousResult:e.previousResult,fragmentMatcherFunction:n,config:this.config})},t.prototype.watch=function(e){var t=this;return this.watches.add(e),function(){t.watches.delete(e)}},t.prototype.evict=function(e){throw new $.ej(7)},t.prototype.reset=function(){return this.data.clear(),this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){for(var t=[],n=0,r=this.optimisticData;r instanceof fe;)r.optimisticId===e?++n:t.push(r),r=r.parent;if(n>0){for(this.optimisticData=r;t.length>0;){var i=t.pop();this.performTransaction(i.transaction,i.optimisticId)}this.broadcastWatches()}},t.prototype.performTransaction=function(e,t){var n=this.data,r=this.silenceBroadcast;this.silenceBroadcast=!0,"string"==typeof t&&(this.data=this.optimisticData=new fe(t,this.optimisticData,e));try{e(this)}finally{this.silenceBroadcast=r,this.data=n}this.broadcastWatches()},t.prototype.recordOptimisticTransaction=function(e,t){return this.performTransaction(e,t)},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=(0,a.Gw)(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(){var e=this;this.silenceBroadcast||this.watches.forEach((function(t){return e.maybeBroadcastWatch(t)}))},t.prototype.maybeBroadcastWatch=function(e){e.callback(this.diff({query:e.query,variables:e.variables,previousResult:e.previousResult&&e.previousResult(),optimistic:e.optimistic}))},t}(d)},34600:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ApolloClient:()=>M,ApolloError:()=>_,FetchType:()=>w,NetworkStatus:()=>l,ObservableQuery:()=>x,default:()=>I,isApolloError:()=>b});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0}function b(e){return e.hasOwnProperty("graphQLErrors")}var w,_=function(e){function t(n){var r,i,o=n.graphQLErrors,a=n.networkError,s=n.errorMessage,l=n.extraInfo,u=e.call(this,s)||this;return u.graphQLErrors=o||[],u.networkError=a||null,u.message=s||(i="",y((r=u).graphQLErrors)&&r.graphQLErrors.forEach((function(e){var t=e?e.message:"Error message not found.";i+="GraphQL error: "+t+"\n"})),r.networkError&&(i+="Network error: "+r.networkError.message+"\n"),i=i.replace(/\n$/,"")),u.extraInfo=l,u.__proto__=t.prototype,u}return i(t,e),t}(Error);!function(e){e[e.normal=1]="normal",e[e.refetch=2]="refetch",e[e.poll=3]="poll"}(w||(w={}));var x=function(e){function t(t){var n=t.queryManager,r=t.options,i=t.shouldSubscribe,o=void 0===i||i,a=e.call(this,(function(e){return a.onSubscribe(e)}))||this;a.observers=new Set,a.subscriptions=new Set,a.isTornDown=!1,a.options=r,a.variables=r.variables||{},a.queryId=n.generateQueryId(),a.shouldSubscribe=o;var s=(0,u.$H)(r.query);return a.queryName=s&&s.name&&s.name.value,a.queryManager=n,a}return i(t,e),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:n},i=e.subscribe(r)}))},t.prototype.currentResult=function(){var e=this.getCurrentResult();return void 0===e.data&&(e.data={}),e},t.prototype.getCurrentResult=function(){if(this.isTornDown){var e=this.lastResult;return{data:!this.lastError&&e&&e.data||void 0,error:this.lastError,loading:!1,networkStatus:l.error}}var t,n,r,i=this.queryManager.getCurrentQueryResult(this),a=i.data,s=i.partial,u=this.queryManager.queryStore.get(this.queryId),c=this.options.fetchPolicy,d="network-only"===c||"no-cache"===c;if(u){var f=u.networkStatus;if(n=u,void 0===(r=this.options.errorPolicy)&&(r="none"),n&&(n.networkError||"none"===r&&y(n.graphQLErrors)))return{data:void 0,loading:!1,networkStatus:f,error:new _({graphQLErrors:u.graphQLErrors,networkError:u.networkError})};u.variables&&(this.options.variables=o(o({},this.options.variables),u.variables),this.variables=this.options.variables),t={data:a,loading:g(f),networkStatus:f},u.graphQLErrors&&"all"===this.options.errorPolicy&&(t.errors=u.graphQLErrors)}else{var p=d||s&&"cache-only"!==c;t={data:a,loading:p,networkStatus:p?l.loading:l.ready}}return s||this.updateLastResult(o(o({},t),{stale:!1})),o(o({},t),{partial:s})},t.prototype.isDifferentFromLastResult=function(e){var t=this.lastResultSnapshot;return!(t&&e&&t.networkStatus===e.networkStatus&&t.stale===e.stale&&(0,c.D)(t.data,e.data))},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){var e=this.queryManager.queryStore.get(this.queryId);e&&(e.networkError=null,e.graphQLErrors=[])},t.prototype.refetch=function(e){var t=this.options.fetchPolicy;return"cache-only"===t?Promise.reject(new h.ej(1)):("no-cache"!==t&&"cache-and-network"!==t&&(t="network-only"),(0,c.D)(this.variables,e)||(this.variables=o(o({},this.variables),e)),(0,c.D)(this.options.variables,this.variables)||(this.options.variables=o(o({},this.options.variables),this.variables)),this.queryManager.fetchQuery(this.queryId,o(o({},this.options),{fetchPolicy:t}),w.refetch))},t.prototype.fetchMore=function(e){var t=this;(0,h.kG)(e.updateQuery,2);var n=o(o({},e.query?e:o(o(o({},this.options),e),{variables:o(o({},this.variables),e.variables)})),{fetchPolicy:"network-only"}),r=this.queryManager.generateQueryId();return this.queryManager.fetchQuery(r,n,w.normal,this.queryId).then((function(i){return t.updateQuery((function(t){return e.updateQuery(t,{fetchMoreResult:i.data,variables:n.variables})})),t.queryManager.stopQuery(r),i}),(function(e){throw t.queryManager.stopQuery(r),e}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var i=t.variables;return r(e,{subscriptionData:n,variables:i})}))},error:function(t){e.onError&&e.onError(t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){var t=this.options.fetchPolicy;this.options=o(o({},this.options),e),e.pollInterval?this.startPolling(e.pollInterval):0===e.pollInterval&&this.stopPolling();var n=e.fetchPolicy;return this.setVariables(this.options.variables,t!==n&&("cache-only"===t||"standby"===t||"network-only"===n),e.fetchResults)},t.prototype.setVariables=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=!0),this.isTornDown=!1,e=e||this.variables,!t&&(0,c.D)(e,this.variables)?this.observers.size&&n?this.result():Promise.resolve():(this.variables=this.options.variables=e,this.observers.size?this.queryManager.fetchQuery(this.queryId,this.options):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,n=t.getQueryWithPreviousResult(this.queryId),r=n.previousResult,i=n.variables,o=n.document,a=(0,u.XY)((function(){return e(r,{variables:i})}));a&&(t.dataStore.markUpdateQueryResult(o,i,a),t.broadcastQueries())},t.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},t.prototype.startPolling=function(e){S(this),this.options.pollInterval=e,this.queryManager.startPollingQuery(this.options,this.queryId)},t.prototype.updateLastResult=function(e){var t=this.lastResult;return this.lastResult=e,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?e:(0,u.Xh)(e),t},t.prototype.onSubscribe=function(e){var t=this;try{var n=e._subscription._observer;n&&!n.error&&(n.error=k)}catch(e){}var r=!this.observers.size;return this.observers.add(e),e.next&&this.lastResult&&e.next(this.lastResult),e.error&&this.lastError&&e.error(this.lastError),r&&this.setUpQuery(),function(){t.observers.delete(e)&&!t.observers.size&&t.tearDownQuery()}},t.prototype.setUpQuery=function(){var e=this,t=this.queryManager,n=this.queryId;this.shouldSubscribe&&t.addObservableQuery(n,this),this.options.pollInterval&&(S(this),t.startPollingQuery(this.options,n));var r=function(t){e.updateLastResult(o(o({},e.lastResult),{errors:t.graphQLErrors,networkStatus:l.error,loading:!1})),E(e.observers,"error",e.lastError=t)};t.observeQuery(n,this.options,{next:function(n){if(e.lastError||e.isDifferentFromLastResult(n)){var r=e.updateLastResult(n),i=e.options,o=i.query,a=i.variables,s=i.fetchPolicy;t.transform(o).hasClientExports?t.getLocalState().addExportedVariables(o,a).then((function(i){var a=e.variables;e.variables=e.options.variables=i,!n.loading&&r&&"cache-only"!==s&&t.transform(o).serverQuery&&!(0,c.D)(a,i)?e.refetch():E(e.observers,"next",n)})):E(e.observers,"next",n)}},error:r}).catch(r)},t.prototype.tearDownQuery=function(){var e=this.queryManager;this.isTornDown=!0,e.stopPollingQuery(this.queryId),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),e.removeObservableQuery(this.queryId),e.stopQuery(this.queryId),this.observers.clear()},t}(v);function k(e){}function E(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}function S(e){var t=e.options.fetchPolicy;(0,h.kG)("cache-first"!==t&&"cache-only"!==t,3)}var C=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initMutation=function(e,t,n){this.store[e]={mutation:t,variables:n||{},loading:!0,error:null}},e.prototype.markMutationError=function(e,t){var n=this.store[e];n&&(n.loading=!1,n.error=t)},e.prototype.markMutationResult=function(e){var t=this.store[e];t&&(t.loading=!1,t.error=null)},e.prototype.reset=function(){this.store={}},e}(),T=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initQuery=function(e){var t=this.store[e.queryId];(0,h.kG)(!t||t.document===e.document||(0,c.D)(t.document,e.document),19);var n,r=!1,i=null;e.storePreviousVariables&&t&&t.networkStatus!==l.loading&&((0,c.D)(t.variables,e.variables)||(r=!0,i=t.variables)),n=r?l.setVariables:e.isPoll?l.poll:e.isRefetch?l.refetch:l.loading;var o=[];t&&t.graphQLErrors&&(o=t.graphQLErrors),this.store[e.queryId]={document:e.document,variables:e.variables,previousVariables:i,networkError:null,graphQLErrors:o,networkStatus:n,metadata:e.metadata},"string"==typeof e.fetchMoreForQueryId&&this.store[e.fetchMoreForQueryId]&&(this.store[e.fetchMoreForQueryId].networkStatus=l.fetchMore)},e.prototype.markQueryResult=function(e,t,n){this.store&&this.store[e]&&(this.store[e].networkError=null,this.store[e].graphQLErrors=y(t.errors)?t.errors:[],this.store[e].previousVariables=null,this.store[e].networkStatus=l.ready,"string"==typeof n&&this.store[n]&&(this.store[n].networkStatus=l.ready))},e.prototype.markQueryError=function(e,t,n){this.store&&this.store[e]&&(this.store[e].networkError=t,this.store[e].networkStatus=l.error,"string"==typeof n&&this.markQueryResultClient(n,!0))},e.prototype.markQueryResultClient=function(e,t){var n=this.store&&this.store[e];n&&(n.networkError=null,n.previousVariables=null,t&&(n.networkStatus=l.ready))},e.prototype.stopQuery=function(e){delete this.store[e]},e.prototype.reset=function(e){var t=this;Object.keys(this.store).forEach((function(n){e.indexOf(n)<0?t.stopQuery(n):t.store[n].networkStatus=l.loading}))},e}(),O=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=(0,u.Ee)(t.resolvers,e)})):this.resolvers=(0,u.Ee)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,i=e.variables,l=e.onlyRunForcedResolvers,u=void 0!==l&&l;return a(this,void 0,void 0,(function(){return s(this,(function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,u).then((function(e){return o(o({},n),{data:e.result})}))]:[2,n]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return(0,u.FS)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return this.resolvers?(0,u.ob)(e):e},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.cache;return o(o({},e),{cache:t,getCacheKey:function(e){if(t.config)return t.config.dataIdFromObject(e);(0,h.kG)(!1,6)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),a(this,void 0,void 0,(function(){return s(this,(function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return o(o({},t),e.exportedVariables)}))]:[2,o({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,m.visit)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return m.BREAK}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:(0,u.aL)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,i,l){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=function(){return!0}),void 0===l&&(l=!1),a(this,void 0,void 0,(function(){var a,c,d,f,p,h,m,g,v;return s(this,(function(s){var y;return a=(0,u.p$)(e),c=(0,u.kU)(e),d=(0,u.F)(c),f=a.operation,p=f?(y=f).charAt(0).toUpperCase()+y.slice(1):"Query",m=(h=this).cache,g=h.client,v={fragmentMap:d,context:o(o({},n),{cache:m,client:g}),variables:r,fragmentMatcher:i,defaultOperationType:p,exportedVariables:{},onlyRunForcedResolvers:l},[2,this.resolveSelectionSet(a.selectionSet,t,v).then((function(e){return{result:e,exportedVariables:v.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return a(this,void 0,void 0,(function(){var r,i,o,l,c,d=this;return s(this,(function(f){return r=n.fragmentMap,i=n.context,o=n.variables,l=[t],c=function(e){return a(d,void 0,void 0,(function(){var a,c;return s(this,(function(s){return(0,u.LZ)(e,o)?(0,u.My)(e)?[2,this.resolveField(e,t,n).then((function(t){var n;void 0!==t&&l.push(((n={})[(0,u.u2)(e)]=t,n))}))]:((0,u.Ao)(e)?a=e:(a=r[e.name.value],(0,h.kG)(a,7)),a&&a.typeCondition&&(c=a.typeCondition.name.value,n.fragmentMatcher(t,c,i))?[2,this.resolveSelectionSet(a.selectionSet,t,n).then((function(e){l.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(c)).then((function(){return(0,u.bw)(l)}))]}))}))},e.prototype.resolveField=function(e,t,n){return a(this,void 0,void 0,(function(){var r,i,o,a,l,c,d,f,p,h=this;return s(this,(function(s){return r=n.variables,i=e.name.value,o=(0,u.u2)(e),a=i!==o,l=t[o]||t[i],c=Promise.resolve(l),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(d=t.__typename||n.defaultOperationType,(f=this.resolvers&&this.resolvers[d])&&(p=f[a?i:o])&&(c=Promise.resolve(p(t,(0,u.NC)(e,r),n.context,{field:e,fragmentMap:n.fragmentMap})))),[2,c.then((function(t){return void 0===t&&(t=l),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?h.resolveSubSelectedArray(e,t,n):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t,n):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0})))},e}();function A(e){var t=new Set,n=null;return new v((function(r){return t.add(r),n=n||e.subscribe({next:function(e){t.forEach((function(t){return t.next&&t.next(e)}))},error:function(e){t.forEach((function(t){return t.error&&t.error(e)}))},complete:function(){t.forEach((function(e){return e.complete&&e.complete()}))}}),function(){t.delete(r)&&!t.size&&n&&(n.unsubscribe(),n=null)}}))}var P=Object.prototype.hasOwnProperty,R=function(){function e(e){var t=e.link,n=e.queryDeduplication,r=void 0!==n&&n,i=e.store,o=e.onBroadcast,a=void 0===o?function(){}:o,s=e.ssrMode,l=void 0!==s&&s,c=e.clientAwareness,d=void 0===c?{}:c,f=e.localState,p=e.assumeImmutableResults;this.mutationStore=new C,this.queryStore=new T,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.transformCache=new(u.mr?WeakMap:Map),this.inFlightLinkObservables=new Map,this.pollingInfoByQueryId=new Map,this.link=t,this.queryDeduplication=r,this.dataStore=i,this.onBroadcast=a,this.clientAwareness=d,this.localState=f||new O({cache:i.getCache()}),this.ssrMode=l,this.assumeImmutableResults=!!p}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.fetchQueryRejectFns.forEach((function(e){e(new h.ej(8))}))},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,r=e.optimisticResponse,i=e.updateQueries,l=e.refetchQueries,c=void 0===l?[]:l,d=e.awaitRefetchQueries,f=void 0!==d&&d,p=e.update,m=e.errorPolicy,g=void 0===m?"none":m,v=e.fetchPolicy,b=e.context,w=void 0===b?{}:b;return a(this,void 0,void 0,(function(){var e,a,l,d=this;return s(this,(function(s){switch(s.label){case 0:return(0,h.kG)(t,9),(0,h.kG)(!v||"no-cache"===v,10),e=this.generateQueryId(),t=this.transform(t).document,this.setQuery(e,(function(){return{document:t}})),n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,w)]:[3,2];case 1:n=s.sent(),s.label=2;case 2:return a=function(){var e={};return i&&d.queries.forEach((function(t,n){var r=t.observableQuery;if(r){var o=r.queryName;o&&P.call(i,o)&&(e[n]={updater:i[o],query:d.queryStore.get(n)})}})),e},this.mutationStore.initMutation(e,t,n),this.dataStore.markMutationInit({mutationId:e,document:t,variables:n,updateQueries:a(),update:p,optimisticResponse:r}),this.broadcastQueries(),l=this,[2,new Promise((function(i,s){var d,h;l.getObservableFromLink(t,o(o({},w),{optimisticResponse:r}),n,!1).subscribe({next:function(r){(0,u.d2)(r)&&"none"===g?h=new _({graphQLErrors:r.errors}):(l.mutationStore.markMutationResult(e),"no-cache"!==v&&l.dataStore.markMutationResult({mutationId:e,result:r,document:t,variables:n,updateQueries:a(),update:p}),d=r)},error:function(t){l.mutationStore.markMutationError(e,t),l.dataStore.markMutationComplete({mutationId:e,optimisticResponse:r}),l.broadcastQueries(),l.setQuery(e,(function(){return{document:null}})),s(new _({networkError:t}))},complete:function(){if(h&&l.mutationStore.markMutationError(e,h),l.dataStore.markMutationComplete({mutationId:e,optimisticResponse:r}),l.broadcastQueries(),h)s(h);else{"function"==typeof c&&(c=c(d));var t=[];y(c)&&c.forEach((function(e){if("string"==typeof e)l.queries.forEach((function(n){var r=n.observableQuery;r&&r.queryName===e&&t.push(r.refetch())}));else{var n={query:e.query,variables:e.variables,fetchPolicy:"network-only"};e.context&&(n.context=e.context),t.push(l.query(n))}})),Promise.all(f?t:[]).then((function(){l.setQuery(e,(function(){return{document:null}})),"ignore"===g&&d&&(0,u.d2)(d)&&delete d.errors,i(d)}))}}})}))]}}))}))},e.prototype.fetchQuery=function(e,t,n,r){return a(this,void 0,void 0,(function(){var i,a,l,c,d,f,p,h,m,g,v,y,x,k,E,S,C,T,O=this;return s(this,(function(s){switch(s.label){case 0:return i=t.metadata,a=void 0===i?null:i,l=t.fetchPolicy,c=void 0===l?"cache-first":l,d=t.context,f=void 0===d?{}:d,p=this.transform(t.query).document,h=this.getVariables(p,t.variables),this.transform(p).hasClientExports?[4,this.localState.addExportedVariables(p,h,f)]:[3,2];case 1:h=s.sent(),s.label=2;case 2:if(t=o(o({},t),{variables:h}),v=g="network-only"===c||"no-cache"===c,g||(y=this.dataStore.getCache().diff({query:p,variables:h,returnPartialData:!0,optimistic:!1}),x=y.complete,k=y.result,v=!x||"cache-and-network"===c,m=k),E=v&&"cache-only"!==c&&"standby"!==c,(0,u.FS)(["live"],p)&&(E=!0),S=this.idCounter++,C="no-cache"!==c?this.updateQueryWatch(e,p,t):void 0,this.setQuery(e,(function(){return{document:p,lastRequestId:S,invalidated:!0,cancel:C}})),this.invalidate(r),this.queryStore.initQuery({queryId:e,document:p,storePreviousVariables:E,variables:h,isPoll:n===w.poll,isRefetch:n===w.refetch,metadata:a,fetchMoreForQueryId:r}),this.broadcastQueries(),E){if(T=this.fetchRequest({requestId:S,queryId:e,document:p,options:t,fetchMoreForQueryId:r}).catch((function(t){throw b(t)?t:(S>=O.getQuery(e).lastRequestId&&(O.queryStore.markQueryError(e,t,r),O.invalidate(e),O.invalidate(r),O.broadcastQueries()),new _({networkError:t}))})),"cache-and-network"!==c)return[2,T];T.catch((function(){}))}return this.queryStore.markQueryResultClient(e,!E),this.invalidate(e),this.invalidate(r),this.transform(p).hasForcedResolvers?[2,this.localState.runResolvers({document:p,remoteResult:{data:m},context:f,variables:h,onlyRunForcedResolvers:!0}).then((function(n){return O.markQueryResult(e,n,t,r),O.broadcastQueries(),n}))]:(this.broadcastQueries(),[2,{data:m}])}}))}))},e.prototype.markQueryResult=function(e,t,n,r){var i=n.fetchPolicy,o=n.variables,a=n.errorPolicy;"no-cache"===i?this.setQuery(e,(function(){return{newData:{result:t.data,complete:!0}}})):this.dataStore.markQueryResult(t,this.getQuery(e).document,o,r,"ignore"===a||"all"===a)},e.prototype.queryListenerForObserver=function(e,t,n){var r=this;function i(e,t){if(n[e])try{n[e](t)}catch(e){}}return function(n,o){if(r.invalidate(e,!1),n){var a=r.getQuery(e),s=a.observableQuery,l=a.document,u=s?s.options.fetchPolicy:t.fetchPolicy;if("standby"!==u){var c=g(n.networkStatus),d=s&&s.getLastResult(),f=!(!d||d.networkStatus===n.networkStatus),p=t.returnPartialData||!o&&n.previousVariables||f&&t.notifyOnNetworkStatusChange||"cache-only"===u||"cache-and-network"===u;if(!c||p){var h=y(n.graphQLErrors),m=s&&s.options.errorPolicy||t.errorPolicy||"none";if("none"===m&&h||n.networkError)return i("error",new _({graphQLErrors:n.graphQLErrors,networkError:n.networkError}));try{var v=void 0,b=void 0;if(o)"no-cache"!==u&&"network-only"!==u&&r.setQuery(e,(function(){return{newData:null}})),v=o.result,b=!o.complete;else{var w=s&&s.getLastError(),x="none"!==m&&(w&&w.graphQLErrors)!==n.graphQLErrors;if(d&&d.data&&!x)v=d.data,b=!1;else{var k=r.dataStore.getCache().diff({query:l,variables:n.previousVariables||n.variables,returnPartialData:!0,optimistic:!0});v=k.result,b=!k.complete}}var E=b&&!(t.returnPartialData||"cache-only"===u),S={data:E?d&&d.data:v,loading:c,networkStatus:n.networkStatus,stale:E};"all"===m&&h&&(S.errors=n.graphQLErrors),i("next",S)}catch(e){i("error",new _({networkError:e}))}}}}}},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var n=this.dataStore.getCache(),r=n.transformDocument(e),i=(0,u.Fo)(n.transformForLink(r)),o=this.localState.clientQuery(r),a=this.localState.serverQuery(i),s={document:r,hasClientExports:(0,u.mj)(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:a,defaultVars:(0,u.O4)((0,u.$H)(r))},l=function(e){e&&!t.has(e)&&t.set(e,s)};l(e),l(r),l(o),l(a)}return t.get(e)},e.prototype.getVariables=function(e,t){return o(o({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e,t){void 0===t&&(t=!0),(0,h.kG)("standby"!==e.fetchPolicy,11),e.variables=this.getVariables(e.query,e.variables),void 0===e.notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var n=o({},e);return new x({queryManager:this,options:n,shouldSubscribe:t})},e.prototype.query=function(e){var t=this;return(0,h.kG)(e.query,12),(0,h.kG)("Document"===e.query.kind,13),(0,h.kG)(!e.returnPartialData,14),(0,h.kG)(!e.pollInterval,15),new Promise((function(n,r){var i=t.watchQuery(e,!1);t.fetchQueryRejectFns.set("query:"+i.queryId,r),i.result().then(n,r).then((function(){return t.fetchQueryRejectFns.delete("query:"+i.queryId)}))}))},e.prototype.generateQueryId=function(){return String(this.idCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){this.stopPollingQuery(e),this.queryStore.stopQuery(e),this.invalidate(e)},e.prototype.addQueryListener=function(e,t){this.setQuery(e,(function(e){return e.listeners.add(t),{invalidated:!1}}))},e.prototype.updateQueryWatch=function(e,t,n){var r=this,i=this.getQuery(e).cancel;return i&&i(),this.dataStore.getCache().watch({query:t,variables:n.variables,optimistic:!0,previousResult:function(){var t=null,n=r.getQuery(e).observableQuery;if(n){var i=n.getLastResult();i&&(t=i.data)}return t},callback:function(t){r.setQuery(e,(function(){return{invalidated:!0,newData:t}}))}})},e.prototype.addObservableQuery=function(e,t){this.setQuery(e,(function(){return{observableQuery:t}}))},e.prototype.removeObservableQuery=function(e){var t=this.getQuery(e).cancel;this.setQuery(e,(function(){return{observableQuery:null}})),t&&t()},e.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach((function(e){e(new h.ej(16))}));var e=[];return this.queries.forEach((function(t,n){t.observableQuery&&e.push(n)})),this.queryStore.reset(e),this.mutationStore.reset(),this.dataStore.reset()},e.prototype.resetStore=function(){var e=this;return this.clearStore().then((function(){return e.reFetchObservableQueries()}))},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.queries.forEach((function(r,i){var o=r.observableQuery;if(o){var a=o.options.fetchPolicy;o.resetLastResults(),"cache-only"===a||!e&&"standby"===a||n.push(o.refetch()),t.setQuery(i,(function(){return{newData:null}})),t.invalidate(i)}})),this.broadcastQueries(),Promise.all(n)},e.prototype.observeQuery=function(e,t,n){return this.addQueryListener(e,this.queryListenerForObserver(e,t,n)),this.fetchQuery(e,t)},e.prototype.startQuery=function(e,t,n){return this.addQueryListener(e,n),this.fetchQuery(e,t).catch((function(){})),e},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.variables;n=this.transform(n).document,i=this.getVariables(n,i);var o=function(e){return t.getObservableFromLink(n,{},e,!1).map((function(i){if(r&&"no-cache"===r||(t.dataStore.markSubscriptionResult(i,n,e),t.broadcastQueries()),(0,u.d2)(i))throw new _({graphQLErrors:i.errors});return i}))};if(this.transform(n).hasClientExports){var a=this.localState.addExportedVariables(n,i).then(o);return new v((function(e){var t=null;return a.then((function(n){return t=n.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return o(i)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchQueryRejectFns.delete("query:"+e),this.fetchQueryRejectFns.delete("fetchRequest:"+e),this.getQuery(e).subscriptions.forEach((function(e){return e.unsubscribe()})),this.queries.delete(e)},e.prototype.getCurrentQueryResult=function(e,t){void 0===t&&(t=!0);var n=e.options,r=n.variables,i=n.query,o=n.fetchPolicy,a=n.returnPartialData,s=e.getLastResult(),l=this.getQuery(e.queryId).newData;if(l&&l.complete)return{data:l.result,partial:!1};if("no-cache"===o||"network-only"===o)return{data:void 0,partial:!1};var u=this.dataStore.getCache().diff({query:i,variables:r,previousResult:s?s.data:void 0,returnPartialData:!0,optimistic:t}),c=u.result,d=u.complete;return{data:d||a?c:void 0,partial:!d}},e.prototype.getQueryWithPreviousResult=function(e){var t;if("string"==typeof e){var n=this.getQuery(e).observableQuery;(0,h.kG)(n,17),t=n}else t=e;var r=t.options,i=r.variables,o=r.query;return{previousResult:this.getCurrentQueryResult(t,!1).data,variables:i,document:o}},e.prototype.broadcastQueries=function(){var e=this;this.onBroadcast(),this.queries.forEach((function(t,n){t.invalidated&&t.listeners.forEach((function(r){r&&r(e.queryStore.get(n),t.newData)}))}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var i,a=this;void 0===r&&(r=this.queryDeduplication);var s=this.transform(e).serverQuery;if(s){var l=this.inFlightLinkObservables,c=this.link,d={query:s,variables:n,operationName:(0,u.rY)(s)||void 0,context:this.prepareContext(o(o({},t),{forceFetch:!r}))};if(t=d.context,r){var p=l.get(s)||new Map;l.set(s,p);var h=JSON.stringify(n);if(!(i=p.get(h))){p.set(h,i=A((0,f.ht)(c,d)));var m=function(){p.delete(h),p.size||l.delete(s),g.unsubscribe()},g=i.subscribe({next:m,error:m,complete:m})}}else i=A((0,f.ht)(c,d))}else i=v.of({data:{}}),t=this.prepareContext(t);var y=this.transform(e).clientQuery;return y&&(i=function(e,r){return new v((function(r){var i=r.next,o=r.error,s=r.complete,l=0,u=!1,c={next:function(e){++l,new Promise((function(r){var i;r((i=e,a.localState.runResolvers({document:y,remoteResult:i,context:t,variables:n})))})).then((function(e){--l,i&&i.call(r,e),u&&c.complete()}),(function(e){--l,o&&o.call(r,e)}))},error:function(e){o&&o.call(r,e)},complete:function(){u=!0,l||s&&s.call(r)}},d=e.subscribe(c);return function(){return d.unsubscribe()}}))}(i)),i},e.prototype.fetchRequest=function(e){var t,n,r=this,i=e.requestId,o=e.queryId,a=e.document,s=e.options,u=e.fetchMoreForQueryId,c=s.variables,d=s.errorPolicy,f=void 0===d?"none":d,p=s.fetchPolicy;return new Promise((function(e,d){var h=r.getObservableFromLink(a,s.context,c),m="fetchRequest:"+o;r.fetchQueryRejectFns.set(m,d);var g=function(){r.fetchQueryRejectFns.delete(m),r.setQuery(o,(function(e){e.subscriptions.delete(v)}))},v=h.map((function(e){if(i>=r.getQuery(o).lastRequestId&&(r.markQueryResult(o,e,s,u),r.queryStore.markQueryResult(o,e,u),r.invalidate(o),r.invalidate(u),r.broadcastQueries()),"none"===f&&y(e.errors))return d(new _({graphQLErrors:e.errors}));if("all"===f&&(n=e.errors),u||"no-cache"===p)t=e.data;else{var l=r.dataStore.getCache().diff({variables:c,query:a,optimistic:!1,returnPartialData:!0}),h=l.result;(l.complete||s.returnPartialData)&&(t=h)}})).subscribe({error:function(e){g(),d(e)},complete:function(){g(),e({data:t,errors:n,loading:!1,networkStatus:l.ready,stale:!1})}});r.setQuery(o,(function(e){e.subscriptions.add(v)}))}))},e.prototype.getQuery=function(e){return this.queries.get(e)||{listeners:new Set,invalidated:!1,document:null,newData:null,lastRequestId:1,observableQuery:null,subscriptions:new Set}},e.prototype.setQuery=function(e,t){var n=this.getQuery(e),r=o(o({},n),t(n));this.queries.set(e,r)},e.prototype.invalidate=function(e,t){void 0===t&&(t=!0),e&&this.setQuery(e,(function(){return{invalidated:t}}))},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return o(o({},t),{clientAwareness:this.clientAwareness})},e.prototype.checkInFlight=function(e){var t=this.queryStore.get(e);return t&&t.networkStatus!==l.ready&&t.networkStatus!==l.error},e.prototype.startPollingQuery=function(e,t,n){var r=this,i=e.pollInterval;if((0,h.kG)(i,18),!this.ssrMode){var a=this.pollingInfoByQueryId.get(t);a||this.pollingInfoByQueryId.set(t,a={}),a.interval=i,a.options=o(o({},e),{fetchPolicy:"network-only"});var s=function(){var e=r.pollingInfoByQueryId.get(t);e&&(r.checkInFlight(t)?l():r.fetchQuery(t,e.options,w.poll).then(l,l))},l=function(){var e=r.pollingInfoByQueryId.get(t);e&&(clearTimeout(e.timeout),e.timeout=setTimeout(s,e.interval))};n&&this.addQueryListener(t,n),l()}return t},e.prototype.stopPollingQuery=function(e){this.pollingInfoByQueryId.delete(e)},e}(),D=function(){function e(e){this.cache=e}return e.prototype.getCache=function(){return this.cache},e.prototype.markQueryResult=function(e,t,n,r,i){void 0===i&&(i=!1);var o=!(0,u.d2)(e);i&&(0,u.d2)(e)&&e.data&&(o=!0),!r&&o&&this.cache.write({result:e.data,dataId:"ROOT_QUERY",query:t,variables:n})},e.prototype.markSubscriptionResult=function(e,t,n){(0,u.d2)(e)||this.cache.write({result:e.data,dataId:"ROOT_SUBSCRIPTION",query:t,variables:n})},e.prototype.markMutationInit=function(e){var t,n=this;e.optimisticResponse&&(t="function"==typeof e.optimisticResponse?e.optimisticResponse(e.variables):e.optimisticResponse,this.cache.recordOptimisticTransaction((function(r){var i=n.cache;n.cache=r;try{n.markMutationResult({mutationId:e.mutationId,result:{data:t},document:e.document,variables:e.variables,updateQueries:e.updateQueries,update:e.update})}finally{n.cache=i}}),e.mutationId))},e.prototype.markMutationResult=function(e){var t=this;if(!(0,u.d2)(e.result)){var n=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],r=e.updateQueries;r&&Object.keys(r).forEach((function(i){var o=r[i],a=o.query,s=o.updater,l=t.cache.diff({query:a.document,variables:a.variables,returnPartialData:!0,optimistic:!1}),c=l.result;if(l.complete){var d=(0,u.XY)((function(){return s(c,{mutationResult:e.result,queryName:(0,u.rY)(a.document)||void 0,queryVariables:a.variables})}));d&&n.push({result:d,dataId:"ROOT_QUERY",query:a.document,variables:a.variables})}})),this.cache.performTransaction((function(t){n.forEach((function(e){return t.write(e)}));var r=e.update;r&&(0,u.XY)((function(){return r(t,e.result)}))}))}},e.prototype.markMutationComplete=function(e){var t=e.mutationId;e.optimisticResponse&&this.cache.removeOptimistic(t)},e.prototype.markUpdateQueryResult=function(e,t,n){this.cache.write({result:n,dataId:"ROOT_QUERY",variables:t,query:e})},e.prototype.reset=function(){return this.cache.reset()},e}(),M=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.cache,r=e.ssrMode,i=void 0!==r&&r,o=e.ssrForceFetchDelay,a=void 0===o?0:o,s=e.connectToDevTools,l=e.queryDeduplication,u=void 0===l||l,c=e.defaultOptions,d=e.assumeImmutableResults,p=void 0!==d&&d,m=e.resolvers,g=e.typeDefs,v=e.fragmentMatcher,y=e.name,b=e.version,w=e.link;if(!w&&m&&(w=f.i0.empty()),!w||!n)throw new h.ej(4);this.link=w,this.cache=n,this.store=new D(n),this.disableNetworkFetches=i||a>0,this.queryDeduplication=u,this.defaultOptions=c||{},this.typeDefs=g,a&&setTimeout((function(){return t.disableNetworkFetches=!1}),a),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),void 0!==s&&s&&"undefined"!=typeof window&&(window.__APOLLO_CLIENT__=this),this.version="2.6.10",this.localState=new O({cache:n,client:this,resolvers:m,fragmentMatcher:v}),this.queryManager=new R({link:this.link,store:this.store,queryDeduplication:u,ssrMode:i,clientAwareness:{name:y,version:b},localState:this.localState,assumeImmutableResults:p,onBroadcast:function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.queryStore.getStore(),mutations:t.queryManager.mutationStore.getStore()},dataWithOptimisticResults:t.cache.extract(!0)})}})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=o(o({},this.defaultOptions.watchQuery),e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=o(o({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=o(o({},this.defaultOptions.query),e)),(0,h.kG)("cache-and-network"!==e.fetchPolicy,5),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=o(o({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=o(o({},this.defaultOptions.mutate),e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeData=function(e){var t=this.cache.writeData(e);return this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return(0,f.ht)(this.link,e)},e.prototype.initQueryManager=function(){return this.queryManager},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e}();const I=M},96044:(e,t,n)=>{"use strict";n.r(t),n.d(t,{setContext:()=>o});var r=n(38249),i=n(45526);function o(e){return new r.i0((function(t,n){var r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i{"use strict";n.r(t),n.d(t,{HttpLink:()=>h,createHttpLink:()=>p});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=300&&d(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||t.hasOwnProperty("data")||t.hasOwnProperty("errors")||d(e,t,"Server response was missing for query '"+(Array.isArray(i)?i.map((function(e){return e.operationName})):i.operationName)+"'."),t}))})).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){b&&b.abort()}}))}))},h=function(e){function t(t){return e.call(this,p(t).request)||this}return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(o.i0)},38249:(e,t,n)=>{"use strict";n.d(t,{i0:()=>v,ht:()=>y,Qc:()=>c});var r,i=n(45526),o=n(21726),a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},a(e,t)},s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{"use strict";n.d(t,{Gw:()=>U,NC:()=>p,f0:()=>C,aL:()=>H,mr:()=>G,Xh:()=>Z,F:()=>M,O4:()=>I,Qy:()=>w,kU:()=>P,Yk:()=>S,p$:()=>D,$H:()=>O,rY:()=>A,iW:()=>R,PT:()=>f,d2:()=>te,mj:()=>k,FS:()=>x,My:()=>m,cQ:()=>v,Ao:()=>g,v4:()=>b,yv:()=>Q,Y8:()=>J,Ee:()=>re,bw:()=>ie,ob:()=>V,Fo:()=>W,u2:()=>h,LZ:()=>_,vf:()=>c,aX:()=>y,XY:()=>ee});var r=n(82624),i=n(21726),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i=t,o={};return r.forEach((function(e){o[e]=i[e]})),n.connection.key+"("+JSON.stringify(o)+")"}return n.connection.key}var a=e;if(t){var s=l()(t);a+="("+s+")"}return n&&Object.keys(n).forEach((function(e){-1===d.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?a+="@"+e+"("+JSON.stringify(n[e])+")":a+="@"+e)})),a}function p(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return u(n,r,i,t)})),n}return null}function h(e){return e.alias?e.alias.value:e.name.value}function m(e){return"Field"===e.kind}function g(e){return"InlineFragment"===e.kind}function v(e){return e&&"id"===e.type&&"boolean"==typeof e.generated}function y(e,t){return void 0===t&&(t=!1),o({type:"id",generated:t},"string"==typeof e?{id:e,typename:void 0}:e)}function b(e){return null!=e&&"object"==typeof e&&"json"===e.type}function w(e,t){if(e.directives&&e.directives.length){var n={};return e.directives.forEach((function(e){n[e.name.value]=p(e,t)})),n}return null}function _(e,t){return void 0===t&&(t={}),(n=e.directives,n?n.filter(E).map((function(e){var t=e.arguments;e.name.value,(0,i.kG)(t&&1===t.length,14);var n=t[0];(0,i.kG)(n.name&&"if"===n.name.value,15);var r=n.value;return(0,i.kG)(r&&("Variable"===r.kind||"BooleanValue"===r.kind),16),{directive:e,ifArgument:n}})):[]).every((function(e){var n=e.directive,r=e.ifArgument,o=!1;return"Variable"===r.value.kind?(o=t[r.value.name.value],(0,i.kG)(void 0!==o,13)):o=r.value.value,"skip"===n.name.value?!o:o}));var n}function x(e,t){return function(e){var t=[];return(0,r.visit)(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function k(e){return e&&x(["client"],e)&&x(["export"],e)}function E(e){var t=e.name.value;return"skip"===t||"include"===t}function S(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw new i.ej(11);"FragmentDefinition"===e.kind&&r.push(e)})),void 0===n&&((0,i.kG)(1===r.length,12),n=r[0].name.value),o(o({},e),{definitions:a([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions)})}function C(e){for(var t=[],n=1;n1){var r=[];t=se(t,r);for(var i=1;i{"use strict";var r=n(67286),i=n(62680),o=r("%TypeError%"),a=n(31818),s=n(22566),l=n(99732),u=n(13125),c=n(3158),d=n(59869),f=n(24158),p=n(26302),h=i("String.prototype.split"),m=Object("a"),g="a"!==m[0]||!(0 in m);e.exports=function(e){var t,n=d(this),r=g&&p(this)?h(this,""):n,i=c(r);if(!u(e))throw new o("Array.prototype.forEach callback must be a function");arguments.length>1&&(t=arguments[1]);for(var m=0;m{"use strict";var r=n(14926),i=n(89429),o=n(62680),a=n(62183),s=n(85692),l=n(25970),u=l(),c=n(89055),d=o("Array.prototype.slice"),f=i.apply(u),p=function(e,t){return a(e),f(e,d(arguments,1))};r(p,{getPolyfill:l,implementation:s,shim:c}),e.exports=p},25970:(e,t,n)=>{"use strict";var r=n(63937),i=n(85692);e.exports=function(){var e=Array.prototype.forEach;return r(e)?e:i}},89055:(e,t,n)=>{"use strict";var r=n(14926),i=n(25970);e.exports=function(){var e=i();return r(Array.prototype,{forEach:e},{forEach:function(){return Array.prototype.forEach!==e}}),e}},59629:(e,t,n)=>{"use strict";var r=n(84185),i=n(55281),o=n(59405),a=n(48638),s=n(34554),l=n(38589),u=n(12318),c=n(17134),d=n(58908),f=n(99307),p=R(n(67353)),h=R(n(82133)),m=R(n(53651)),g=R(n(79386)),v=R(n(76889)),y=R(n(31540)),b=R(n(79425)),w=R(n(57677)),_=R(n(16044)),x=R(n(73884)),k=R(n(56293)),E=R(n(71515)),S=R(n(23827)),C=R(n(15646)),T=R(n(4875)),O=R(n(40299)),A=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=P(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n(92035));function P(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(P=function(e){return e?n:t})(e)}function R(e){return e&&e.__esModule?e:{default:e}}r.DecapCmsCore.registerBackend("git-gateway",u.GitGatewayBackend),r.DecapCmsCore.registerBackend("azure",i.AzureBackend),r.DecapCmsCore.registerBackend("aws-cognito-github-proxy",o.AwsCognitoGitHubProxyBackend),r.DecapCmsCore.registerBackend("github",a.GitHubBackend),r.DecapCmsCore.registerBackend("gitlab",s.GitLabBackend),r.DecapCmsCore.registerBackend("gitea",l.GiteaBackend),r.DecapCmsCore.registerBackend("bitbucket",c.BitbucketBackend),r.DecapCmsCore.registerBackend("test-repo",d.TestBackend),r.DecapCmsCore.registerBackend("proxy",f.ProxyBackend),r.DecapCmsCore.registerWidget([p.default.Widget(),h.default.Widget(),m.default.Widget(),g.default.Widget(),v.default.Widget(),y.default.Widget(),b.default.Widget(),w.default.Widget(),_.default.Widget(),x.default.Widget(),k.default.Widget(),E.default.Widget(),S.default.Widget(),C.default.Widget(),T.default.Widget()]),r.DecapCmsCore.registerEditorComponent(O.default),r.DecapCmsCore.registerEditorComponent({id:"code-block",label:"Code Block",widget:"code",type:"code-block"}),Object.keys(A).forEach((e=>{r.DecapCmsCore.registerLocale(e,A[e])}))},48059:(e,t,n)=>{"use strict";t.de=void 0;var r=n(84185);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}n(59629),"undefined"!=typeof window&&console.log("decap-cms-app 3.1.10"),t.de=function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(70894)),i=u(n(2784)),o=u(n(13980)),a=n(76320),s=n(30762),l=n(28165);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,r.default)(s.Icon,{target:"e1eykva80",label:"LoginButtonIcon"})({name:"1gnqu05",styles:"margin-right:18px"});class f extends i.default.Component{constructor(...e){super(...e),c(this,"state",{}),c(this,"handleLogin",(e=>{e.preventDefault(),this.auth.authenticate({scope:"https://api.github.com/repo openid email"},((e,t)=>{e?this.setState({loginError:e.toString()}):this.props.onLogin(t)}))}))}componentDidMount(){const{base_url:e="",app_id:t="",auth_endpoint:n="oauth2/authorize",auth_token_endpoint:r="oauth2/token"}=this.props.config.backend;this.auth=new a.PkceAuthenticator({base_url:e,auth_endpoint:n,app_id:t,auth_token_endpoint:r,auth_token_endpoint_content_type:"application/x-www-form-urlencoded; charset=utf-8"}),this.auth.completeAuth(((e,t)=>{e?this.setState({loginError:e.toString()}):this.props.onLogin(t)}))}render(){const{inProgress:e,config:t,t:n}=this.props;return(0,l.jsx)(s.AuthenticationPage,{onLogin:this.handleLogin,loginDisabled:e,loginErrorMessage:this.state.loginError,logoUrl:t.logo_url,siteUrl:t.site_url,renderButtonContent:()=>(0,l.jsx)(i.default.Fragment,null,(0,l.jsx)(d,{type:"link"})," ",n(e?"auth.loggingIn":"auth.login")),t:n})}}t.default=f,c(f,"propTypes",{inProgress:o.default.bool,config:o.default.object.isRequired,onLogin:o.default.func.isRequired,t:o.default.func.isRequired})},43642:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,n&&n.set(e,r)}(n(2784));var r,i=n(48638),o=(r=n(79710))&&r.__esModule?r:{default:r},a=n(28165);function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t(0,a.jsx)(o.default,l({},e,{backend:this}));return e.displayName="AuthenticationPage",e}async currentUser({token:e}){return this._currentUserPromise||(this._currentUserPromise=fetch(this.baseUrl+"/oauth2/userInfo",{headers:{Authorization:`${this.tokenKeyword} ${e}`}}).then((async e=>{if(401==e.status)return this.logout(),Promise.reject("Token expired");const t=await e.json(),n=this.originRepo.split("/")[1];return{name:t.email,login:n,avatar_url:`https://github.com/${n}.png`}}))),this._currentUserPromise}}t.default=u},59405:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"API",{enumerable:!0,get:function(){return r.API}}),Object.defineProperty(t,"AuthenticationPage",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"AwsCognitoGitHubProxyBackend",{enumerable:!0,get:function(){return i.default}}),t.DecapCmsBackendAwsCognitoGithubProxy=void 0;var r=n(48638),i=a(n(43642)),o=a(n(79710));function a(e){return e&&e.__esModule?e:{default:e}}t.DecapCmsBackendAwsCognitoGithubProxy={AwsCognitoGitHubProxyBackend:i.default,API:r.API,AuthenticationPage:o.default}},96667:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.API_NAME=void 0;var r=c(n(93433)),i=c(n(5648)),o=c(n(36346)),a=c(n(83465)),s=n(95978),l=n(33806),u=n(21023);function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;tsetTimeout(t,e)))}function k(e){switch(e.action){case v.ADD:return{changeType:v.ADD,item:{path:e.path},newContent:{content:e.base64Content,contentType:y.BASE64}};case v.EDIT:return{changeType:v.EDIT,item:{path:e.path},newContent:{content:e.base64Content,contentType:y.BASE64}};case v.DELETE:return{changeType:v.DELETE,item:{path:e.path}};case v.RENAME:return{changeType:v.RENAME,item:{path:e.path},sourceServerItem:e.oldPath};default:return{}}}t.default=class{constructor(e,t){p(this,"apiVersion",void 0),p(this,"token",void 0),p(this,"branch",void 0),p(this,"mergeStrategy",void 0),p(this,"endpointUrl",void 0),p(this,"initialWorkflowStatus",void 0),p(this,"cmsLabelPrefix",void 0),p(this,"withHeaders",(e=>l.unsentRequest.withHeaders({Authorization:`Bearer ${this.token}`,"Content-Type":"application/json; charset=utf-8"},e))),p(this,"withAzureFeatures",(e=>e.hasIn(["params",m])?e:l.unsentRequest.withParams({[m]:`${this.apiVersion}`},e))),p(this,"buildRequest",(e=>{const t=this.withHeaders(e),n=this.withAzureFeatures(t);return n.has("cache")?n:l.unsentRequest.withNoCache(n)})),p(this,"request",(e=>{try{return(0,l.requestWithBackoff)(this,e)}catch(e){throw new l.APIError(e.message,null,h)}})),p(this,"responseToJSON",(0,l.responseParser)({format:"json",apiName:h})),p(this,"responseToBlob",(0,l.responseParser)({format:"blob",apiName:h})),p(this,"responseToText",(0,l.responseParser)({format:"text",apiName:h})),p(this,"requestJSON",(e=>this.request(e).then(this.responseToJSON))),p(this,"requestText",(e=>this.request(e).then(this.responseToText))),p(this,"toBase64",(e=>Promise.resolve(s.Base64.encode(e)))),p(this,"fromBase64",(e=>s.Base64.decode(e))),p(this,"branchToRef",(e=>`refs/heads/${e}`)),p(this,"refToBranch",(e=>e.slice(11))),p(this,"user",(async()=>{var e,t,n,r,i,o,a;const s=await this.requestJSON({url:"https://app.vssps.visualstudio.com/_apis/profile/profiles/me",params:{[m]:"6.1-preview.2"}}),l=null===(e=s.coreAttributes)||void 0===e||null===(t=e.DisplayName)||void 0===t?void 0:t.value,u=null===(n=s.coreAttributes)||void 0===n||null===(r=n.EmailAddress)||void 0===r?void 0:r.value;return{name:l||u||"",avatar_url:`data:image/png;base64,${null===(i=s.coreAttributes)||void 0===i||null===(o=i.Avatar)||void 0===o||null===(a=o.value)||void 0===a?void 0:a.value}`,email:u}})),p(this,"readFile",((e,t,{parseText:n=!0,branch:r=this.branch}={})=>(0,l.readFile)(t,(()=>this.request({url:`${this.endpointUrl}/items/`,params:{version:r,path:e},cache:"no-store"}).then(n?this.responseToText:this.responseToBlob)),l.localForage,n))),p(this,"listFiles",(async(e,t,n=this.branch)=>{try{const{value:i}=await this.requestJSON({url:`${this.endpointUrl}/items/`,params:{version:n,scopePath:e,recursionLevel:t?"full":"oneLevel"}});return i.filter((e=>e.gitObjectType===_.BLOB)).map((e=>({id:e.objectId,path:(0,r.default)(e.path,"/"),name:(0,u.basename)(e.path)})))}catch(e){if(e&&404===e.status)return console.log("This 404 was expected and handled appropriately."),[];throw e}}));const{repo:n}=e,o=(0,i.default)(e.apiRoot,"/");this.endpointUrl=`${o}/${n.org}/${n.project}/_apis/git/repositories/${n.repoName}`,this.token=t,this.branch=e.branch,this.mergeStrategy=e.squashMerges?"squash":"noFastForward",this.initialWorkflowStatus=e.initialWorkflowStatus,this.apiVersion=e.apiVersion,this.cmsLabelPrefix=e.cmsLabelPrefix}async readFileMetadata(e,t,{branch:n=this.branch}={}){return await(0,l.readFileMetadata)(t,(async()=>{try{const{value:t}=await this.requestJSON({url:`${this.endpointUrl}/commits/`,params:{"searchCriteria.itemPath":e,"searchCriteria.itemVersion.version":n,"searchCriteria.$top":1}}),[r]=t;return{author:r.author.name||r.author.email,updatedOn:r.author.date}}catch(e){return{author:"",updatedOn:""}}}),l.localForage)}async getRef(e=this.branch){const{value:t}=await this.requestJSON({url:`${this.endpointUrl}/refs`,params:{$top:"1",filter:"heads/"+e}});return t.find((t=>t.name==this.branchToRef(e)))}async deleteRef(e){const t=[{name:e.name,oldObjectId:e.objectId,newObjectId:"0000000000000000000000000000000000000000"}];await this.requestJSON({method:"POST",url:`${this.endpointUrl}/refs`,body:JSON.stringify(t)})}async uploadAndCommit(e,t,n,r){const i=await this.getRef(r?this.branch:n),o={refUpdates:[{name:this.branchToRef(n),oldObjectId:i.objectId}],commits:[{comment:t,changes:e.map((e=>k(e)))}]};return this.requestJSON({url:`${this.endpointUrl}/pushes`,method:"POST",body:JSON.stringify(o)})}async retrieveUnpublishedEntryData(e){var t,n;const{collection:i,slug:o}=(0,l.parseContentKey)(e),a=(0,l.branchFromContentKey)(e),s=await this.getBranchPullRequest(a),u=await this.getDifferences(s.sourceRefName),c=await Promise.all(u.map((async e=>{const t=(0,r.default)(e.item.path,"/"),n=e.changeType===v.ADD;return{id:e.item.objectId,path:t,newFile:n}}))),d=s.labels.find((e=>(0,l.isCMSLabel)(e.name,this.cmsLabelPrefix))),f=d&&d.name?d.name:this.cmsLabelPrefix;return{collection:i,slug:o,status:(0,l.labelToStatus)(f,this.cmsLabelPrefix),diffs:c,updatedAt:s.closedDate?s.closedDate:s.creationDate,pullRequestAuthor:(null===(t=s.createdBy)||void 0===t?void 0:t.displayName)||(null===(n=s.createdBy)||void 0===n?void 0:n.uniqueName)}}async getPullRequestStatues(e){const{value:t}=await this.requestJSON({url:`${this.endpointUrl}/pullrequests/${e.pullRequestId}/commits`,params:{$top:1}}),{value:n}=await this.requestJSON({url:`${this.endpointUrl}/commits/${t[0].commitId}/statuses`,params:{latestOnly:!0}});return n}async getStatuses(e,t){const n=(0,l.generateContentKey)(e,t),r=(0,l.branchFromContentKey)(n),i=await this.getBranchPullRequest(r);return(await this.getPullRequestStatues(i)).map((({context:e,state:t,targetUrl:n})=>({context:e.name,state:t===g.SUCCEEDED?l.PreviewState.Success:l.PreviewState.Other,target_url:n})))}async getCommitItems(e,t){const n=await Promise.all(e.map((async e=>{const[n,r]=await Promise.all([(0,o.default)(e,"toBase64",(0,a.default)(this.toBase64,e.raw)),this.isFileExists(e.path,t)]),i=e.newPath||e.path,s=e.path,l=i!==s?v.RENAME:v.EDIT;return{action:r?l:v.ADD,base64Content:n,path:i,oldPath:s}})));for(const e of n.filter((e=>e.oldPath&&e.action===v.RENAME))){const r=(0,u.dirname)(e.oldPath),i=(0,u.dirname)(e.path);(await this.listFiles(r,!0,t)).filter((t=>t.path!==e.oldPath)).forEach((e=>{n.push({action:v.RENAME,path:e.path.replace(r,i),oldPath:e.path})}))}return n}async persistFiles(e,t,n){const r=[...e,...t];if(n.useWorkflow){const t=e[0].slug;return this.editorialWorkflowGit(r,t,n)}{const e=await this.getCommitItems(r,this.branch);return this.uploadAndCommit(e,n.commitMessage,this.branch,!0)}}async deleteFiles(e,t){const n=await this.getRef(this.branch),r={refUpdates:[{name:n.name,oldObjectId:n.objectId}],commits:[{comment:t,changes:e.map((e=>k({action:v.DELETE,path:e})))}]};return this.requestJSON({url:`${this.endpointUrl}/pushes`,method:"POST",body:JSON.stringify(r)})}async getPullRequests(e){const{value:t}=await this.requestJSON({url:`${this.endpointUrl}/pullrequests`,params:f({"searchCriteria.status":"active","searchCriteria.targetRefName":this.branchToRef(this.branch),"searchCriteria.includeLinks":!1},e?{"searchCriteria.sourceRefName":this.branchToRef(e)}:{})});return t.filter((e=>e.labels.some((e=>(0,l.isCMSLabel)(e.name,this.cmsLabelPrefix)))))}async listUnpublishedBranches(){return(await this.getPullRequests()).map((e=>this.refToBranch(e.sourceRefName)))}async isFileExists(e,t){try{return await this.requestText({url:`${this.endpointUrl}/items/`,params:{version:t,path:e},cache:"no-store"}),!0}catch(e){if(e instanceof l.APIError&&404===e.status)return!1;throw e}}async createPullRequest(e,t,n){const r={sourceRefName:this.branchToRef(e),targetRefName:this.branchToRef(this.branch),title:t,description:l.DEFAULT_PR_BODY,labels:[{name:(0,l.statusToLabel)(n,this.cmsLabelPrefix)}]};await this.requestJSON({method:"POST",url:`${this.endpointUrl}/pullrequests`,params:{supportsIterations:!1},body:JSON.stringify(r)})}async getBranchPullRequest(e){const t=await this.getPullRequests(e);if(t.length<=0)throw new l.EditorialWorkflowError("content is not under editorial workflow",!0);return t[0]}async getDifferences(e){return(await this.requestJSON({url:`${this.endpointUrl}/diffs/commits`,params:{baseVersion:this.branch,targetVersion:this.refToBranch(e)}})).changes.filter((e=>e.item.gitObjectType===_.BLOB&&Object.values(v).includes(e.changeType)))}async editorialWorkflowGit(e,t,n){const r=(0,l.generateContentKey)(n.collectionName,t),i=(0,l.branchFromContentKey)(r);if(n.unpublished){const t=await this.getCommitItems(e,i);await this.uploadAndCommit(t,n.commitMessage,i,!1)}else{const t=await this.getCommitItems(e,this.branch);await this.uploadAndCommit(t,n.commitMessage,i,!0),await this.createPullRequest(i,n.commitMessage,n.status||this.initialWorkflowStatus)}}async updateUnpublishedEntryStatus(e,t,n){const r=(0,l.generateContentKey)(e,t),i=(0,l.branchFromContentKey)(r),o=await this.getBranchPullRequest(i),a=[...o.labels.filter((e=>!(0,l.isCMSLabel)(e.name,this.cmsLabelPrefix))).map((e=>e.name)),(0,l.statusToLabel)(n,this.cmsLabelPrefix)];await this.updatePullRequestLabels(o,a)}async deleteUnpublishedEntry(e,t){const n=(0,l.generateContentKey)(e,t),r=(0,l.branchFromContentKey)(n),i=await this.getBranchPullRequest(r);await this.abandonPullRequest(i)}async publishUnpublishedEntry(e,t){const n=(0,l.generateContentKey)(e,t),r=(0,l.branchFromContentKey)(n),i=await this.getBranchPullRequest(r);await this.completePullRequest(i)}async updatePullRequestLabels(e,t){const n=e.labels.filter((e=>(0,l.isCMSLabel)(e.name,this.cmsLabelPrefix)));await Promise.all(n.map((t=>this.requestText({method:"DELETE",url:`${this.endpointUrl}/pullrequests/${encodeURIComponent(e.pullRequestId)}/labels/${encodeURIComponent(t.id)}`})))),await Promise.all(t.map((t=>this.requestText({method:"POST",url:`${this.endpointUrl}/pullrequests/${encodeURIComponent(e.pullRequestId)}/labels`,body:JSON.stringify({name:t})}))))}async completePullRequest(e){const t={status:b.COMPLETED,lastMergeSourceCommit:e.lastMergeSourceCommit,completionOptions:{deleteSourceBranch:!0,mergeCommitMessage:l.MERGE_COMMIT_MESSAGE,mergeStrategy:this.mergeStrategy}};let n=await this.requestJSON({method:"PATCH",url:`${this.endpointUrl}/pullrequests/${encodeURIComponent(e.pullRequestId)}`,body:JSON.stringify(t)}),r=1;for(;n.mergeStatus===w.QUEUED&&r<=10;)await x(500),n=await this.requestJSON({url:`${this.endpointUrl}/pullrequests/${encodeURIComponent(e.pullRequestId)}`}),r+=1}async abandonPullRequest(e){const t={status:b.ABANDONED};await this.requestJSON({method:"PATCH",url:`${this.endpointUrl}/pullrequests/${encodeURIComponent(e.pullRequestId)}`,body:JSON.stringify(t)}),await this.deleteRef({name:e.sourceRefName,objectId:e.lastMergeSourceCommit.commitId})}}},61325:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(70894)),i=u(n(2784)),o=u(n(13980)),a=n(76320),s=n(30762),l=n(28165);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,r.default)(s.Icon,{target:"e1n0346u0",label:"LoginButtonIcon"})({name:"1gnqu05",styles:"margin-right:18px"});class f extends i.default.Component{constructor(...e){super(...e),c(this,"state",{}),c(this,"handleLogin",(e=>{e.preventDefault(),this.auth.authenticate({scope:"vso.code_full,user.read",resource:"499b84ac-1321-427f-aa17-267ca6975798",prompt:"select_account"},((e,t)=>{e?this.setState({loginError:e.toString()}):this.props.onLogin(t)}))}))}componentDidMount(){this.auth=new a.ImplicitAuthenticator({base_url:`https://login.microsoftonline.com/${this.props.config.backend.tenant_id}`,auth_endpoint:"oauth2/authorize",app_id:this.props.config.backend.app_id,clearHash:this.props.clearHash}),this.auth.completeAuth(((e,t)=>{e?alert(e):this.props.onLogin(t)}))}render(){const{inProgress:e,config:t,t:n}=this.props;return(0,l.jsx)(s.AuthenticationPage,{onLogin:this.handleLogin,loginDisabled:e,loginErrorMessage:this.state.loginError,logoUrl:t.logo_url,renderButtonContent:()=>(0,l.jsx)(i.default.Fragment,null,(0,l.jsx)(d,{type:"azure"}),n(e?"auth.loggingIn":"auth.loginWithAzure")),t:n})}}t.default=f,c(f,"propTypes",{onLogin:o.default.func.isRequired,inProgress:o.default.bool,base_url:o.default.string,siteId:o.default.string,authEndpoint:o.default.string,config:o.default.object.isRequired,clearHash:o.default.func,t:o.default.func.isRequired})},52141:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(5648)),i=c(n(93433)),o=c(n(63252)),a=n(33806),s=c(n(61325)),l=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n(96667));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t!!e)).catch((e=>(console.warn("Failed getting Azure user",e),!1)))||!1},api:{status:!0,statusPage:""}}}authComponent(){return s.default}restoreUser(e){return this.authenticate(e)}async authenticate(e){this.token=e.token,this.api=new l.default({apiRoot:this.apiRoot,apiVersion:this.apiVersion,repo:this.repo,branch:this.branch,squashMerges:this.squashMerges,cmsLabelPrefix:this.cmsLabelPrefix,initialWorkflowStatus:this.options.initialWorkflowStatus},this.token);const t=await this.api.user();return f({token:e.token},t)}logout(){this.token=null}getToken(){return Promise.resolve(this.token)}async entriesByFolder(e,t,n){return await(0,a.entriesByFolder)((async()=>(await this.api.listFiles(e,n>1)).filter((e=>(0,a.filterByExtension)({path:e.path},t))).map((e=>({id:e.id,path:e.path})))),this.api.readFile.bind(this.api),this.api.readFileMetadata.bind(this.api),l.API_NAME)}entriesByFiles(e){return(0,a.entriesByFiles)(e,this.api.readFile.bind(this.api),this.api.readFileMetadata.bind(this.api),l.API_NAME)}async getEntry(e){return{file:{path:e},data:await this.api.readFile(e)}}async getMedia(){const e=await this.api.listFiles(this.mediaFolder,!1);return await Promise.all(e.map((async({id:e,path:t,name:n})=>({id:e,name:n,displayURL:await this.getMediaDisplayURL({id:e,path:t}),path:t}))))}getMediaDisplayURL(e){return this._mediaDisplayURLSem=this._mediaDisplayURLSem||(0,o.default)(10),(0,a.getMediaDisplayURL)(e,this.api.readFile.bind(this.api),this._mediaDisplayURLSem)}async getMediaFile(e){const t=(0,a.basename)(e),n=await(0,a.getMediaAsBlob)(e,null,this.api.readFile.bind(this.api)),r=new File([n],t),i=URL.createObjectURL(r);return{id:await(0,a.getBlobSHA)(n),displayURL:i,path:e,name:t,size:r.size,file:r,url:i}}async persistEntry(e,t){const n=e.assets;await this.api.persistFiles(e.dataFiles,n,t)}async persistMedia(e,t){const n=e.fileObj,[r]=await Promise.all([(0,a.getBlobSHA)(n),this.api.persistFiles([],[e],t)]),{path:o}=e,s=URL.createObjectURL(n);return{displayURL:s,path:(0,i.default)(o,"/"),name:n.name,size:n.size,file:n,url:s,id:r}}async deleteFiles(e,t){await this.api.deleteFiles(e,t)}async loadMediaFile(e,t){const n=await(0,a.getMediaAsBlob)(t.path,null,((t,n,{parseText:r})=>this.api.readFile(t,n,{branch:e,parseText:r}))),r=(0,a.basename)(t.path),i=new File([n],r);return{id:t.path,displayURL:URL.createObjectURL(i),path:t.path,name:r,size:i.size,file:i}}async loadEntryMediaFiles(e,t){return await Promise.all(t.map((t=>this.loadMediaFile(e,t))))}async unpublishedEntries(){return await(0,a.unpublishedEntries)((()=>this.api.listUnpublishedBranches().then((e=>e.map((e=>(0,a.contentKeyFromBranch)(e)))))))}async unpublishedEntry({id:e,collection:t,slug:n}){if(e)return await this.api.retrieveUnpublishedEntryData(e);if(t&&n){const e=(0,a.generateContentKey)(t,n);return await this.api.retrieveUnpublishedEntryData(e)}throw new Error("Missing unpublished entry id or collection and slug")}getBranch(e,t){const n=(0,a.generateContentKey)(e,t);return(0,a.branchFromContentKey)(n)}async unpublishedEntryMediaFile(e,t,n,r){const i=this.getBranch(e,t);return await this.loadMediaFile(i,{path:n,id:r})}async unpublishedEntryDataFile(e,t,n,r){const i=this.getBranch(e,t);return await this.api.readFile(n,r,{branch:i})}updateUnpublishedEntryStatus(e,t,n){return(0,a.runWithLock)(this.lock,(()=>this.api.updateUnpublishedEntryStatus(e,t,n)),"Failed to acquire update entry status lock")}deleteUnpublishedEntry(e,t){return(0,a.runWithLock)(this.lock,(()=>this.api.deleteUnpublishedEntry(e,t)),"Failed to acquire delete entry lock")}publishUnpublishedEntry(e,t){return(0,a.runWithLock)(this.lock,(()=>this.api.publishUnpublishedEntry(e,t)),"Failed to acquire publish entry lock")}async getDeployPreview(e,t){try{const n=await this.api.getStatuses(e,t),r=(0,a.getPreviewStatus)(n,this.previewContext);if(r){const{target_url:e,state:t}=r;return{url:e,status:t}}return null}catch(e){return null}}}},55281:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"API",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"AuthenticationPage",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"AzureBackend",{enumerable:!0,get:function(){return r.default}}),t.DecapCmsBackendAzure=void 0;var r=a(n(52141)),i=a(n(96667)),o=a(n(61325));function a(e){return e&&e.__esModule?e:{default:e}}t.DecapCmsBackendAzure={AzureBackend:r.default,API:i.default,AuthenticationPage:o.default}},84280:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.API_NAME=void 0;var r=u(n(72579)),i=u(n(85395)),o=n(33806),a=n(21023),s=n(13856),l=n(99776);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(e){return e.MERGED="MERGED",e.SUPERSEDED="SUPERSEDED",e.OPEN="OPEN",e.DECLINED="DECLINED",e}(f||{}),p=function(e){return e.Successful="SUCCESSFUL",e.Failed="FAILED",e.InProgress="INPROGRESS",e.Stopped="STOPPED",e}(p||{});const h=t.API_NAME="Bitbucket",m="application/json; charset=utf-8";function g(e){return e&&404===e.status?(console.log("This 404 was expected and handled appropriately."),{size:0,values:[]}):Promise.reject(e)}t.default=class{constructor(e){d(this,"apiRoot",void 0),d(this,"branch",void 0),d(this,"repo",void 0),d(this,"requestFunction",void 0),d(this,"repoURL",void 0),d(this,"commitAuthor",void 0),d(this,"mergeStrategy",void 0),d(this,"initialWorkflowStatus",void 0),d(this,"cmsLabelPrefix",void 0),d(this,"buildRequest",(e=>{const t=o.unsentRequest.withRoot(this.apiRoot)(e);return t.has("cache")?t:o.unsentRequest.withNoCache(t)})),d(this,"request",(e=>{try{return(0,o.requestWithBackoff)(this,e)}catch(e){throw new o.APIError(e.message,null,h)}})),d(this,"responseToJSON",(0,o.responseParser)({format:"json",apiName:h})),d(this,"responseToBlob",(0,o.responseParser)({format:"blob",apiName:h})),d(this,"responseToText",(0,o.responseParser)({format:"text",apiName:h})),d(this,"requestJSON",(e=>this.request(e).then(this.responseToJSON))),d(this,"requestText",(e=>this.request(e).then(this.responseToText))),d(this,"user",(()=>this.requestJSON("/user"))),d(this,"hasWriteAccess",(async()=>{const e=await this.request(this.repoURL);if(404===e.status)throw Error("Repo not found");return e.ok})),d(this,"getBranch",(async e=>await this.requestJSON(`${this.repoURL}/refs/branches/${e}`))),d(this,"branchCommitSha",(async e=>{const{target:{hash:t}}=await this.getBranch(e);return t})),d(this,"defaultBranchCommitSha",(()=>this.branchCommitSha(this.branch))),d(this,"isFile",(({type:e})=>"commit_file"===e)),d(this,"getFileId",((e,t)=>`${e}/${t}`)),d(this,"processFile",(e=>function(e){for(var t=1;te.filter(this.isFile).map(this.processFile))),d(this,"readFile",(async(e,t,{parseText:n=!0,branch:r=this.branch,head:i=""}={})=>await(0,o.readFile)(t,(async()=>{const t=i||await this.branchCommitSha(r);return await this.request({url:`${this.repoURL}/src/${t}/${e}`,cache:"no-store"}).then(n?this.responseToText:this.responseToBlob)}),o.localForage,n))),d(this,"getEntriesAndCursor",(e=>{const{size:t,page:n,pagelen:r,next:i,previous:a,values:s}=e,l=r&&t?Math.ceil(t/r):void 0;return{entries:s,cursor:o.Cursor.create({actions:[...i?["next"]:[],...a?["prev"]:[]],meta:{page:n,count:t,pageSize:r,pageCount:l},data:{links:{next:i,prev:a}}})}})),d(this,"listFiles",(async(e,t=1,n,r)=>{const i=await this.branchCommitSha(r),o=await this.requestJSON({url:`${this.repoURL}/src/${i}/${e}`,params:{max_depth:t,pagelen:n}}).catch(g),{entries:a,cursor:s}=this.getEntriesAndCursor(o);return{entries:this.processFiles(a),cursor:s}})),d(this,"traverseCursor",(async(e,t)=>(0,i.default)([this.requestJSON,(0,o.then)(this.getEntriesAndCursor),(0,o.then)((({cursor:e,entries:t})=>({cursor:e,entries:this.processFiles(t)})))])(e.data.getIn(["links",t])))),d(this,"listAllFiles",(async(e,t,n)=>{const{cursor:r,entries:i}=await this.listFiles(e,t,100,n),o=[...i];let a=r;for(;a&&a.actions.has("next");){const{cursor:e,entries:t}=await this.traverseCursor(a,"next");o.push(...t),a=e}return this.processFiles(o)})),d(this,"deleteFiles",((e,t)=>{const n=new FormData;if(e.forEach((e=>{n.append("files",e)})),n.append("branch",this.branch),t&&n.append("message",t),this.commitAuthor){const{name:e,email:t}=this.commitAuthor;n.append("author",`${e} <${t}>`)}return(0,i.default)([o.unsentRequest.withMethod("POST"),o.unsentRequest.withBody(n),this.request])(`${this.repoURL}/src`)})),this.apiRoot=e.apiRoot||"https://api.bitbucket.org/2.0",this.branch=e.branch||"master",this.repo=e.repo||"",this.requestFunction=e.requestFunction||o.unsentRequest.performRequest,this.hasWriteAccess=e.hasWriteAccess||this.hasWriteAccess,this.repoURL=this.repo?`/repositories/${this.repo}`:"",this.mergeStrategy=e.squashMerges?"squash":"merge_commit",this.initialWorkflowStatus=e.initialWorkflowStatus,this.cmsLabelPrefix=e.cmsLabelPrefix}async readFileMetadata(e,t){return await(0,o.readFileMetadata)(t,(async()=>{try{const{values:t}=await this.requestJSON({url:`${this.repoURL}/commits`,params:{path:e,include:this.branch}}),n=t[0];return{author:n.author.user?n.author.user.display_name||n.author.user.nickname:n.author.raw,updatedOn:n.date}}catch(e){return{author:"",updatedOn:""}}}),o.localForage)}async isShaExistsInBranch(e,t){const{values:n}=await this.requestJSON({url:`${this.repoURL}/commits`,params:{include:e,pagelen:100}}).catch((t=>(console.log(`Failed getting commits for branch '${e}'`,t),[])));return n.some((e=>e.hash===t))}async uploadFiles(e,{commitMessage:t,branch:n,parentSha:i}){const s=new FormData,l=[];e.forEach((e=>{if(e.delete)s.append("files",e.path);else if(e.newPath){const t=(0,r.default)(e,"fileObj",new Blob([e.raw]));l.push({from:e.path,to:e.newPath,contentBlob:t})}else{const t=(0,r.default)(e,"fileObj",new Blob([e.raw]));s.append(e.path,t,(0,o.basename)(e.path))}}));for(const{from:e,to:t,contentBlob:r}of l){const l=(0,a.dirname)(e),u=(0,a.dirname)(t),c=i?this.branch:n,d=await this.listAllFiles(l,100,c);for(const t of d){s.append("files",t.path);const n=t.path===e?r:await this.readFile(t.path,null,{branch:c,parseText:!1});s.append(t.path.replace(l,u),n,(0,o.basename)(t.path))}}if(t&&s.append("message",t),this.commitAuthor){const{name:e,email:t}=this.commitAuthor;s.append("author",`${e} <${t}>`)}s.append("branch",n),i&&s.append("parents",i);try{await this.requestText({url:`${this.repoURL}/src`,method:"POST",body:s})}catch(e){const t=e.message||"";throw i&&t.includes("Something went wrong")&&await(0,o.throwOnConflictingBranches)(n,(e=>this.getBranch(e)),h),e}return e}async persistFiles(e,t,n){const r=[...e,...t];if(n.useWorkflow){const t=e[0].slug;return this.editorialWorkflowGit(r,t,n)}return this.uploadFiles(r,{commitMessage:n.commitMessage,branch:this.branch})}async addPullRequestComment(e,t){await this.requestJSON({method:"POST",url:`${this.repoURL}/pullrequests/${e.id}/comments`,headers:{"Content-Type":m},body:JSON.stringify({content:{raw:t}})})}async getPullRequestLabel(e){const t=await this.requestJSON({url:`${this.repoURL}/pullrequests/${e}/comments`,params:{pagelen:100}});return t.values.map((e=>e.content.raw))[t.values.length-1]}async createPullRequest(e,t,n){const r=await this.requestJSON({method:"POST",url:`${this.repoURL}/pullrequests`,headers:{"Content-Type":m},body:JSON.stringify({title:t,source:{branch:{name:e}},destination:{branch:{name:this.branch}},description:o.DEFAULT_PR_BODY,close_source_branch:!0})});await this.addPullRequestComment(r,(0,o.statusToLabel)(n,this.cmsLabelPrefix))}async getDifferences(e,t=this.branch){if(e===t)return[];const n=await this.requestText({url:`${this.repoURL}/diff/${e}..${t}`,params:{binary:!1}});return(0,l.parse)(n).map((e=>{var t,n;const r=(null===(t=e.oldPath)||void 0===t?void 0:t.replace(/b\//,""))||"",i=(null===(n=e.newPath)||void 0===n?void 0:n.replace(/b\//,""))||"",o=i||r;return{oldPath:r,newPath:i,status:e.status,newFile:"added"===e.status,path:o,binary:e.binary||/.svg$/.test(o)}}))}async editorialWorkflowGit(e,t,n){const r=(0,o.generateContentKey)(n.collectionName,t),i=(0,o.branchFromContentKey)(r);if(n.unpublished){const t=await this.getDifferences(i),r=[];for(const n of t.filter((e=>e.binary&&"deleted"!==e.status)))e.some((e=>e.path===n.path))||r.push({path:n.path,delete:!0});await this.uploadFiles([...e,...r],{commitMessage:n.commitMessage,branch:i})}else{const t=await this.branchCommitSha(this.branch);await this.uploadFiles(e,{commitMessage:n.commitMessage,branch:i,parentSha:t}),await this.createPullRequest(i,n.commitMessage,n.status||this.initialWorkflowStatus)}}async getPullRequests(e){const t=e?`source.branch.name = "${e}"`:`source.branch.name ~ "${o.CMS_BRANCH_PREFIX}/"`,n=await this.requestJSON({url:`${this.repoURL}/pullrequests`,params:{pagelen:50,q:s.oneLine`
- source.repository.full_name = "${this.repo}"
- AND state = "${f.OPEN}"
- AND destination.branch.name = "${this.branch}"
- AND comment_count > 0
- AND ${t}
- `}}),r=await Promise.all(n.values.map((e=>this.getPullRequestLabel(e.id))));return n.values.filter(((e,t)=>(0,o.isCMSLabel)(r[t],this.cmsLabelPrefix)))}async getBranchPullRequest(e){const t=await this.getPullRequests(e);if(t.length<=0)throw new o.EditorialWorkflowError("content is not under editorial workflow",!0);return t[0]}async listUnpublishedBranches(){return console.log("%c Checking for Unpublished entries","line-height: 30px;text-align: center;font-weight: bold"),(await this.getPullRequests()).map((e=>e.source.branch.name))}async retrieveUnpublishedEntryData(e){const{collection:t,slug:n}=(0,o.parseContentKey)(e),r=(0,o.branchFromContentKey)(e),i=await this.getBranchPullRequest(r),a=await this.getDifferences(r),s=await this.getPullRequestLabel(i.id),l=(0,o.labelToStatus)(s,this.cmsLabelPrefix),u=i.updated_on,c=i.author.display_name;return{collection:t,slug:n,status:l,diffs:a.filter((e=>"deleted"!==e.status)).map((e=>({path:e.path,newFile:e.newFile,id:""}))),updatedAt:u,pullRequestAuthor:c}}async updateUnpublishedEntryStatus(e,t,n){const r=(0,o.generateContentKey)(e,t),i=(0,o.branchFromContentKey)(r),a=await this.getBranchPullRequest(i);await this.addPullRequestComment(a,(0,o.statusToLabel)(n,this.cmsLabelPrefix))}async mergePullRequest(e){await this.requestJSON({method:"POST",url:`${this.repoURL}/pullrequests/${e.id}/merge`,headers:{"Content-Type":m},body:JSON.stringify({message:o.MERGE_COMMIT_MESSAGE,close_source_branch:!0,merge_strategy:this.mergeStrategy})})}async publishUnpublishedEntry(e,t){const n=(0,o.generateContentKey)(e,t),r=(0,o.branchFromContentKey)(n),i=await this.getBranchPullRequest(r);await this.mergePullRequest(i)}async declinePullRequest(e){await this.requestJSON({method:"POST",url:`${this.repoURL}/pullrequests/${e.id}/decline`})}async deleteBranch(e){await this.request({method:"DELETE",url:`${this.repoURL}/refs/branches/${e}`})}async deleteUnpublishedEntry(e,t){const n=(0,o.generateContentKey)(e,t),r=(0,o.branchFromContentKey)(n),i=await this.getBranchPullRequest(r);await this.declinePullRequest(i),await this.deleteBranch(r)}async getPullRequestStatuses(e){return(await this.requestJSON({url:`${this.repoURL}/pullrequests/${e.id}/statuses`,params:{pagelen:100}})).values}async getStatuses(e,t){const n=(0,o.generateContentKey)(e,t),r=(0,o.branchFromContentKey)(n),i=await this.getBranchPullRequest(r);return(await this.getPullRequestStatuses(i)).map((({key:e,state:t,url:n})=>({context:e,state:t===p.Successful?o.PreviewState.Success:o.PreviewState.Other,target_url:n})))}async getUnpublishedEntrySha(e,t){const n=(0,o.generateContentKey)(e,t),r=(0,o.branchFromContentKey)(n);return(await this.getBranchPullRequest(r)).destination.commit.hash}}},8387:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(70894)),i=u(n(2784)),o=u(n(13980)),a=n(76320),s=n(30762),l=n(28165);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,r.default)(s.Icon,{target:"e15sc0jo0",label:"LoginButtonIcon"})({name:"1gnqu05",styles:"margin-right:18px"});class f extends i.default.Component{constructor(...e){super(...e),c(this,"state",{}),c(this,"handleLogin",(e=>{e.preventDefault(),this.auth.authenticate(this.authSettings,((e,t)=>{e?this.setState({loginError:e.toString()}):this.props.onLogin(t)}))}))}componentDidMount(){const{auth_type:e=""}=this.props.config.backend;if("implicit"===e){const{base_url:e="https://bitbucket.org",auth_endpoint:t="site/oauth2/authorize",app_id:n=""}=this.props.config.backend;this.auth=new a.ImplicitAuthenticator({base_url:e,auth_endpoint:t,app_id:n,clearHash:this.props.clearHash}),this.auth.completeAuth(((e,t)=>{e?this.setState({loginError:e.toString()}):this.props.onLogin(t)})),this.authSettings={scope:"repository:write"}}else this.auth=new a.NetlifyAuthenticator({base_url:this.props.base_url,site_id:"localhost"===document.location.host.split(":")[0]?"demo.decapcms.org":this.props.siteId,auth_endpoint:this.props.authEndpoint}),this.authSettings={provider:"bitbucket",scope:"repo"}}render(){const{inProgress:e,config:t,t:n}=this.props;return(0,l.jsx)(s.AuthenticationPage,{onLogin:this.handleLogin,loginDisabled:e,loginErrorMessage:this.state.loginError,logoUrl:t.logo_url,siteUrl:t.site_url,renderButtonContent:()=>(0,l.jsx)(i.default.Fragment,null,(0,l.jsx)(d,{type:"bitbucket"}),n(e?"auth.loggingIn":"auth.loginWithBitbucket")),t:n})}}t.default=f,c(f,"propTypes",{onLogin:o.default.func.isRequired,inProgress:o.default.bool,base_url:o.default.string,siteId:o.default.string,authEndpoint:o.default.string,config:o.default.object.isRequired,clearHash:o.default.func,t:o.default.func.isRequired})},88115:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GitLfsClient=void 0;var r,i=(r=n(77339))&&r.__esModule?r:{default:r},o=n(33806);const a=["sha"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t(0,i.default)(e,t,{matchBase:!0})))}async uploadResource(e,t){const n=await this.getResourceUploadRequests([e]);for(const e of n)await this.doUpload(e.actions.upload,t),e.actions.verify&&await this.doVerify(e.actions.verify,e);return e.sha}async doUpload(e,t){await o.unsentRequest.fetchWithTimeout(decodeURI(e.href),{method:"PUT",body:t,headers:e.header})}async doVerify(e,t){this.makeAuthorizedRequest({url:decodeURI(e.href),method:"POST",headers:l(l({},c.defaultContentHeaders),e.header),body:JSON.stringify({oid:t.oid,size:t.size})})}async getResourceUploadRequests(e){const t=await this.makeAuthorizedRequest({url:`${this.rootURL}/objects/batch`,method:"POST",headers:c.defaultContentHeaders,body:JSON.stringify({operation:"upload",transfers:["basic"],objects:e.map((e=>{let{sha:t}=e;return l(l({},function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,a)),{},{oid:t})}))})});return(await t.json()).objects.filter((e=>"error"in e?(console.error(e.error),!1):e.actions))}}t.GitLfsClient=c,u(c,"defaultContentHeaders",{Accept:"application/vnd.git-lfs+json","Content-Type":"application/vnd.git-lfs+json"})},28521:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(93433)),i=f(n(63252)),o=n(13856),a=n(33806),s=n(76320),l=f(n(8387)),u=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n(84280)),c=n(88115);function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t{const t=await this.getToken(),n=a.unsentRequest.withHeaders({Authorization:`Bearer ${t}`},e);return a.unsentRequest.performRequest(n)})),m(this,"apiRequestFunction",(async e=>{const t=this.refreshedTokenPromise?await this.refreshedTokenPromise:this.token,n=a.unsentRequest.withHeaders({Authorization:`Bearer ${t}`},e),r=await a.unsentRequest.performRequest(n);if(401===r.status){const t=await r.json().catch((()=>null));if(t&&"error"===t.type&&/^access token expired/i.test(t.error.message)){const t=await this.getRefreshedAccessToken(),n=a.unsentRequest.withHeaders({Authorization:`Bearer ${t}`},e);return a.unsentRequest.performRequest(n)}}return r})),this.options=h({proxied:!1,API:null,updateUserCredentials:async()=>null,initialWorkflowStatus:""},t),!this.options.proxied&&(null===e.backend.repo||void 0===e.backend.repo))throw new Error('The BitBucket backend needs a "repo" in the backend configuration.');this.api=this.options.API||null,this.updateUserCredentials=this.options.updateUserCredentials,this.repo=e.backend.repo||"",this.branch=e.backend.branch||"master",this.isBranchConfigured=!!e.backend.branch,this.apiRoot=e.backend.api_root||"https://api.bitbucket.org/2.0",this.baseUrl=e.base_url||"",this.siteId=e.site_id||"",this.largeMediaURL=e.backend.large_media_url||`https://bitbucket.org/${e.backend.repo}/info/lfs`,this.token="",this.mediaFolder=e.media_folder,this.squashMerges=e.backend.squash_merges||!1,this.cmsLabelPrefix=e.backend.cms_label_prefix||"",this.previewContext=e.backend.preview_context||"",this.lock=(0,a.asyncLock)(),this.authType=e.backend.auth_type||""}isGitBackend(){return!0}async status(){const e=await b(v).then((e=>e.json())).then((e=>e.components.filter((e=>y.includes(e.name))).every((e=>"operational"===e.status)))).catch((e=>(console.warn("Failed getting BitBucket status",e),!0)));let t=!1;var n;return e&&(t=await(null===(n=this.api)||void 0===n?void 0:n.user().then((e=>!!e)).catch((e=>(console.warn("Failed getting Bitbucket user",e),!1))))||!1),{auth:{status:t},api:{status:e,statusPage:g}}}authComponent(){return l.default}setUser(e){this.token=e.token,this.api=new u.default({requestFunction:this.apiRequestFunction,branch:this.branch,repo:this.repo,squashMerges:this.squashMerges,cmsLabelPrefix:this.cmsLabelPrefix,initialWorkflowStatus:this.options.initialWorkflowStatus})}restoreUser(e){return this.authenticate(e)}async authenticate(e){if(this.token=e.token,!this.isBranchConfigured){const e=await b(`${this.apiRoot}/repositories/${this.repo}`,{headers:{Authorization:`token ${this.token}`}}).then((e=>e.json())).catch((()=>null));e&&(this.branch=e.mainbranch.name)}if(this.refreshToken=e.refresh_token,this.api=new u.default({requestFunction:this.apiRequestFunction,branch:this.branch,repo:this.repo,apiRoot:this.apiRoot,squashMerges:this.squashMerges,cmsLabelPrefix:this.cmsLabelPrefix,initialWorkflowStatus:this.options.initialWorkflowStatus}),!await this.api.hasWriteAccess().catch((e=>{throw e.message=o.stripIndent`
- Repo "${this.repo}" not found.
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("DecapCms",[],t):"object"==typeof exports?exports.DecapCms=t():e.DecapCms=t()}(window,(()=>(()=>{var __webpack_modules__={55034:(e,t,n)=>{"use strict";const r=n(11976),i=n.g.Date;class o extends i{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${r(2,this.getUTCMonth()+1)}-${r(2,this.getUTCDate())}`}}e.exports=e=>{const t=new o(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},59697:(e,t,n)=>{"use strict";const r=n(11976);class i extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){return`${this.getUTCFullYear()}-${r(2,this.getUTCMonth()+1)}-${r(2,this.getUTCDate())}T${r(2,this.getUTCHours())}:${r(2,this.getUTCMinutes())}:${r(2,this.getUTCSeconds())}.${r(3,this.getUTCMilliseconds())}`}}e.exports=e=>{const t=new i(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},12446:e=>{"use strict";e.exports=e=>{const t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},70256:(e,t,n)=>{"use strict";const r=n(11976);class i extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${r(2,this.getUTCHours())}:${r(2,this.getUTCMinutes())}:${r(2,this.getUTCSeconds())}.${r(3,this.getUTCMilliseconds())}`}}e.exports=e=>{const t=new i(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},11976:e=>{"use strict";e.exports=(e,t)=>{for(t=String(t);t.length{"use strict";const t=1114112;class n extends Error{constructor(e,t,r){super("[ParserError] "+e,t,r),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,n)}}class r{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}}class i{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new r(this.parseStart)}parse(e){if(0===e.length||null==e.length)return;let t;for(this._buf=String(e),this.ii=-1,this.char=-1;!1===t||this.nextChar();)t=this.runOne();this._buf=null}nextChar(){return 10===this.char&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii{"use strict";module.exports=makeParserClass(__webpack_require__(86056)),module.exports.makeParserClass=makeParserClass;class TomlError extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,TomlError),this.fromTOML=!0,this.wrapped=null}}TomlError.wrap=e=>{const t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t},module.exports.TomlError=TomlError;const createDateTime=__webpack_require__(12446),createDateTimeFloat=__webpack_require__(59697),createDate=__webpack_require__(55034),createTime=__webpack_require__(70256),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:"\t",[CHAR_n]:"\n",[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}const _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return!!hasOwnProperty.call(e,t)||("__proto__"===t&&defineProperty(e,"__proto__",descriptor),!1)}const INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_TABLE}const TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return null!==e&&"object"==typeof e&&e[_type]===TABLE}const _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_LIST}const LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return null!==e&&"object"==typeof e&&e[_type]===LIST}let _custom;try{const utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}const _inspect=_custom||"inspect";class BoxedBigInt{constructor(e){try{this.value=__webpack_require__.g.BigInt.asIntN(64,e)}catch(e){this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return null===this.value}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}}const INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),__webpack_require__.g.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return null!==e&&"object"==typeof e&&e[_type]===INTEGER}const FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return null!==e&&"object"==typeof e&&e[_type]===FLOAT}function tomlType(e){const t=typeof e;if("object"===t){if(null===e)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){return class extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(e){let t=this.ctx,n=e.key.pop();for(let n of e.key){if(hasKey(t,n)&&(!isTable(t[n])||t[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[n]=t[n]||Table()}if(hasKey(t,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[n]=e.value.valueOf():t[n]=e.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(e){return this.state.resultTable?this.state.resultTable.push(e):this.state.resultTable=[e],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){return this.char===CHAR_PERIOD?this.next(this.parseAssignKeywordPostDot):this.char!==CHAR_SP&&this.char!==CTRL_I?this.goto(this.parseAssignEqual):void 0}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(e){return this.returnNow({key:this.state.resultTable,value:e})}parseComment(){do{if(this.char===e.END||this.char===CTRL_J)return this.return()}while(this.nextChar())}parseTableOrList(){if(this.char!==CHAR_LSQB)return this.goto(this.parseTable);this.next(this.parseList)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)&&(!isTable(this.ctx[e])||this.ctx[e][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[e]=this.ctx[e]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e))if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else{if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine existing key"));this.ctx=this.ctx[e][this.ctx[e].length-1]}else this.ctx=this.ctx[e]=Table();return this.next(this.parseTableNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)||(this.ctx[e]=List()),isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));{const t=Table();this.ctx[e].push(t),this.ctx=t}return this.next(this.parseListEnd)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e)){if(isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else{if(!isTable(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));this.ctx=this.ctx[e]}}else this.ctx=this.ctx[e]=Table();return this.next(this.parseListNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(e){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(e){return this.returnNow(e)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return"-"===this.state.buf?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(!isAlphaNumHyphen(this.char)){if(0===this.state.buf.length)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}this.consume()}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let e="\\u00";return this.char<16&&(e+="0"),e+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${e} instead`))}recordMultiEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(e){try{const t=parseInt(e,16);if(t>=SURROGATE_FIRST&&t<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(t))}catch(e){throw this.error(TomlError.wrap(e))}}parseSmallUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=4)return this.return()}parseLargeUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=8)return this.return()}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(!isDigit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberFloat):isDigit(this.char)?void this.consume():this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS)throw this.error(new TomlError("Unexpected character, expected -, + or digit"));this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent)}parseNumberExponent(){if(!isDigit(this.char))return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf));this.consume()}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberInteger):isDigit(this.char)?(this.consume(),void(this.state.buf.length>4&&this.next(this.parseNumberInteger))):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(!isHexit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerOct(){if(!isOctit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerBin(){if(!isBit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseTimeMin(){if(!(this.state.buf.length<2&&isDigit(this.char))){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}this.consume()}parseTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));if(this.consume(),2===this.state.buf.length)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(!(this.state.buf.length<2&&isDigit(this.char))){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}this.consume()}parseOnlyTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete time"));if(this.consume(),2===this.state.buf.length)return this.next(this.parseOnlyTimeFractionMaybe)}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char!==CHAR_PERIOD)return this.return(createTime(this.state.result));this.state.buf="",this.next(this.parseOnlyTimeFraction)}parseOnlyTimeFraction(){if(!isDigit(this.char)){if(this.atEndOfWord()){if(0===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume()}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else{if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(1===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseTimeZoneHour(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}parseTimeZoneSep(){if(this.char!==CHAR_COLON)throw this.error(new TomlError("Unexpected character in datetime, expected colon"));this.consume(),this.next(this.parseTimeZoneMin)}parseTimeZoneMin(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}parseBoolean(){return this.char===CHAR_t?(this.consume(),this.next(this.parseTrue_r)):this.char===CHAR_f?(this.consume(),this.next(this.parseFalse_a)):void 0}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(e){if(this.state.resultArr){const t=this.state.resultArr[_contentType],n=tomlType(e);if(t!==n)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${t} and ${n}`))}else this.state.resultArr=InlineList(tomlType(e));return isFloat(e)||isInteger(e)?this.state.resultArr.push(e.valueOf()):this.state.resultArr.push(e),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(e){let t=this.state.resultTable,n=e.key.pop();for(let n of e.key){if(hasKey(t,n)&&(!isTable(t[n])||t[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[n]=t[n]||Table()}if(hasKey(t,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[n]=e.value.valueOf():t[n]=e.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}}},66615:(e,t,n)=>{"use strict";e.exports=function(e,t){t||(t={});const n=t.blocksize||40960,o=new r;return new Promise(((e,t)=>{setImmediate(a,0,n,e,t)}));function a(t,n,r,s){if(t>=e.length)try{return r(o.finish())}catch(t){return s(i(t,e))}try{o.parse(e.slice(t,t+n)),setImmediate(a,t+n,n,r,s)}catch(t){s(i(t,e))}}};const r=n(77146),i=n(53146)},53146:e=>{"use strict";e.exports=function(e,t){if(null==e.pos||null==e.line)return e;let n=e.message;if(n+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:\n`,t&&t.split){const r=t.split(/\n/),i=String(Math.min(r.length,e.line+3)).length;let o=" ";for(;o.length "+r[t]+"\n",n+=o+" ";for(let t=0;t{"use strict";e.exports=function(e){return e?function(e){const t=new i;return e.setEncoding("utf8"),new Promise(((n,r)=>{let i,o=!1,a=!1;function s(){if(o=!0,!i)try{n(t.finish())}catch(e){r(e)}}function l(e){a=!0,r(e)}e.once("end",s),e.once("error",l),function n(){let r;for(i=!0;null!==(r=e.read());)try{t.parse(r)}catch(e){return l(e)}if(i=!1,o)return s();a||e.once("readable",n)}()}))}(e):function(){const e=new i;return new r.Transform({objectMode:!0,transform(t,n,r){try{e.parse(t.toString(n))}catch(e){this.emit("error",e)}r()},flush(t){try{this.push(e.finish())}catch(e){this.emit("error",e)}t()}})}()};const r=n(54851),i=n(77146)},13475:(e,t,n)=>{"use strict";e.exports=function(e){n.g.Buffer&&n.g.Buffer.isBuffer(e)&&(e=e.toString("utf8"));const t=new r;try{return t.parse(e),t.finish()}catch(t){throw i(t,e)}};const r=n(77146),i=n(53146)},53279:(e,t,n)=>{"use strict";e.exports=n(13475),e.exports.async=n(66615),e.exports.stream=n(24312),e.exports.prettyError=n(53146)},57573:e=>{"use strict";function t(e){return new Error("Can only stringify objects, not "+e)}function n(e){return Object.keys(e).filter((t=>o(e[t])))}function r(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let n of Object.keys(e))e[n]&&"function"==typeof e[n].toJSON&&!("toISOString"in e[n])?t[n]=e[n].toJSON():t[n]=e[n];return t}function i(e,l,u){var d,p;d=n(u=r(u)),p=function(e){return Object.keys(e).filter((t=>!o(e[t])))}(u);var h=[],m=l||"";d.forEach((e=>{var t=a(u[e]);"undefined"!==t&&"null"!==t&&h.push(m+s(e)+" = "+c(u[e],!0))})),h.length>0&&h.push("");var g=e&&d.length>0?l+" ":"";return p.forEach((o=>{h.push(function(e,o,l,u){var c=a(u);if("array"===c)return function(e,n,o,l){f(l=r(l));var u=a(l[0]);if("table"!==u)throw t(u);var c=e+s(o),d="";return l.forEach((e=>{d.length>0&&(d+="\n"),d+=n+"[["+c+"]]\n",d+=i(c+".",n,e)})),d}(e,o,l,u);if("table"===c)return function(e,t,r,o){var a=e+s(r),l="";return n(o).length>0&&(l+=t+"["+a+"]\n"),l+i(a+".",t,o)}(e,o,l,u);throw t(c)}(e,g,o,u[o]))})),h.join("\n")}function o(e){switch(a(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return 0===e.length||"table"!==a(e[0]);case"table":return 0===Object.keys(e).length;default:return!1}}function a(e){return void 0===e?"undefined":null===e?"null":"bigint"==typeof e||Number.isInteger(e)&&!Object.is(e,-0)?"integer":"number"==typeof e?"float":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"toISOString"in e?isNaN(e)?"undefined":"datetime":Array.isArray(e)?"array":"table"}function s(e){var t=String(e);return/^[-A-Za-z0-9_]+$/.test(t)?t:l(t)}function l(e){return'"'+u(e).replace(/"/g,'\\"')+'"'}function u(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,(e=>"\\u"+function(e,t){for(;t.length<4;)t="0"+t;return t}(0,e.codePointAt(0).toString(16))))}function c(e,t){let n=a(e);return"string"===n&&(t&&/\n/.test(e)?n="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(n="string-literal")),d(e,n)}function d(e,n){switch(n||(n=a(e)),n){case"string-multiline":return function(e){let t=e.split(/\n/).map((e=>u(e).replace(/"(?="")/g,'\\"'))).join("\n");return'"'===t.slice(-1)&&(t+="\\\n"),'"""\n'+t+'"""'}(e);case"string":return l(e);case"string-literal":return"'"+e+"'";case"integer":return p(e);case"float":return function(e){if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Object.is(e,NaN))return"nan";if(Object.is(e,-0))return"-0.0";var t=String(e).split("."),n=t[0],r=t[1]||0;return p(n)+"."+r}(e);case"boolean":return function(e){return String(e)}(e);case"datetime":return function(e){return e.toISOString()}(e);case"array":return function(e){const t=f(e=r(e));var n="[",i=e.map((e=>d(e,t)));return i.join(", ").length>60||/\n/.test(i)?n+="\n "+i.join(",\n ")+"\n":n+=" "+i.join(", ")+(i.length>0?" ":""),n+"]"}(e.filter((e=>"null"!==a(e)&&"undefined"!==a(e)&&"nan"!==a(e))));case"table":return function(e){e=r(e);var t=[];return Object.keys(e).forEach((n=>{t.push(s(n)+" = "+c(e[n],!1))})),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}(e);default:throw t(n)}}function p(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function f(e){const t=function(e){var t=a(e[0]);return e.every((e=>a(e)===t))?t:e.every((e=>{return"float"===(t=a(e))||"integer"===t;var t}))?"float":"mixed"}(e);if("mixed"===t)throw new Error("Array values can't have mixed types");return t}e.exports=function(e){if(null===e)throw t("null");if(void 0===e)throw t("undefined");if("object"!=typeof e)throw t(typeof e);if("function"==typeof e.toJSON&&(e=e.toJSON()),null==e)return null;const n=a(e);if("table"!==n)throw t(n);return i("","",e)},e.exports.value=d},6901:(e,t,n)=>{"use strict";t.parse=n(53279),t.stringify=n(57573)},47988:(e,t,n)=>{"use strict";var r,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:a,height:l},c)},d),o.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},16331:(e,t,n)=>{"use strict";var r,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:a,height:l},c)},d),o.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},16336:e=>{e.exports={__schema:{types:[{kind:"INTERFACE",name:"Node",possibleTypes:[{name:"AddedToProjectEvent"},{name:"App"},{name:"AssignedEvent"},{name:"BaseRefChangedEvent"},{name:"BaseRefForcePushedEvent"},{name:"Blob"},{name:"Bot"},{name:"BranchProtectionRule"},{name:"ClosedEvent"},{name:"CodeOfConduct"},{name:"CommentDeletedEvent"},{name:"Commit"},{name:"CommitComment"},{name:"CommitCommentThread"},{name:"ConvertedNoteToIssueEvent"},{name:"CrossReferencedEvent"},{name:"DemilestonedEvent"},{name:"DeployKey"},{name:"DeployedEvent"},{name:"Deployment"},{name:"DeploymentEnvironmentChangedEvent"},{name:"DeploymentStatus"},{name:"ExternalIdentity"},{name:"Gist"},{name:"GistComment"},{name:"HeadRefDeletedEvent"},{name:"HeadRefForcePushedEvent"},{name:"HeadRefRestoredEvent"},{name:"Issue"},{name:"IssueComment"},{name:"Label"},{name:"LabeledEvent"},{name:"Language"},{name:"License"},{name:"LockedEvent"},{name:"Mannequin"},{name:"MarketplaceCategory"},{name:"MarketplaceListing"},{name:"MentionedEvent"},{name:"MergedEvent"},{name:"Milestone"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"Organization"},{name:"OrganizationIdentityProvider"},{name:"OrganizationInvitation"},{name:"PinnedEvent"},{name:"Project"},{name:"ProjectCard"},{name:"ProjectColumn"},{name:"PublicKey"},{name:"PullRequest"},{name:"PullRequestCommit"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"},{name:"PullRequestReviewThread"},{name:"PushAllowance"},{name:"Reaction"},{name:"ReadyForReviewEvent"},{name:"Ref"},{name:"ReferencedEvent"},{name:"RegistryPackage"},{name:"RegistryPackageDependency"},{name:"RegistryPackageFile"},{name:"RegistryPackageTag"},{name:"RegistryPackageVersion"},{name:"Release"},{name:"ReleaseAsset"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"Repository"},{name:"RepositoryInvitation"},{name:"RepositoryTopic"},{name:"ReviewDismissalAllowance"},{name:"ReviewDismissedEvent"},{name:"ReviewRequest"},{name:"ReviewRequestRemovedEvent"},{name:"ReviewRequestedEvent"},{name:"SavedReply"},{name:"SecurityAdvisory"},{name:"SponsorsListing"},{name:"Sponsorship"},{name:"Status"},{name:"StatusContext"},{name:"SubscribedEvent"},{name:"Tag"},{name:"Team"},{name:"Topic"},{name:"TransferredEvent"},{name:"Tree"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"},{name:"User"},{name:"UserBlockedEvent"},{name:"UserContentEdit"},{name:"UserStatus"}]},{kind:"INTERFACE",name:"UniformResourceLocatable",possibleTypes:[{name:"Bot"},{name:"ClosedEvent"},{name:"Commit"},{name:"CrossReferencedEvent"},{name:"Gist"},{name:"Issue"},{name:"Mannequin"},{name:"MergedEvent"},{name:"Milestone"},{name:"Organization"},{name:"PullRequest"},{name:"PullRequestCommit"},{name:"ReadyForReviewEvent"},{name:"Release"},{name:"Repository"},{name:"RepositoryTopic"},{name:"ReviewDismissedEvent"},{name:"User"}]},{kind:"INTERFACE",name:"Actor",possibleTypes:[{name:"Bot"},{name:"Mannequin"},{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"RegistryPackageOwner",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"User"}]},{kind:"INTERFACE",name:"ProjectOwner",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"User"}]},{kind:"INTERFACE",name:"Closable",possibleTypes:[{name:"Issue"},{name:"Milestone"},{name:"Project"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Updatable",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"Project"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"UNION",name:"ProjectCardItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Assignable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Comment",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"UpdatableComment",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Labelable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Lockable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"RegistryPackageSearch",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"RepositoryOwner",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"MemberStatusable",possibleTypes:[{name:"Organization"},{name:"Team"}]},{kind:"INTERFACE",name:"ProfileOwner",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"UNION",name:"PinnableItem",possibleTypes:[{name:"Gist"},{name:"Repository"}]},{kind:"INTERFACE",name:"Starrable",possibleTypes:[{name:"Gist"},{name:"Repository"},{name:"Topic"}]},{kind:"INTERFACE",name:"RepositoryInfo",possibleTypes:[{name:"Repository"}]},{kind:"INTERFACE",name:"GitObject",possibleTypes:[{name:"Blob"},{name:"Commit"},{name:"Tag"},{name:"Tree"}]},{kind:"INTERFACE",name:"RepositoryNode",possibleTypes:[{name:"CommitComment"},{name:"CommitCommentThread"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Subscribable",possibleTypes:[{name:"Commit"},{name:"Issue"},{name:"PullRequest"},{name:"Repository"},{name:"Team"}]},{kind:"INTERFACE",name:"Deletable",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"IssueComment"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Reactable",possibleTypes:[{name:"CommitComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"GitSignature",possibleTypes:[{name:"GpgSignature"},{name:"SmimeSignature"},{name:"UnknownSignature"}]},{kind:"UNION",name:"RequestedReviewer",possibleTypes:[{name:"User"},{name:"Team"},{name:"Mannequin"}]},{kind:"UNION",name:"PullRequestTimelineItem",possibleTypes:[{name:"Commit"},{name:"CommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewThread"},{name:"PullRequestReviewComment"},{name:"IssueComment"},{name:"ClosedEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"UnsubscribedEvent"},{name:"MergedEvent"},{name:"ReferencedEvent"},{name:"CrossReferencedEvent"},{name:"AssignedEvent"},{name:"UnassignedEvent"},{name:"LabeledEvent"},{name:"UnlabeledEvent"},{name:"MilestonedEvent"},{name:"DemilestonedEvent"},{name:"RenamedTitleEvent"},{name:"LockedEvent"},{name:"UnlockedEvent"},{name:"DeployedEvent"},{name:"DeploymentEnvironmentChangedEvent"},{name:"HeadRefDeletedEvent"},{name:"HeadRefRestoredEvent"},{name:"HeadRefForcePushedEvent"},{name:"BaseRefForcePushedEvent"},{name:"ReviewRequestedEvent"},{name:"ReviewRequestRemovedEvent"},{name:"ReviewDismissedEvent"},{name:"UserBlockedEvent"}]},{kind:"UNION",name:"Closer",possibleTypes:[{name:"Commit"},{name:"PullRequest"}]},{kind:"UNION",name:"ReferencedSubject",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"Assignee",possibleTypes:[{name:"Bot"},{name:"Mannequin"},{name:"Organization"},{name:"User"}]},{kind:"UNION",name:"MilestoneItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"RenamedTitleSubject",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"PullRequestTimelineItems",possibleTypes:[{name:"PullRequestCommit"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewThread"},{name:"PullRequestRevisionMarker"},{name:"BaseRefChangedEvent"},{name:"BaseRefForcePushedEvent"},{name:"DeployedEvent"},{name:"DeploymentEnvironmentChangedEvent"},{name:"HeadRefDeletedEvent"},{name:"HeadRefForcePushedEvent"},{name:"HeadRefRestoredEvent"},{name:"MergedEvent"},{name:"ReviewDismissedEvent"},{name:"ReviewRequestedEvent"},{name:"ReviewRequestRemovedEvent"},{name:"ReadyForReviewEvent"},{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"AddedToProjectEvent"},{name:"AssignedEvent"},{name:"ClosedEvent"},{name:"CommentDeletedEvent"},{name:"ConvertedNoteToIssueEvent"},{name:"DemilestonedEvent"},{name:"LabeledEvent"},{name:"LockedEvent"},{name:"MentionedEvent"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"PinnedEvent"},{name:"ReferencedEvent"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"TransferredEvent"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UserBlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"}]},{kind:"UNION",name:"IssueOrPullRequest",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"IssueTimelineItem",possibleTypes:[{name:"Commit"},{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"ClosedEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"UnsubscribedEvent"},{name:"ReferencedEvent"},{name:"AssignedEvent"},{name:"UnassignedEvent"},{name:"LabeledEvent"},{name:"UnlabeledEvent"},{name:"UserBlockedEvent"},{name:"MilestonedEvent"},{name:"DemilestonedEvent"},{name:"RenamedTitleEvent"},{name:"LockedEvent"},{name:"UnlockedEvent"},{name:"TransferredEvent"}]},{kind:"UNION",name:"IssueTimelineItems",possibleTypes:[{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"AddedToProjectEvent"},{name:"AssignedEvent"},{name:"ClosedEvent"},{name:"CommentDeletedEvent"},{name:"ConvertedNoteToIssueEvent"},{name:"DemilestonedEvent"},{name:"LabeledEvent"},{name:"LockedEvent"},{name:"MentionedEvent"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"PinnedEvent"},{name:"ReferencedEvent"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"TransferredEvent"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UserBlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"}]},{kind:"UNION",name:"ReviewDismissalAllowanceActor",possibleTypes:[{name:"User"},{name:"Team"}]},{kind:"UNION",name:"PushAllowanceActor",possibleTypes:[{name:"User"},{name:"Team"}]},{kind:"UNION",name:"PermissionGranter",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"Team"}]},{kind:"INTERFACE",name:"Sponsorable",possibleTypes:[{name:"User"}]},{kind:"INTERFACE",name:"Contribution",possibleTypes:[{name:"CreatedCommitContribution"},{name:"CreatedIssueContribution"},{name:"CreatedPullRequestContribution"},{name:"CreatedPullRequestReviewContribution"},{name:"CreatedRepositoryContribution"},{name:"JoinedGitHubContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedRepositoryOrRestrictedContribution",possibleTypes:[{name:"CreatedRepositoryContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedIssueOrRestrictedContribution",possibleTypes:[{name:"CreatedIssueContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedPullRequestOrRestrictedContribution",possibleTypes:[{name:"CreatedPullRequestContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"SearchResultItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"},{name:"Repository"},{name:"User"},{name:"Organization"},{name:"MarketplaceListing"},{name:"App"}]},{kind:"UNION",name:"CollectionItemContent",possibleTypes:[{name:"Repository"},{name:"Organization"},{name:"User"}]}]}}},87683:e=>{"use strict";e.exports=function(e){if(e)throw e}},82294:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=n(e,i)),t instanceof RegExp&&(t=n(t,i));var o=r(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function r(e,t,n){var r,i,o,a,s,l=n.indexOf(e),u=n.indexOf(t,l+1),c=l;if(l>=0&&u>0){if(e===t)return[l,u];for(r=[],o=n.length;c>=0&&!s;)c==l?(r.push(c),l=n.indexOf(e,c+1)):1==r.length?s=[r.pop(),u]:((i=r.pop())=0?l:u;r.length&&(s=[o,a])}return s}e.exports=t,t.range=r},95766:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o=s(e),a=o[0],l=o[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,l)),c=0,d=l>0?a-4:a;for(n=0;n>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[c++]=255&t),1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,s=0,u=r-i;su?u:s+a));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,r){for(var i,o,a=[],s=t;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},48834:(e,t,n)=>{"use strict";const r=n(95766),i=n(62333),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|m(e,t);let r=s(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);const i=function(e){if(l.isBuffer(e)){const t=0|h(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?s(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return c(e),s(e<0?0:0|h(e))}function p(e){const t=e.length<0?0:0|h(e.length),n=s(t);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(i)return r?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){let o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){let n=!0;for(let r=0;ri&&(r=i):r=i;const o=t.length;let a;for(r>o/2&&(r=o/2),a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,s,l;switch(a){case 1:t<128&&(o=t);break;case 2:n=e[i+1],128==(192&n)&&(l=(31&t)<<6|63&n,l>127&&(o=l));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(l=(15&t)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){const t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(Y(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(o,a),u=this.slice(r,i),c=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":case"latin1":case"binary":return x(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function T(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;ir)&&(n=r);let i="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function I(e,t,n,r,i){q(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function L(e,t,n,r,i){q(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function N(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,o){return t=+t,n>>>=0,o||N(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,o){return t=+t,n>>>=0,o||N(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Q((function(e){$(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e],i=1,o=0;for(;++o=i&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Q((function(e){$(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||R(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Q((function(e,t=0){return I(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Q((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}let i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Q((function(e,t=0){return I(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Q((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function q(e,t,n,r,i,o){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){$(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||W(t,e.length-(n+1))}(r,i,o)}function $(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,n){if(Math.floor(e)!==e)throw $(e,n),new B.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}z("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),z("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),z("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=U(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function V(e,t){let n;t=t||1/0;const r=e.length;let i=null;const o=[];for(let a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function G(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Q(e){return"undefined"==typeof BigInt?J:e}function J(){throw new Error("BigInt not supported")}},62680:(e,t,n)=>{"use strict";var r=n(67286),i=n(89429),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?i(n):n}},89429:(e,t,n)=>{"use strict";var r=n(4090),i=n(67286),o=n(47669),a=n(5408),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(l,s),c=n(70999),d=i("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=u(r,l,arguments);return o(t,1+d(0,e.length-(arguments.length-1)),!0)};var p=function(){return u(r,s,arguments)};c?c(e.exports,"apply",{value:p}):e.exports.apply=p},53404:e=>{"use strict";e.exports=function(e,t){var n,r=String(e),i=0;if("string"!=typeof t)throw new Error("Expected character");for(n=r.indexOf(t);-1!==n;)i++,n=r.indexOf(t,n+t.length);return i}},15971:(e,t,n)=>{!function(e){function t(t,n,r){var i,o=t.getWrapperElement();return(i=o.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(o,"dialog-opened"),i}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(r,i,o){o||(o={}),n(this,null);var a=t(this,r,o.bottom),s=!1,l=this;function u(t){if("string"==typeof t)d.value=t;else{if(s)return;s=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),l.focus(),o.onClose&&o.onClose(a)}}var c,d=a.getElementsByTagName("input")[0];return d?(d.focus(),o.value&&(d.value=o.value,!1!==o.selectValueOnOpen&&d.select()),o.onInput&&e.on(d,"input",(function(e){o.onInput(e,d.value,u)})),o.onKeyUp&&e.on(d,"keyup",(function(e){o.onKeyUp(e,d.value,u)})),e.on(d,"keydown",(function(t){o&&o.onKeyDown&&o.onKeyDown(t,d.value,u)||((27==t.keyCode||!1!==o.closeOnEnter&&13==t.keyCode)&&(d.blur(),e.e_stop(t),u()),13==t.keyCode&&i(d.value,t))})),!1!==o.closeOnBlur&&e.on(a,"focusout",(function(e){null!==e.relatedTarget&&u()}))):(c=a.getElementsByTagName("button")[0])&&(e.on(c,"click",(function(){u(),l.focus()})),!1!==o.closeOnBlur&&e.on(c,"blur",u),c.focus()),u})),e.defineExtension("openConfirm",(function(r,i,o){n(this,null);var a=t(this,r,o&&o.bottom),s=a.getElementsByTagName("button"),l=!1,u=this,c=1;function d(){l||(l=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),u.focus())}s[0].focus();for(var p=0;p{!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var s=e.getLineHandle(t.line),l=t.ch-1,u=o&&o.afterCursor;null==u&&(u=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=i(o),d=!u&&l>=0&&c.test(s.text.charAt(l))&&r[s.text.charAt(l)]||c.test(s.text.charAt(l+1))&&r[s.text.charAt(++l)];if(!d)return null;var p=">"==d.charAt(1)?1:-1;if(o&&o.strict&&p>0!=(l==t.ch))return null;var f=e.getTokenTypeAt(n(t.line,l+1)),h=a(e,n(t.line,l+(p>0?1:0)),p,f,o);return null==h?null:{from:n(t.line,l),to:h&&h.pos,match:h&&h.ch==d.charAt(0),forward:p>0}}function a(e,t,o,a,s){for(var l=s&&s.maxScanLineLength||1e4,u=s&&s.maxScanLines||1e3,c=[],d=i(s),p=o>0?Math.min(t.line+u,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-u),f=t.line;f!=p;f+=o){var h=e.getLine(f);if(h){var m=o>0?0:h.length-1,g=o>0?h.length:-1;if(!(h.length>l))for(f==t.line&&(m=t.ch-(o<0?1:0));m!=g;m+=o){var v=h.charAt(m);if(d.test(v)&&(void 0===a||(e.getTokenTypeAt(n(f,m+1))||"")==(a||""))){var y=r[v];if(y&&">"==y.charAt(1)==o>0)c.push(v);else{if(!c.length)return{pos:n(f,m),ch:v};c.pop()}}}}}return f-o!=(o>0?e.lastLine():e.firstLine())&&null}function s(e,r,i){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,s=i&&i.highlightNonMatching,l=[],u=e.listSelections(),c=0;c{!function(e){"use strict";e.multiplexingMode=function(t){var n=Array.prototype.slice.call(arguments,1);function r(e,t,n,r){if("string"==typeof t){var i=e.indexOf(t,n);return r&&i>-1?i+t.length:i}var o=t.exec(n?e.slice(n):e);return o?o.index+n+(r?o[0].length:0):-1}return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null,startingInner:!1}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner),startingInner:n.startingInner}},token:function(i,o){if(o.innerActive){var a=o.innerActive;if(u=i.string,!a.close&&i.sol())return o.innerActive=o.inner=null,this.token(i,o);if((d=a.close&&!o.startingInner?r(u,a.close,i.pos,a.parseDelimiters):-1)==i.pos&&!a.parseDelimiters)return i.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";d>-1&&(i.string=u.slice(0,d));var s=a.mode.token(i,o.inner);return d>-1?i.string=u:i.pos>i.start&&(o.startingInner=!1),d==i.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(s=s?s+" "+a.innerStyle:a.innerStyle),s}for(var l=1/0,u=i.string,c=0;c{!function(e){"use strict";e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos){!function(e){"use strict";function t(e,t){if(!e.hasOwnProperty(t))throw new Error("Undefined state "+t+" in simple mode")}function n(e,t){if(!e)return/(?:)/;var n="";return e instanceof RegExp?(e.ignoreCase&&(n="i"),e.unicode&&(n+="u"),e=e.source):e=String(e),new RegExp((!1===t?"":"^")+"(?:"+e+")",n)}function r(e,r){(e.next||e.push)&&t(r,e.next||e.push),this.regex=n(e.regex),this.token=function(e){if(!e)return null;if(e.apply)return e;if("string"==typeof e)return e.replace(/\./g," ");for(var t=[],n=0;n2&&c.token&&"string"!=typeof c.token){for(var f=2;f-1)return e.Pass;var a=r.indent.length-1,s=t[r.state];e:for(;;){for(var l=0;l{!function(e){"use strict";var t,n,r=e.Pos;function i(e,t){for(var n=function(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}(e),r=n,i=0;ic);d++){var p=e.getLine(u++);s=null==s?p:s+"\n"+p}l*=2,t.lastIndex=n.ch;var f=t.exec(s);if(f){var h=s.slice(0,f.index).split("\n"),m=f[0].split("\n"),g=n.line+h.length-1,v=h[h.length-1].length;return{from:r(g,v),to:r(g+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:f}}}}function l(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function u(e,t,n){t=i(t,"g");for(var o=n.line,a=n.ch,s=e.firstLine();o>=s;o--,a=-1){var u=e.getLine(o),c=l(u,t,a<0?0:u.length-a);if(c)return{from:r(o,c.index),to:r(o,c.index+c[0].length),match:c}}}function c(e,t,n){if(!o(t))return u(e,t,n);t=i(t,"gm");for(var a,s=1,c=e.getLine(n.line).length-n.ch,d=n.line,p=e.firstLine();d>=p;){for(var f=0;f=p;f++){var h=e.getLine(d--);a=null==a?h:h+"\n"+a}s*=2;var m=l(a,t,c);if(m){var g=a.slice(0,m.index).split("\n"),v=m[0].split("\n"),y=d+g.length,b=g[g.length-1].length;return{from:r(y,b),to:r(y+v.length-1,1==v.length?b+v[0].length:v[v.length-1].length),match:m}}}}function d(e,t,n,r){if(e.length==t.length)return n;for(var i=0,o=n+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?o=a:i=a+1}}function p(e,i,o,a){if(!i.length)return null;var s=a?t:n,l=s(i).split(/\r|\n\r?/);e:for(var u=o.line,c=o.ch,p=e.lastLine()+1-l.length;u<=p;u++,c=0){var f=e.getLine(u).slice(c),h=s(f);if(1==l.length){var m=h.indexOf(l[0]);if(-1==m)continue e;return o=d(f,h,m,s)+c,{from:r(u,d(f,h,m,s)+c),to:r(u,d(f,h,m+l[0].length,s)+c)}}var g=h.length-l[0].length;if(h.slice(g)==l[0]){for(var v=1;v=p;u--,c=-1){var f=e.getLine(u);c>-1&&(f=f.slice(0,c));var h=s(f);if(1==l.length){var m=h.lastIndexOf(l[0]);if(-1==m)continue e;return{from:r(u,d(f,h,m,s)),to:r(u,d(f,h,m+l[0].length,s))}}var g=l[l.length-1];if(h.slice(0,g.length)==g){var v=1;for(o=u-l.length+1;v(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var i=this.matches(t,n);if(this.afterEmptyMatch=i&&0==e.cmpPos(i.from,i.to),i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var o=r(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,n){return new h(this.doc,e,t,n)})),e.defineDocExtension("getSearchCursor",(function(e,t,n){return new h(this,e,t,n)})),e.defineExtension("selectMatches",(function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))}(n(23326))},83280:(e,t,n)=>{!function(e){"use strict";var t=e.commands,n=e.Pos;function r(e,t){return e.line==t.line&&e.ch==t.ch}var i=[];function o(e){i.push(e),i.length>50&&i.shift()}function a(e){return i[i.length-(e?Math.min(e,1):1)]||""}var s=null;function l(e,t,n,a,l){null==l&&(l=e.getRange(t,n)),"grow"==a&&s&&s.cm==e&&r(t,s.pos)&&e.isClean(s.gen)?function(e){if(!i.length)return o(e);i[i.length-1]+=e}(l):!1!==a&&o(l),e.replaceRange("",t,n,"+delete"),s="grow"==a?{cm:e,pos:t,gen:e.changeGeneration()}:null}function u(e,t,n){return e.findPosH(t,n,"char",!0)}function c(e,t,n){return e.findPosH(t,n,"word",!0)}function d(e,t,n){return e.findPosV(t,n,"line",e.doc.sel.goalColumn)}function p(e,t,n){return e.findPosV(t,n,"page",e.doc.sel.goalColumn)}function f(e,t,r){for(var i=t.line,o=e.getLine(i),a=/\S/.test(r<0?o.slice(0,t.ch):o.slice(t.ch)),s=e.firstLine(),l=e.lastLine();;){if((i+=r)l)return e.clipPos(n(i-r,r<0?0:null));if(o=e.getLine(i),/\S/.test(o))a=!0;else if(a)return n(i,0)}}function h(e,t,r){for(var i=t.line,o=t.ch,a=e.getLine(t.line),s=!1;;){var l=a.charAt(o+(r<0?-1:0));if(l){if(s&&/[!?.]/.test(l))return n(i,o+(r>0?1:0));s||(s=/\w/.test(l)),o+=r}else{if(i==(r<0?e.firstLine():e.lastLine()))return n(i,o);if(a=e.getLine(i+r),!/\S/.test(a))return n(i,o);i+=r,o=r<0?a.length:0}}}function m(e,t,i){var o;if(e.findMatchingBracket&&(o=e.findMatchingBracket(t,{strict:!0}))&&o.match&&(o.forward?1:-1)==i)return i>0?n(o.to.line,o.to.ch+1):o.to;for(var a=!0;;a=!1){var s=e.getTokenAt(t),l=n(t.line,i<0?s.start:s.end);if(!(a&&i>0&&s.end==t.ch)&&/\w/.test(s.string))return l;var u=e.findPosH(l,i,"char");if(r(l,u))return t;t=u}}function g(e,t){var n=e.state.emacsPrefix;return n?(C(e),"-"==n?-1:Number(n)):t?null:1}function v(e){var t="string"==typeof e?function(t){t.execCommand(e)}:e;return function(e){var n=g(e);t(e);for(var r=1;r1&&"+input"==t.origin){for(var r=t.text.join("\n"),i="",o=1;o1&&i.pop(),a()),"around","paste")},t.forwardChar=b(u,1),t.backwardChar=b(u,-1),t.deleteChar=function(e){w(e,u,1,!1)},t.deleteForwardChar=function(e){_(e,!1)||w(e,u,1,!1)},t.deleteBackwardChar=function(e){_(e,!1)||w(e,u,-1,!1)},t.forwardWord=b(c,1),t.backwardWord=b(c,-1),t.killWord=function(e){w(e,c,1,"grow")},t.backwardKillWord=function(e){w(e,c,-1,"grow")},t.nextLine=b(d,1),t.previousLine=b(d,-1),t.scrollDownCommand=b(p,-1),t.scrollUpCommand=b(p,1),t.backwardParagraph=b(f,-1),t.forwardParagraph=b(f,1),t.backwardSentence=b(h,-1),t.forwardSentence=b(h,1),t.killSentence=function(e){w(e,h,1,"grow")},t.backwardKillSentence=function(e){l(e,e.getCursor(),h(e,e.getCursor(),1),"grow")},t.killSexp=function(e){w(e,m,1,"grow")},t.backwardKillSexp=function(e){w(e,m,-1,"grow")},t.forwardSexp=b(m,1),t.backwardSexp=b(m,-1),t.markSexp=function(e){var t=e.getCursor();e.setSelection(y(e,t,m,1),t)},t.transposeSexps=function(e){var t=m(e,e.getCursor(),-1),n=m(e,t,1),r=m(e,n,1),i=m(e,r,-1);e.replaceRange(e.getRange(i,r)+e.getRange(n,i)+e.getRange(t,n),t,r)},t.backwardUpList=v((function(e){for(var t=e.getCursor(),r=t.line,i=t.ch,o=[];r>=e.firstLine();){for(var a=e.getLine(r),s=null==i?a.length:i;s>0;)if(")"==(i=a.charAt(--s)))o.push("(");else if("]"==i)o.push("[");else if("}"==i)o.push("{");else if(/[\(\{\[]/.test(i)&&(!o.length||o.pop()!=i))return e.extendSelection(n(r,s));--r,i=null}})),t.justOneSpace=function(e){for(var t=e.getCursor(),r=t.ch,i=t.ch,o=e.getLine(t.line);r&&/\s/.test(o.charAt(r-1));)--r;for(;i0)return e.setCursor(t-1);O(e,"Goto line",(function(t){var n;t&&!isNaN(n=Number(t))&&n==(0|n)&&n>0&&e.setCursor(n-1)}))},t.indentRigidly=function(e){e.indentSelection(g(e,!0)||e.getOption("indentUnit"))},t.exchangePointAndMark=function(e){e.setSelection(e.getCursor("head"),e.getCursor("anchor"))},t.quotedInsertTab=v("insertTab"),t.universalArgument=function(e){e.state.emacsPrefixMap=!0,e.addKeyMap(R),e.on("keyHandled",A),e.on("inputRead",A)},e.emacs={kill:l,killRegion:_,repeated:v};var D=e.keyMap.emacs=e.normalizeKeyMap({"Ctrl-W":"killRegion","Ctrl-K":"killLineEmacs","Alt-W":"killRingSave","Ctrl-Y":"yank","Alt-Y":"yankPop","Ctrl-Space":"setMark","Ctrl-Shift-2":"setMark","Ctrl-F":"forwardChar","Ctrl-B":"backwardChar",Right:"forwardChar",Left:"backwardChar","Ctrl-D":"deleteChar",Delete:"deleteForwardChar","Ctrl-H":"deleteBackwardChar",Backspace:"deleteBackwardChar","Alt-F":"forwardWord","Alt-B":"backwardWord","Alt-Right":"forwardWord","Alt-Left":"backwardWord","Alt-D":"killWord","Alt-Backspace":"backwardKillWord","Ctrl-N":"nextLine","Ctrl-P":"previousLine",Down:"nextLine",Up:"previousLine","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd",End:"goLineEnd",Home:"goLineStart","Alt-V":"scrollDownCommand","Ctrl-V":"scrollUpCommand",PageUp:"scrollDownCommand",PageDown:"scrollUpCommand","Ctrl-Up":"backwardParagraph","Ctrl-Down":"forwardParagraph","Alt-{":"backwardParagraph","Alt-}":"forwardParagraph","Alt-A":"backwardSentence","Alt-E":"forwardSentence","Alt-K":"killSentence","Ctrl-X Delete":"backwardKillSentence","Ctrl-Alt-K":"killSexp","Ctrl-Alt-Backspace":"backwardKillSexp","Ctrl-Alt-F":"forwardSexp","Ctrl-Alt-B":"backwardSexp","Shift-Ctrl-Alt-2":"markSexp","Ctrl-Alt-T":"transposeSexps","Ctrl-Alt-U":"backwardUpList","Alt-Space":"justOneSpace","Ctrl-O":"openLine","Ctrl-T":"transposeCharsRepeatable","Alt-C":"capitalizeWord","Alt-U":"upcaseWord","Alt-L":"downcaseWord","Alt-;":"toggleComment","Ctrl-/":"undoRepeatable","Shift-Ctrl--":"undoRepeatable","Ctrl-Z":"undoRepeatable","Cmd-Z":"undoRepeatable","Ctrl-X U":"undoRepeatable","Shift-Ctrl-Z":"redo","Shift-Alt-,":"goDocStart","Shift-Alt-.":"goDocEnd","Ctrl-S":"findPersistentNext","Ctrl-R":"findPersistentPrev","Ctrl-G":"keyboardQuit","Shift-Alt-5":"replace","Alt-/":"autocomplete",Enter:"newlineAndIndent","Ctrl-J":"newline",Tab:"indentAuto","Alt-G G":"gotoLine","Ctrl-X Tab":"indentRigidly","Ctrl-X Ctrl-X":"exchangePointAndMark","Ctrl-X Ctrl-S":"save","Ctrl-X Ctrl-W":"save","Ctrl-X S":"saveAll","Ctrl-X F":"open","Ctrl-X K":"close","Ctrl-X H":"selectAll","Ctrl-Q Tab":"quotedInsertTab","Ctrl-U":"universalArgument",fallthrough:"default"}),R={"Ctrl-G":C};function M(e){R[e]=function(t){x(t,e)},D["Ctrl-"+e]=function(t){x(t,e)},k["Ctrl-"+e]=!0}for(var I=0;I<10;++I)M(String(I));M("-")}(n(23326))},94521:(e,t,n)=>{!function(e){"use strict";var t=e.commands,n=e.Pos;function r(t,r){t.extendSelectionsBy((function(i){return t.display.shift||t.doc.extend||i.empty()?function(t,r,i){if(i<0&&0==r.ch)return t.clipPos(n(r.line-1));var o=t.getLine(r.line);if(i>0&&r.ch>=o.length)return t.clipPos(n(r.line+1,0));for(var a,s="start",l=r.ch,u=l,c=i<0?0:o.length,d=0;u!=c;u+=i,d++){var p=o.charAt(i<0?u-1:u),f="_"!=p&&e.isWordChar(p)?"w":"o";if("w"==f&&p.toUpperCase()==p&&(f="W"),"start"==s)"o"!=f?(s="in",a=f):l=u+i;else if("in"==s&&a!=f){if("w"==a&&"W"==f&&i<0&&u--,"W"==a&&"w"==f&&i>0){if(u==l+1){a="w";continue}u--}break}}return n(r.line,u)}(t.doc,i.head,r):r<0?i.from():i.to()}))}function i(t,r){if(t.isReadOnly())return e.Pass;t.operation((function(){for(var e=t.listSelections().length,i=[],o=-1,a=0;a=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],i=0;io.line&&s==a.line&&0==a.ch||r.push({anchor:s==o.line?o:n(s,0),head:s==a.line?a:n(s)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],i=0;i=0;s--){var u=r[i[s]];if(!(l&&e.cmpPos(u.head,l)>0)){var c=o(t,u.head);l=c.from,t.replaceRange(n(c.word),c.from,c.to)}}}))}function p(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var i=o(t,n);if(!i.word)return;n=i.from,r=i.to}return{from:n,to:r,query:t.getRange(n,r),word:i}}function f(e,t){var r=p(e);if(r){var i=r.query,o=e.getSearchCursor(i,t?r.to:r.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(i,t?n(e.firstLine(),0):e.clipPos(n(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):r.word&&e.setSelection(r.from,r.to))}}t.selectScope=function(e){l(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!l(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy((function(r){var i=t.scanForBracket(r.head,1,u(t.getTokenTypeAt(r.head)));if(i&&0!=e.cmpPos(i.pos,r.head))return i.pos;var o=t.scanForBracket(r.head,-1,u(t.getTokenTypeAt(n(r.head.line,r.head.ch+1))));return o&&n(o.pos.line,o.pos.ch+1)||r.head}))},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.firstLine()-1,a=[],s=0;so?i.push(u,c):i.length&&(i[i.length-1]=c),o=c}t.operation((function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+s,n(t.lastLine()),null,"+swapLine"):t.replaceRange(s+"\n",n(o,0),null,"+swapLine")}t.setSelections(a),t.scrollIntoView()}))},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.lastLine()+1,a=r.length-1;a>=0;a--){var s=r[a],l=s.to().line+1,u=s.from().line;0!=s.to().ch||s.empty()||l--,l=0;e-=2){var r=i[e],o=i[e+1],a=t.getLine(r);r==t.lastLine()?t.replaceRange("",n(r-1),n(r),"+swapLine"):t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),t.replaceRange(a+"\n",n(o,0),null,"+swapLine")}t.scrollIntoView()}))},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),r=[],i=0;i=0;o--){var a=r[o].head,s=t.getRange({line:a.line,ch:0},a),l=e.countColumn(s,null,t.getOption("tabSize")),u=t.findPosH(a,-1,"char",!1);if(s&&!/\S/.test(s)&&l%i==0){var c=new n(a.line,e.findColumn(s,l-i,i));c.ch!=a.ch&&(u=c)}t.replaceRange("",u,a,"+delete")}}))},t.delLineRight=function(e){e.operation((function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange("",t[r].anchor,n(t[r].to().line),"+delete");e.scrollIntoView()}))},t.upcaseAtCursor=function(e){d(e,(function(e){return e.toUpperCase()}))},t.downcaseAtCursor=function(e){d(e,(function(e){return e.toLowerCase()}))},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),i=n;if(e.cmpPos(r,i)>0){var o=i;i=r,r=o}t.state.sublimeKilled=t.getRange(r,i),t.replaceRange("",r,i)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){f(e,!0)},t.findUnderPrevious=function(e){f(e,!1)},t.findAllUnder=function(e){var t=p(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],i=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&i++;e.setSelections(r,i)}};var h=e.keyMap;h.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(h.macSublime),h.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(h.pcSublime);var m=h.default==h.macDefault;h.sublime=m?h.macSublime:h.pcSublime}(n(23326),n(19757),n(32407))},50832:(e,t,n)=>{!function(e){"use strict";function t(e){var t=e.Pos;function n(e,n){var r=e.state.vim;if(!r||r.insertMode)return n.head;var i=r.sel.head;return i?r.visualBlock&&n.head.line!=i.line?void 0:n.from()!=n.anchor||n.empty()||n.head.line!=i.line||n.head.ch==i.ch?n.head:new t(n.head.line,n.head.ch-1):n.head}var r=[{keys:"",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"g",type:"keyToKey",toKeys:"gk"},{keys:"g",type:"keyToKey",toKeys:"gj"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],i=r.length,o=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"global",shortName:"g"}];function a(t){t.setOption("disableInput",!0),t.setOption("showCursorWhenSelecting",!1),e.signal(t,"vim-mode-change",{mode:"normal"}),t.on("cursorActivity",nt),F(t),e.on(t.getInputField(),"paste",p(t))}function s(t,n){this==e.keyMap.vim&&(t.options.$customCursor=null,e.rmClass(t.getWrapperElement(),"cm-fat-cursor")),n&&n.attach==l||function(t){t.setOption("disableInput",!1),t.off("cursorActivity",nt),e.off(t.getInputField(),"paste",p(t)),t.state.vim=null,Ue&&clearTimeout(Ue)}(t)}function l(t,r){this==e.keyMap.vim&&(t.curOp&&(t.curOp.selectionChanged=!0),t.options.$customCursor=n,e.addClass(t.getWrapperElement(),"cm-fat-cursor")),r&&r.attach==l||a(t)}function u(t,n){if(n){if(this[t])return this[t];var r=function(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),n=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==n.length)return!1;for(var r=!1,i=0;i")}(t);if(!r)return!1;var i=z.findKey(n,r);return"function"==typeof i&&e.signal(n,"vim-keypress",r),i}}e.defineOption("vimMode",!1,(function(t,n,r){n&&"vim"!=t.getOption("keyMap")?t.setOption("keyMap","vim"):!n&&r!=e.Init&&/^vim/.test(t.getOption("keyMap"))&&t.setOption("keyMap","default")}));var c={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A",CapsLock:""},d={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function p(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(J(e.getCursor(),0,1)),Z.enterInsertMode(e,{},t))}),t.onPasteFn}var f=/[\d]/,h=[e.isWordChar,function(t){return t&&!e.isWordChar(t)&&!/\s/.test(t)}],m=[function(e){return/\S/.test(e)}];function g(e,t){for(var n=[],r=e;r"]),x=[].concat(y,b,w,["-",'"',".",":","_","/"]);try{v=new RegExp("^[\\p{Lu}]$","u")}catch(e){v=/^[A-Z]$/}function k(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function E(e){return/^[a-z]$/.test(e)}function C(e){return v.test(e)}function S(e){return/^\s*$/.test(e)}function A(e){return-1!=".?!".indexOf(e)}function T(e,t){for(var n=0;nn?t=n:t0?1:-1,c=o.getCursor();do{if((s=i[(e+(t+=u))%e])&&(l=s.find())&&!re(c,l))break}while(tr)}return s}return{cachedCursor:void 0,add:function(o,a,s){var l=i[t%e];function u(n){var r=++t%e,a=i[r];a&&a.clear(),i[r]=o.setBookmark(n)}if(l){var c=l.find();c&&!re(c,a)&&u(a)}else u(a);u(s),n=t,(r=t-e+1)<0&&(r=0)},find:function(e,n){var r=t,i=o(e,n);return t=r,i&&i.find()},move:o}},N=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function j(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=N()}function F(e){return e.state.vim||(e.state.vim={inputState:new U,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function B(){for(var e in M={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:L(),macroModeState:new j,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new W({}),searchHistoryController:new H,exCommandHistoryController:new H},O){var t=O[e];t.value=t.defaultValue}}j.prototype={exitMacroRecordMode:function(){var e=M.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=M.registerController.getRegister(t);if(n){if(n.clear(),this.latestRegister=t,e.openDialog){var r=je("span",{class:"cm-vim-message"},"recording @"+t);this.onRecordingDone=e.openDialog(r,null,{bottom:!0})}this.isRecording=!0}}};var z={enterVimMode:a,buildKeyMap:function(){},getRegisterController:function(){return M.registerController},resetVimGlobalState_:B,getVimGlobalState_:function(){return M},maybeInitVimState_:F,suppressErrorLogging:!1,InsertModeKey:it,map:function(e,t,n){Xe.map(e,t,n)},unmap:function(e,t){return Xe.unmap(e,t)},noremap:function(e,t,n){function o(e){return e?[e]:["normal","insert","visual"]}for(var a=o(n),s=r.length,l=s-i;l=0;a--){var s=o[a];if(e!==s.context)if(s.context)this._mapCommand(s);else{var l=["normal","insert","visual"];for(var u in l)if(l[u]!==e){var c={};for(var d in s)c[d]=s[d];c.context=l[u],this._mapCommand(c)}}}},setOption:D,getOption:R,defineOption:P,defineEx:function(e,t,n){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;Ze[e]=n,Xe.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if("function"==typeof r)return r()},multiSelectHandleKey:function(e,t,n){var r=!1,i=z.maybeInitVimState_(e),o=i.visualBlock||i.wasInVisualBlock,a=e.isInMultiSelectMode();if(i.wasInVisualBlock&&!a?i.wasInVisualBlock=!1:a&&i.visualBlock&&(i.wasInVisualBlock=!0),""!=t||i.insertMode||i.visualMode||!a||""!=i.status)if(o||!a||e.inVirtualSelectionMode)r=z.handleKey(e,t,n);else{var s=lt(i);e.operation((function(){e.curOp.isVimOp=!0,e.forEachSelection((function(){var i=e.getCursor("head"),o=e.getCursor("anchor"),a=ie(i,o)?0:-1,l=ie(i,o)?-1:0;i=J(i,0,a),o=J(o,0,l),e.state.vim.sel.head=i,e.state.vim.sel.anchor=o,r=z.handleKey(e,t,n),e.virtualSelection&&(e.state.vim=lt(s))})),e.curOp.cursorActivity&&!r&&(e.curOp.cursorActivity=!1),e.state.vim=i}),!0)}else q(e);return!r||i.visualMode||i.insert||i.visualMode==e.somethingSelected()||rt(e,i),r},findKey:function(e,t,n){var i,o=F(e);function a(){var r=M.macroModeState;if(r.isRecording){if("q"==t)return r.exitMacroRecordMode(),q(e),!0;"mapping"!=n&&function(e,t){if(!e.isPlaying){var n=e.latestRegister,r=M.registerController.getRegister(n);r&&r.pushText(t)}}(r,t)}}function s(){if(""==t){if(o.visualMode)ge(e);else{if(!o.insertMode)return;Qe(e)}return q(e),!0}}return!1===(i=o.insertMode?function(){if(s())return!0;for(var n=o.inputState.keyBuffer=o.inputState.keyBuffer+t,i=1==t.length,a=V.matchCommand(n,r,o.inputState,"insert");n.length>1&&"full"!=a.type;){n=o.inputState.keyBuffer=n.slice(1);var l=V.matchCommand(n,r,o.inputState,"insert");"none"!=l.type&&(a=l)}if("none"==a.type)return q(e),!1;if("partial"==a.type)return I&&window.clearTimeout(I),I=window.setTimeout((function(){o.insertMode&&o.inputState.keyBuffer&&q(e)}),R("insertModeEscKeysTimeout")),!i;if(I&&window.clearTimeout(I),i){for(var u=e.listSelections(),c=0;c|<\w+>|./.exec(n),t=r[0],n=n.substring(r.index+t.length),z.handleKey(e,t,"mapping")}(i.toKeys):V.processCommand(e,o,i)}catch(t){throw e.state.vim=void 0,F(e),z.suppressErrorLogging||console.log(t),t}return!0}))}},handleEx:function(e,t){Xe.processCommand(e,t)},defineMotion:function(e,t){G[e]=t},defineAction:function(e,t){Z[e]=t},defineOperator:function(e,t){Y[e]=t},mapCommand:function(e,t,n,r,i){var o={keys:e,type:t};for(var a in o[t]=n,o[t+"Args"]=r,i)o[a]=i[a];Je(o)},_mapCommand:Je,defineRegister:function(e,t){var n=M.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(n[e])throw Error("Register already defined "+e);n[e]=t,x.push(e)},exitVisualMode:ge,exitInsertMode:Qe};function U(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function q(t,n){t.state.vim.inputState=new U,e.signal(t,"vim-command-done",n)}function $(e,t,n){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!n}function W(e){this.registers=e,this.unnamedRegister=e['"']=new $,e["."]=new $,e[":"]=new $,e["/"]=new $}function H(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}U.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},U.prototype.getRepeat=function(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},$.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(N(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},W.prototype={pushText:function(e,t,n,r,i){if("_"!==e){r&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var o=this.isValidRegister(e)?this.getRegister(e):null;if(o)C(e)?o.pushText(n,r):o.setText(n,r,i),this.unnamedRegister.setText(o.toString(),r);else{switch(t){case"yank":this.registers[0]=new $(n,r,i);break;case"delete":case"change":-1==n.indexOf("\n")?this.registers["-"]=new $(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new $(n,r))}this.unnamedRegister.setText(n,r,i)}}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new $),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&T(e,x)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},H.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var i=this.iterator+r;t?i>=0:i=n.length?(this.iterator=n.length,this.initialPrefix):i<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var V={matchCommand:function(e,t,n,r){var i,o=function(e,t,n,r){for(var i,o=[],a=[],s=0;s"==i.keys.slice(-11)){var l=function(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"":n="\n";break;case"":n=" ";break;default:n=""}return n}(e);if(!l||l.length>1)return{type:"clear"};n.selectedCharacter=l}return{type:"full",command:i}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=Q(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator)return r.motion="expandToLine",r.motionArgs={linewise:!0},void this.evalInput(e,t);q(e)}r.operator=n.operator,r.operatorArgs=Q(n.operatorArgs),n.keys.length>1&&(r.operatorShortcut=n.keys),n.exitVisualBlock&&(t.visualBlock=!1,he(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,i=Q(n.operatorMotionArgs);i&&r&&i.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,i=r.getRepeat(),o=!!i,a=Q(n.actionArgs)||{};r.selectedCharacter&&(a.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),a.repeat=i||1,a.repeatIsExplicit=o,a.registerName=r.registerName,q(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),Z[n.action](e,a,t)},processSearch:function(t,n,r){if(t.getSearchCursor){var i=r.searchArgs.forward,o=r.searchArgs.wholeWordOnly;De(t).setReversed(!i);var a=i?"/":"?",s=De(t).getQuery(),l=t.getScrollInfo();switch(r.searchArgs.querySrc){case"prompt":var u=M.macroModeState;u.isPlaying?f(p=u.replaySearchQueries.shift(),!0,!1):Be(t,{onClose:function(e){t.scrollTo(l.left,l.top),f(e,!0,!0);var n=M.macroModeState;n.isRecording&&function(e,t){if(!e.isPlaying){var n=e.latestRegister,r=M.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}}(n,e)},prefix:a,desc:"(JavaScript regexp)",onKeyUp:function(n,r,o){var a,s,u,c=e.keyName(n);"Up"==c||"Down"==c?(a="Up"==c,s=n.target?n.target.selectionEnd:0,o(r=M.searchHistoryController.nextMatch(r,a)||""),s&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(s,n.target.value.length))):"Left"!=c&&"Right"!=c&&"Ctrl"!=c&&"Alt"!=c&&"Shift"!=c&&M.searchHistoryController.reset();try{u=ze(t,r,!0,!0)}catch(n){}u?t.scrollIntoView($e(t,!i,u),30):(We(t),t.scrollTo(l.left,l.top))},onKeyDown:function(n,r,i){var o=e.keyName(n);"Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==r?(M.searchHistoryController.pushInput(r),M.searchHistoryController.reset(),ze(t,s),We(t),t.scrollTo(l.left,l.top),e.e_stop(n),q(t),i(),t.focus()):"Up"==o||"Down"==o?e.e_stop(n):"Ctrl-U"==o&&(e.e_stop(n),i(""))}});break;case"wordUnderCursor":var c=ye(t,!1,0,!1,!0),d=!0;if(c||(c=ye(t,!1,0,!1,!1),d=!1),!c)return;var p=t.getLine(c.start.line).substring(c.start.ch,c.end.ch);p=d&&o?"\\b"+p+"\\b":p.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),M.jumpList.cachedCursor=t.getCursor(),t.setCursor(c.start),f(p,!0,!1)}}function f(e,i,o){M.searchHistoryController.pushInput(e),M.searchHistoryController.reset();try{ze(t,e,i,o)}catch(n){return Fe(t,"Invalid regex: "+e),void q(t)}V.processMotion(t,n,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:r.searchArgs.toJumplist}})}},processEx:function(t,n,r){function i(e){M.exCommandHistoryController.pushInput(e),M.exCommandHistoryController.reset(),Xe.processCommand(t,e),q(t)}function o(n,r,i){var o,a,s=e.keyName(n);("Esc"==s||"Ctrl-C"==s||"Ctrl-["==s||"Backspace"==s&&""==r)&&(M.exCommandHistoryController.pushInput(r),M.exCommandHistoryController.reset(),e.e_stop(n),q(t),i(),t.focus()),"Up"==s||"Down"==s?(e.e_stop(n),o="Up"==s,a=n.target?n.target.selectionEnd:0,i(r=M.exCommandHistoryController.nextMatch(r,o)||""),a&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(a,n.target.value.length))):"Ctrl-U"==s?(e.e_stop(n),i("")):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&M.exCommandHistoryController.reset()}"keyToEx"==r.type?Xe.processCommand(t,r.exArgs.input):n.visualMode?Be(t,{onClose:i,prefix:":",value:"'<,'>",onKeyDown:o,selectValueOnOpen:!1}):Be(t,{onClose:i,prefix:":",onKeyDown:o})},evalInput:function(e,n){var r,i,o,a=n.inputState,s=a.motion,l=a.motionArgs||{},u=a.operator,c=a.operatorArgs||{},d=a.registerName,p=n.sel,f=ne(n.visualMode?X(e,p.head):e.getCursor("head")),h=ne(n.visualMode?X(e,p.anchor):e.getCursor("anchor")),m=ne(f),g=ne(h);if(u&&this.recordLastEdit(n,a),(o=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat())>0&&l.explicitRepeat?l.repeatIsExplicit=!0:(l.noRepeat||!l.explicitRepeat&&0===o)&&(o=1,l.repeatIsExplicit=!1),a.selectedCharacter&&(l.selectedCharacter=c.selectedCharacter=a.selectedCharacter),l.repeat=o,q(e),s){var v=G[s](e,f,l,n,a);if(n.lastMotion=G[s],!v)return;if(l.toJumplist){var y=M.jumpList,b=y.cachedCursor;b?(be(e,b,v),delete y.cachedCursor):be(e,f,v)}v instanceof Array?(i=v[0],r=v[1]):r=v,r||(r=ne(f)),n.visualMode?(n.visualBlock&&r.ch===1/0||(r=X(e,r)),i&&(i=X(e,i)),i=i||g,p.anchor=i,p.head=r,he(e),Se(e,n,"<",ie(i,r)?i:r),Se(e,n,">",ie(i,r)?r:i)):u||(r=X(e,r),e.setCursor(r.line,r.ch))}if(u){if(c.lastSel){i=g;var w=c.lastSel,_=Math.abs(w.head.line-w.anchor.line),x=Math.abs(w.head.ch-w.anchor.ch);r=w.visualLine?new t(g.line+_,g.ch):w.visualBlock?new t(g.line+_,g.ch+x):w.head.line==w.anchor.line?new t(g.line,g.ch+x):new t(g.line+_,g.ch),n.visualMode=!0,n.visualLine=w.visualLine,n.visualBlock=w.visualBlock,p=n.sel={anchor:i,head:r},he(e)}else n.visualMode&&(c.lastSel={anchor:ne(p.anchor),head:ne(p.head),visualBlock:n.visualBlock,visualLine:n.visualLine});var k,E,C,A,T;if(n.visualMode){if(k=oe(p.head,p.anchor),E=ae(p.head,p.anchor),C=n.visualLine||c.linewise,T=me(e,{anchor:k,head:E},A=n.visualBlock?"block":C?"line":"char"),C){var O=T.ranges;if("block"==A)for(var P=0;P0&&o&&S(o);o=i.pop())n.line--,n.ch=0;o?(n.line--,n.ch=le(e,n.line)):n.ch=0}}(e,k,E),T=me(e,{anchor:k,head:E},A="char",!l.inclusive||C)}e.setSelections(T.ranges,T.primary),n.lastMotion=null,c.repeat=o,c.registerName=d,c.linewise=C;var R=Y[u](e,c,T.ranges,g,r);n.visualMode&&ge(e,null!=R),R&&e.setCursor(R)}},recordLastEdit:function(e,t,n){var r=M.macroModeState;r.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=n,r.lastInsertModeChanges.changes=[],r.lastInsertModeChanges.expectCursorActivityForChange=!1,r.lastInsertModeChanges.visualBlock=e.visualBlock?e.sel.head.line-e.sel.anchor.line:0)}},G={moveToTopLine:function(e,n,r){var i=Ve(e).top+r.repeat-1;return new t(i,ve(e.getLine(i)))},moveToMiddleLine:function(e){var n=Ve(e),r=Math.floor(.5*(n.top+n.bottom));return new t(r,ve(e.getLine(r)))},moveToBottomLine:function(e,n,r){var i=Ve(e).bottom-r.repeat+1;return new t(i,ve(e.getLine(i)))},expandToLine:function(e,n,r){return new t(n.line+r.repeat-1,1/0)},findNext:function(e,t,n){var r=De(e),i=r.getQuery();if(i){var o=!n.forward;return o=r.isReversed()?!o:o,qe(e,i),$e(e,o,i,n.repeat)}},findAndSelectNextInclusive:function(n,r,i,o,a){var s=De(n),l=s.getQuery();if(l){var u=!i.forward,c=function(e,n,r,i,o){return void 0===i&&(i=1),e.operation((function(){var a=e.getCursor(),s=e.getSearchCursor(r,a),l=s.find(!n);!o.visualMode&&l&&re(s.from(),a)&&s.find(!n);for(var u=0;ul:d.linec&&o.line==c?Ee(e,n,r,i,!0):(r.toFirstChar&&(a=ve(e.getLine(l)),i.lastHPos=a),i.lastHSPos=e.charCoords(new t(l,a),"div").left,new t(l,a))},moveByDisplayLines:function(e,n,r,i){var o=n;switch(i.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:i.lastHSPos=e.charCoords(o,"div").left}var a=r.repeat;if((l=e.findPosV(o,r.forward?a:-a,"line",i.lastHSPos)).hitSide)if(r.forward)var s={top:e.charCoords(l,"div").top+8,left:i.lastHSPos},l=e.coordsChar(s,"div");else{var u=e.charCoords(new t(e.firstLine(),0),"div");u.left=i.lastHSPos,l=e.coordsChar(u,"div")}return i.lastHPos=l.ch,l},moveByPage:function(e,t,n){var r=t,i=n.repeat;return e.findPosV(r,n.forward?i:-i,"page")},moveByParagraph:function(e,t,n){var r=n.forward?1:-1;return Te(e,t,n.repeat,r)},moveBySentence:function(e,n,r){var i=r.forward?1:-1;return function(e,n,r,i){function o(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!k(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}function a(e,t,n,r){var i=""===(u=e.getLine(t)),a={line:u,ln:t,pos:n,dir:r},s={ln:a.ln,pos:a.pos},l=""===a.line;for(o(e,a);null!==a.line;){if(s.ln=a.ln,s.pos=a.pos,""===a.line&&!l)return{ln:a.ln,pos:a.pos};if(i&&""!==a.line&&!S(a.line[a.pos]))return{ln:a.ln,pos:a.pos};!A(a.line[a.pos])||i||a.pos!==a.line.length-1&&!S(a.line[a.pos+1])||(i=!0),o(e,a)}var u=e.getLine(s.ln);s.pos=0;for(var c=u.length-1;c>=0;--c)if(!S(u[c])){s.pos=c;break}return s}function s(e,t,n,r){var i={line:l=e.getLine(t),ln:t,pos:n,dir:r},a={ln:i.ln,pos:null},s=""===i.line;for(o(e,i);null!==i.line;){if(""===i.line&&!s)return null!==a.pos?a:{ln:i.ln,pos:i.pos};if(A(i.line[i.pos])&&null!==a.pos&&(i.ln!==a.ln||i.pos+1!==a.pos))return a;""===i.line||S(i.line[i.pos])||(s=!1,a={ln:i.ln,pos:i.pos}),o(e,i)}var l=e.getLine(a.ln);a.pos=0;for(var u=0;u0;)l=i<0?s(e,l.ln,l.pos,i):a(e,l.ln,l.pos,i),r--;return new t(l.ln,l.pos)}(e,n,r.repeat,i)},moveByScroll:function(e,t,n,r){var i,o=e.getScrollInfo(),a=n.repeat;a||(a=o.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");if(n.repeat=a,!(i=G.moveByDisplayLines(e,t,n,r)))return null;var l=e.charCoords(i,"local");return e.scrollTo(null,o.top+l.top-s.top),i},moveByWords:function(e,n,r){return function(e,n,r,i,o,a){var s=ne(n),l=[];(i&&!o||!i&&o)&&r++;for(var u=!(i&&o),c=0;c0)d.index=0;else{var m=d.lineText.length;d.index=m>0?m-1:0}d.nextCh=d.lineText.charAt(d.index)}h(d)&&(o.line=u,o.ch=d.index,n--)}return d.nextCh||d.curMoveThrough?new t(u,d.index):o}(e,r.repeat,r.forward,r.selectedCharacter)||n},moveToColumn:function(e,n,r,i){var o=r.repeat;return i.lastHPos=o-1,i.lastHSPos=e.charCoords(n,"div").left,function(e,n){var r=e.getCursor().line;return X(e,new t(r,n-1))}(e,o)},moveToEol:function(e,t,n,r){return Ee(e,t,n,r,!1)},moveToFirstNonWhiteSpaceCharacter:function(e,n){var r=n;return new t(r.line,ve(e.getLine(r.line)))},moveToMatchedSymbol:function(e,n){for(var r,i=n,o=i.line,a=i.ch,s=e.getLine(o);a"===a?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(new t(o,a),{bracketRegex:u}).to}return i},moveToStartOfLine:function(e,n){return new t(n.line,0)},moveToLineOrEdgeOfDocument:function(e,n,r){var i=r.forward?e.lastLine():e.firstLine();return r.repeatIsExplicit&&(i=r.repeat-e.getOption("firstLineNumber")),new t(i,ve(e.getLine(i)))},moveToStartOfDisplayLine:function(e){return e.execCommand("goLineLeft"),e.getCursor()},moveToEndOfDisplayLine:function(e){e.execCommand("goLineRight");var t=e.getCursor();return"before"==t.sticky&&t.ch--,t},textObjectManipulation:function(n,r,i,o){var a=i.selectedCharacter;"b"==a?a="(":"B"==a&&(a="{");var s,l=!i.textObjectInner;if({"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"}[a])s=function(e,n,r,i){var o,a,s=n,l={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[r],u={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[r],c=e.getLine(s.line).charAt(s.ch)===u?1:0;if(o=e.scanForBracket(new t(s.line,s.ch+c),-1,void 0,{bracketRegex:l}),a=e.scanForBracket(new t(s.line,s.ch+c),1,void 0,{bracketRegex:l}),!o||!a)return{start:s,end:s};if(o=o.pos,a=a.pos,o.line==a.line&&o.ch>a.ch||o.line>a.line){var d=o;o=a,a=d}return i?a.ch+=1:o.ch+=1,{start:o,end:a}}(n,r,a,l);else if({"'":!0,'"':!0,"`":!0}[a])s=function(e,n,r,i){var o,a,s,l,u=ne(n),c=e.getLine(u.line).split(""),d=c.indexOf(r);if(u.ch-1&&!o;s--)c[s]==r&&(o=s+1);else o=u.ch+1;if(o&&!a)for(s=o,l=c.length;s0&&A(c[r.ch])&&(r.ch-=1);var d=Oe(n,r,i.repeat,1,l),p=Oe(n,r,i.repeat,-1,l);S(n.getLine(p.line)[p.ch])&&S(n.getLine(d.line)[d.ch-1])&&(p={line:p.line,ch:p.ch+1}),s={start:p,end:d}}return n.state.vim.visualMode?function(e,n,r){var i,o=e.state.vim.sel,a=o.head,s=o.anchor;return ie(r,n)&&(i=r,r=n,n=i),ie(a,s)?(a=oe(n,a),s=ae(s,r)):(s=oe(n,s),-1==(a=J(a=ae(a,r),0,-1)).ch&&a.line!=e.firstLine()&&(a=new t(a.line-1,le(e,a.line-1)))),[s,a]}(n,s.start,s.end):[s.start,s.end]},repeatLastCharacterSearch:function(e,t,n){var r=M.lastCharacterSearch,i=n.repeat,o=n.forward===r.forward,a=(r.increment?1:0)*(o?-1:1);e.moveH(-a,"char"),n.inclusive=!!o;var s=Ce(e,i,o,r.selectedCharacter);return s?(s.ch+=a,s):(e.moveH(a,"char"),t)}};function K(e,t){for(var n=[],r=0;rn.lastLine()&&r.linewise&&!h?n.replaceRange("",f,u):n.replaceRange("",l,u),r.linewise&&(h||(n.setCursor(f),e.commands.newlineAndIndent(n)),l.ch=Number.MAX_VALUE),o=l}M.registerController.pushText(r.registerName,"change",a,r.linewise,i.length>1),Z.enterInsertMode(n,{head:o},n.state.vim)},delete:function(e,n,r){var i,o,a=e.state.vim;if(a.visualBlock){o=e.getSelection();var s=K("",r.length);e.replaceSelections(s),i=oe(r[0].head,r[0].anchor)}else{var l=r[0].anchor,u=r[0].head;n.linewise&&u.line!=e.firstLine()&&l.line==e.lastLine()&&l.line==u.line-1&&(l.line==e.firstLine()?l.ch=0:l=new t(l.line-1,le(e,l.line-1))),o=e.getRange(l,u),e.replaceRange("",l,u),i=l,n.linewise&&(i=G.moveToFirstNonWhiteSpaceCharacter(e,l))}return M.registerController.pushText(n.registerName,"delete",o,n.linewise,a.visualBlock),X(e,i)},indent:function(e,t,n){var r=e.state.vim;if(e.indentMore)for(var i=r.visualMode?t.repeat:1,o=0;ou.top?(l.line+=(s-u.top)/i,l.line=Math.ceil(l.line),e.setCursor(l),u=e.charCoords(l,"local"),e.scrollTo(null,u.top)):e.scrollTo(null,s);else{var c=s+e.getScrollInfo().clientHeight;c=a.anchor.line?J(a.head,0,1):new t(a.anchor.line,0)}else if("inplace"==o){if(i.visualMode)return}else"lastEdit"==o&&(s=Ke(n)||s);n.setOption("disableInput",!1),r&&r.replace?(n.toggleOverwrite(!0),n.setOption("keyMap","vim-replace"),e.signal(n,"vim-mode-change",{mode:"replace"})):(n.toggleOverwrite(!1),n.setOption("keyMap","vim-insert"),e.signal(n,"vim-mode-change",{mode:"insert"})),M.macroModeState.isPlaying||(n.on("change",tt),e.on(n.getInputField(),"keydown",ot)),i.visualMode&&ge(n),pe(n,s,l)}},toggleVisualMode:function(n,r,i){var o,a=r.repeat,s=n.getCursor();i.visualMode?i.visualLine^r.linewise||i.visualBlock^r.blockwise?(i.visualLine=!!r.linewise,i.visualBlock=!!r.blockwise,e.signal(n,"vim-mode-change",{mode:"visual",subMode:i.visualLine?"linewise":i.visualBlock?"blockwise":""}),he(n)):ge(n):(i.visualMode=!0,i.visualLine=!!r.linewise,i.visualBlock=!!r.blockwise,o=X(n,new t(s.line,s.ch+a-1)),i.sel={anchor:s,head:o},e.signal(n,"vim-mode-change",{mode:"visual",subMode:i.visualLine?"linewise":i.visualBlock?"blockwise":""}),he(n),Se(n,i,"<",oe(s,o)),Se(n,i,">",ae(s,o)))},reselectLastSelection:function(t,n,r){var i=r.lastSelection;if(r.visualMode&&fe(t,r),i){var o=i.anchorMark.find(),a=i.headMark.find();if(!o||!a)return;r.sel={anchor:o,head:a},r.visualMode=!0,r.visualLine=i.visualLine,r.visualBlock=i.visualBlock,he(t),Se(t,r,"<",oe(o,a)),Se(t,r,">",ae(o,a)),e.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(e,n,r){var i,o;if(r.visualMode){if(i=e.getCursor("anchor"),ie(o=e.getCursor("head"),i)){var a=o;o=i,i=a}o.ch=le(e,o.line)-1}else{var s=Math.max(n.repeat,2);i=e.getCursor(),o=X(e,new t(i.line+s-1,1/0))}for(var l=0,u=i.line;u1&&(f=Array(n.repeat+1).join(f));var h,m,g=o.linewise,v=o.blockwise;if(v){f=f.split("\n"),g&&f.pop();for(var y=0;ye.lastLine()&&e.replaceRange("\n",new t(S,0)),le(e,S)c.length&&(o=c.length),a=new t(l.line,o)}if("\n"==s)i.visualMode||n.replaceRange("",l,a),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(n);else{var d=n.getRange(l,a);if(d=d.replace(/[^\n]/g,s),i.visualBlock){var p=new Array(n.getOption("tabSize")+1).join(" ");d=(d=n.getSelection()).replace(/\t/g,p).replace(/[^\n]/g,s).split("\n"),n.replaceSelections(d)}else n.replaceRange(d,l,a);i.visualMode?(l=ie(u[0].anchor,u[0].head)?u[0].anchor:u[0].head,n.setCursor(l),ge(n,!1)):n.setCursor(J(a,0,-1))}},incrementNumberToken:function(e,n){for(var r,i,o,a,s=e.getCursor(),l=e.getLine(s.line),u=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(r=u.exec(l))&&(o=(i=r.index)+r[0].length,!(s.ch"==t.slice(-11)){var n=t.length-11,r=e.slice(0,n),i=t.slice(0,n);return r==i&&e.length>n?"full":0==i.indexOf(r)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function te(e,t,n){return function(){for(var r=0;r2&&(t=oe.apply(void 0,Array.prototype.slice.call(arguments,1))),ie(e,t)?e:t}function ae(e,t){return arguments.length>2&&(t=ae.apply(void 0,Array.prototype.slice.call(arguments,1))),ie(e,t)?t:e}function se(e,t,n){var r=ie(e,t),i=ie(t,n);return r&&i}function le(e,t){return e.getLine(t).length}function ue(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function ce(e,n,r){var i=le(e,n),o=new Array(r-i+1).join(" ");e.setCursor(new t(n,i)),e.replaceRange(o,e.getCursor())}function de(e,n){var r=[],i=e.listSelections(),o=ne(e.clipPos(n)),a=!re(n,o),s=function(e,t,n){for(var r=0;rs?u:0,d=i[c].anchor,p=Math.min(d.line,o.line),f=Math.max(d.line,o.line),h=d.ch,m=o.ch,g=i[c].head.ch-h,v=m-h;g>0&&v<=0?(h++,a||m--):g<0&&v>=0?(h--,l||m++):g<0&&-1==v&&(h--,m++);for(var y=p;y<=f;y++){var b={anchor:new t(y,h),head:new t(y,m)};r.push(b)}return e.setSelections(r),n.ch=m,d.ch=h,d}function pe(e,t,n){for(var r=[],i=0;iu&&(o.line=u),o.ch=le(e,o.line)}return{ranges:[{anchor:a,head:o}],primary:0}}if("block"==r){var c=Math.min(a.line,o.line),d=a.ch,p=Math.max(a.line,o.line),f=o.ch;d=s.length)return null;i?u=m[0]:(u=h[0])(s.charAt(l))||(u=h[1]);for(var c=l,d=l;u(s.charAt(c))&&c=0;)d--;if(d++,n){for(var p=c;/\s/.test(s.charAt(c))&&c0;)d--;d||(d=f)}}return{start:new t(a.line,d),end:new t(a.line,c)}}function be(e,t,n){re(t,n)||M.jumpList.add(e,t,n)}function we(e,t){M.lastCharacterSearch.increment=e,M.lastCharacterSearch.forward=t.forward,M.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var _e={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},xe={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/^#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function ke(e,t,n,r,i){var o=t.line,a=t.ch,s=e.getLine(o),l=n?1:-1,u=r?m:h;if(i&&""==s){if(o+=l,s=e.getLine(o),!k(e,o))return null;a=n?0:s.length}for(;;){if(i&&""==s)return{from:0,to:0,line:o};for(var c=l>0?s.length:-1,d=c,p=c;a!=c;){for(var f=!1,g=0;g0?0:s.length}}function Ee(e,n,r,i,o){var a=new t(n.line+r.repeat-1,1/0),s=e.clipPos(a);return s.ch--,o||(i.lastHPos=1/0,i.lastHSPos=e.charCoords(s,"div").left),a}function Ce(e,n,r,i){for(var o,a=e.getCursor(),s=a.ch,l=0;l0;)p(c,i)&&r--,c+=i;return new t(c,0)}var f=e.state.vim;if(f.visualLine&&p(s,1,!0)){var h=f.sel.anchor;p(h.line,-1,!0)&&(o&&h.line==s||(s+=1))}var m=d(s);for(c=s;c<=u&&r;c++)p(c,1,!0)&&(o&&d(c)==m||r--);for(a=new t(c,0),c>u&&!m?m=!0:o=!1,c=s;c>l&&(o&&d(c)!=m&&c!=s||!p(c,-1,!0));c--);return{start:new t(c,0),end:a}}function Oe(e,n,r,i,o){function a(e){e.pos+e.dir<0||e.pos+e.dir>=e.line.length?e.line=null:e.pos+=e.dir}function s(e,t,n,r){var i={line:e.getLine(t),ln:t,pos:n,dir:r};if(""===i.line)return{ln:i.ln,pos:i.pos};var s=i.pos;for(a(i);null!==i.line;){if(s=i.pos,A(i.line[i.pos])){if(o){for(a(i);null!==i.line&&S(i.line[i.pos]);)s=i.pos,a(i);return{ln:i.ln,pos:s+1}}return{ln:i.ln,pos:i.pos+1}}a(i)}return{ln:i.ln,pos:s+1}}function l(e,t,n,r){var i=e.getLine(t),s={line:i,ln:t,pos:n,dir:r};if(""===s.line)return{ln:s.ln,pos:s.pos};var l=s.pos;for(a(s);null!==s.line;){if(S(s.line[s.pos])||A(s.line[s.pos])){if(A(s.line[s.pos]))return o&&S(s.line[s.pos+1])?{ln:s.ln,pos:s.pos+1}:{ln:s.ln,pos:l}}else l=s.pos;a(s)}return s.line=i,o&&S(s.line[s.pos])?{ln:s.ln,pos:s.pos}:{ln:s.ln,pos:l}}for(var u={ln:n.line,pos:n.ch};r>0;)u=i<0?l(e,u.ln,u.pos,i):s(e,u.ln,u.pos,i),r--;return new t(u.ln,u.pos)}function Pe(){}function De(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new Pe)}function Re(e,t){var n=Me(e,t)||[];if(!n.length)return[];var r=[];if(0===n[0]){for(var i=0;i=t&&e<=n:e==t}function Ve(e){var t=e.getScrollInfo(),n=e.coordsChar({left:0,top:6+t.top},"local"),r=t.clientHeight-10+t.top,i=e.coordsChar({left:0,top:r},"local");return{top:n.line,bottom:i.line}}function Ge(e,n,r){if("'"==r||"`"==r)return M.jumpList.find(e,-1)||new t(0,0);if("."==r)return Ke(e);var i=n.marks[r];return i&&i.find()}function Ke(e){for(var t=e.doc.history.done,n=t.length;n--;)if(t[n].changes)return ne(t[n].changes[0].to)}var Ye=function(){this.buildCommandMap_()};Ye.prototype={processCommand:function(e,t,n){var r=this;e.operation((function(){e.curOp.isVimOp=!0,r._processCommand(e,t,n)}))},_processCommand:function(t,n,r){var i=t.state.vim,o=M.registerController.getRegister(":"),a=o.toString();i.visualMode&&ge(t);var s=new e.StringStream(n);o.setText(n);var l,u,c=r||{};c.input=n;try{this.parseInput_(t,s,c)}catch(e){throw Fe(t,e.toString()),e}if(c.commandName){if(l=this.matchCommand_(c.commandName)){if(u=l.name,l.excludeFromCommandHistory&&o.setText(a),this.parseCommandArgs_(s,c,l),"exToKey"==l.type){for(var d=0;d@~])/);return n.commandName=r?r[1]:t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var r=t.next(),i=Ge(e,e.state.vim,r);if(!i)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,i.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return void t.backUp(1)}},parseLineSpecOffset_:function(e,t){var n=e.match(/^([+-])?(\d+)/);if(n){var r=parseInt(n[2],10);"-"==n[1]?t-=r:t+=r}return t},parseCommandArgs_:function(e,t,n){if(!e.eol()){t.argString=e.match(/.*/)[0];var r=n.argDelimiter||/\s+/,i=ue(t.argString).split(r);i.length&&i[0]&&(t.args=i)}},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var r=this.commandMap_[n];if(0===r.name.indexOf(e))return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e1)return"Invalid arguments";s=(u?"decimal":c&&"hex")||d&&"octal"}n[2]&&(l=new RegExp(n[2].substr(1,n[2].length-2),o?"i":""))}}();if(u)Fe(n,u+": "+r.argString);else{var c=r.line||n.firstLine(),d=r.lineEnd||r.line||n.lastLine();if(c!=d){var p=new t(c,0),f=new t(d,le(n,d)),h=n.getRange(p,f).split("\n"),m=l||("decimal"==s?/(-?)([\d]+)/:"hex"==s?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==s?/([0-7]+)/:null),g="decimal"==s?10:"hex"==s?16:"octal"==s?8:null,v=[],y=[];if(s||l)for(var b=0;b=c)return void Fe(t,"Invalid argument: "+n.argString.substring(o));for(var d=0;d<=c-u;d++){var p=String.fromCharCode(u+d);delete r.marks[p]}}else delete r.marks[a]}else Fe(t,"Argument required")}},Xe=new Ye;function Qe(t){var n=t.state.vim,r=M.macroModeState,i=M.registerController.getRegister("."),o=r.isPlaying,a=r.lastInsertModeChanges;o||(t.off("change",tt),e.off(t.getInputField(),"keydown",ot)),!o&&n.insertModeRepeat>1&&(at(t,n,n.insertModeRepeat-1,!0),n.lastEditInputState.repeatOverride=n.insertModeRepeat),delete n.insertModeRepeat,n.insertMode=!1,t.setCursor(t.getCursor().line,t.getCursor().ch-1),t.setOption("keyMap","vim"),t.setOption("disableInput",!0),t.toggleOverwrite(!1),i.setText(a.changes.join("")),e.signal(t,"vim-mode-change",{mode:"normal"}),r.isRecording&&function(e){if(!e.isPlaying){var t=e.latestRegister,n=M.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}(r)}function Je(e){r.unshift(e)}function et(e,t,n,r){var i=M.registerController.getRegister(r);if(":"==r)return i.keyBuffer[0]&&Xe.processCommand(e,i.keyBuffer[0]),void(n.isPlaying=!1);var o=i.keyBuffer,a=0;n.isPlaying=!0,n.replaySearchQueries=i.searchQueries.slice(0);for(var s=0;s|<\w+>|./.exec(c))[0],c=c.substring(l.index+u.length),z.handleKey(e,u,"macro"),t.insertMode){var d=i.insertModeChanges[a++].changes;M.macroModeState.lastInsertModeChanges.changes=d,st(e,d,1),Qe(e)}n.isPlaying=!1}function tt(e,t){var n=M.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(r.expectCursorActivityForChange=!0,r.ignoreCount>1)r.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||void 0===t.origin){var i=e.listSelections().length;i>1&&(r.ignoreCount=i);var o=t.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1),o&&(e.state.overwrite&&!/\n/.test(o)?r.changes.push([o]):r.changes.push(o))}t=t.next}}function nt(e){var t=e.state.vim;if(t.insertMode){var n=M.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:r.maybeReset=!0}else e.curOp.isVimOp||rt(e,t)}function rt(t,n){var r=t.getCursor("anchor"),i=t.getCursor("head");if(n.visualMode&&!t.somethingSelected()?ge(t,!1):n.visualMode||n.insertMode||!t.somethingSelected()||(n.visualMode=!0,n.visualLine=!1,e.signal(t,"vim-mode-change",{mode:"visual"})),n.visualMode){var o=ie(i,r)?0:-1,a=ie(i,r)?-1:0;i=J(i,0,o),r=J(r,0,a),n.sel={anchor:r,head:i},Se(t,n,"<",oe(i,r)),Se(t,n,">",ae(i,r))}else n.insertMode||(n.lastHPos=t.getCursor().ch)}function it(e){this.keyName=e}function ot(t){var n=M.macroModeState.lastInsertModeChanges,r=e.keyName(t);r&&(-1==r.indexOf("Delete")&&-1==r.indexOf("Backspace")||e.lookupKey(r,"vim-insert",(function(){return n.maybeReset&&(n.changes=[],n.maybeReset=!1),n.changes.push(new it(r)),!0})))}function at(e,t,n,r){var i=M.macroModeState;i.isPlaying=!0;var o=!!t.lastEditActionCommand,a=t.inputState;function s(){o?V.processAction(e,t,t.lastEditActionCommand):V.evalInput(e,t)}function l(n){if(i.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=i.lastInsertModeChanges;st(e,r.changes,n)}}if(t.inputState=t.lastEditInputState,o&&t.lastEditActionCommand.interlaceInsertRepeat)for(var u=0;u2),v=/Android/.test(e),y=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=g||/Mac/.test(t),w=/\bCrOS\b/.test(e),_=/win/i.test(t),x=p&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(p=!1,l=!0);var k=b&&(u||p&&(null==x||x<12.11)),E=n||a&&s>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,A=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return T(e).appendChild(t)}function P(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}g?N=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(N=function(e){try{e.select()}catch(e){}});var q=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};function $(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var Z=[""];function X(e){for(;Z.length<=e;)Z.push(Q(Z)+" ");return Z[e]}function Q(e){return e[e.length-1]}function J(e,t){for(var n=[],r=0;r""&&(e.toUpperCase()!=e.toLowerCase()||ne.test(e))}function ie(e,t){return t?!!(t.source.indexOf("\\w")>-1&&re(e))||t.test(e):re(e)}function oe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ae=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function se(e){return e.charCodeAt(0)>=768&&ae.test(e)}function le(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var ce=null;function de(e,t,n){var r;ce=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ce=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ce=i)}return null!=r?r:ce}var pe=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var l,u="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var c=a.length,d=[],p=0;p-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ye(e,t){var n=ge(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function xe(e){e.prototype.on=function(e,t){me(this,e,t)},e.prototype.off=function(e,t){ve(this,e,t)}}function ke(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ce(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){ke(e),Ee(e)}function Ae(e){return e.target||e.srcElement}function Te(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Oe,Pe,De=function(){if(a&&s<9)return!1;var e=P("div");return"draggable"in e||"dragDrop"in e}();function Re(e){if(null==Oe){var t=P("span","");O(e,P("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Oe=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Oe?P("span",""):P("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Me(e){if(null!=Pe)return Pe;var t=O(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(Pe=r.right-n.right<3)}var Ie,Le=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ne=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},je="oncopy"in(Ie=P("div"))||(Ie.setAttribute("oncopy","return;"),"function"==typeof Ie.oncopy),Fe=null;var Be={},ze={};function Ue(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Be[e]=t}function qe(e){if("string"==typeof e&&ze.hasOwnProperty(e))e=ze[e];else if(e&&"string"==typeof e.name&&ze.hasOwnProperty(e.name)){var t=ze[e.name];"string"==typeof t&&(t={name:t}),(e=te(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return qe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return qe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function $e(e,t){t=qe(t);var n=Be[t.name];if(!n)return $e(e,"text/plain");var r=n(e,t);if(We.hasOwnProperty(t.name)){var i=We[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var We={};function He(e,t){z(t,We.hasOwnProperty(e)?We[e]:We[e]={})}function Ve(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ge(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ke(e,t,n){return!e.startState||e.startState(t,n)}var Ye=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ze(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?it(n,Ze(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?it(e.line,t):n<0?it(e.line,0):e}(t,Ze(e,t.line).text.length)}function pt(e,t){for(var n=[],r=0;r=this.string.length},Ye.prototype.sol=function(){return this.pos==this.lineStart},Ye.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ye.prototype.next=function(){if(this.post},Ye.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ye.prototype.skipToEnd=function(){this.pos=this.string.length},Ye.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ye.prototype.backUp=function(e){this.pos-=e},Ye.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ye.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ye.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ye.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ye.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ft=function(e,t){this.state=e,this.lookAhead=t},ht=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function mt(e,t,n,r){var i=[e.state.modeGen],o={};Et(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,u=0;n.state=!0,Et(e,t.text,s.mode,n,(function(e,t){for(var n=l;ue&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&Ve(e.doc.mode,r.state),o=mt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function vt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ht(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Ze(o,s-1),u=l.stateAfter;if(u&&(!n||s+(u instanceof ft?u.lookAhead:0)<=o.modeFrontier))return s;var c=U(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}(e,t,n),a=o>r.first&&Ze(r,o-1).stateAfter,s=a?ht.fromSaved(r,a,o):new ht(r,Ke(r.mode),o);return r.iter(o,t,(function(n){yt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ht.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ht.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ht.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ht.fromSaved=function(e,t,n){return t instanceof ft?new ht(e,Ve(e.mode,t.state),n,t.lookAhead):new ht(e,Ve(e.mode,t),n)},ht.prototype.save=function(e){var t=!1!==e?Ve(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ft(t,this.maxLookAhead):t};var _t=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function xt(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=Ze(a,(t=dt(a,t)).line),u=vt(e,t.line,n),c=new Ye(l.text,e.options.tabSize,u);for(r&&(o=[]);(r||c.pose.options.maxHighlightLength?(s=!1,a&&yt(e,t,r,d.pos),d.pos=t.length,l=null):l=kt(wt(n,d,r.state,p),o),p){var f=p[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||c!=l){for(;u=t:o.to>t);(r||(r=[])).push(new At(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;bt)&&(!n||Nt(n,o.marker)<0)&&(n=o.marker)}return n}function Ut(e,t,n,r,i){var o=Ze(e,t),a=St&&o.markedSpans;if(a)for(var s=0;s=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ot(u.to,n)>=0:ot(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ot(u.from,r)<=0:ot(u.from,r)<0)))return!0}}}function qt(e){for(var t;t=Ft(e);)e=t.find(-1,!0).line;return e}function $t(e,t){var n=Ze(e,t),r=qt(n);return n==r?t:et(r)}function Wt(e,t){if(t>e.lastLine())return t;var n,r=Ze(e,t);if(!Ht(e,r))return t;for(;n=Bt(r);)r=n.find(1,!0).line;return et(r)+1}function Ht(e,t){var n=St&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Zt=function(e,t,n){this.text=e,Mt(this,t),this.height=n?n(this):1};function Xt(e){e.parent=null,Rt(e)}Zt.prototype.lineNo=function(){return et(this)},xe(Zt);var Qt={},Jt={};function en(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Jt:Qt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function tn(e,t){var n=D("span",null,null,l?"padding-right: .1px":null),r={pre:D("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=rn,Me(e.display.measure)&&(a=fe(o,e.doc.direction))&&(r.addToken=on(r.addToken,a)),r.map=[],sn(o,r,gt(e,o,t!=e.display.externalMeasured&&et(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=L(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=L(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Re(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ye(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=L(r.pre.className,r.textClass||"")),r}function nn(e){var t=P("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function rn(e,t,n,r,i,o,l){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&d.from<=u);p++);if(d.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-u),i,o,null,s,l),o=null,r=r.slice(d.to-u),u=d.to}}}function an(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function sn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,d,p,f=i.length,h=0,m=1,g="",v=0;;){if(v==h){l=u=c=s="",p=null,d=null,v=1/0;for(var y=[],b=void 0,w=0;wh||x.collapsed&&_.to==h&&_.from==h)){if(null!=_.to&&_.to!=h&&v>_.to&&(v=_.to,u=""),x.className&&(l+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&_.from==h&&(c+=" "+x.startStyle),x.endStyle&&_.to==v&&(b||(b=[])).push(x.endStyle,_.to),x.title&&((p||(p={})).title=x.title),x.attributes)for(var k in x.attributes)(p||(p={}))[k]=x.attributes[k];x.collapsed&&(!d||Nt(d.marker,x)<0)&&(d=_)}else _.from>h&&v>_.from&&(v=_.from)}if(b)for(var E=0;E=f)break;for(var S=Math.min(f,v);;){if(g){var A=h+g.length;if(!d){var T=A>S?g.slice(0,S-h):g;t.addToken(t,T,a?a+l:l,c,h+T.length==v?u:"",s,p)}if(A>=S){g=g.slice(S-h),h=S;break}h=A,c=""}g=i.slice(o,o=n[m++]),a=en(n[m++],t.cm.options)}}else for(var O=1;On)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function In(e,t,n,r){return jn(e,Nn(e,t),n,r)}function Ln(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t