@strapi/admin 4.13.6 → 4.14.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/admin/src/content-manager/components/Wysiwyg/EditorLayout.js +1 -1
  2. package/admin/src/content-manager/pages/ListView/components/BulkActionButtons/ConfirmBulkActionDialog/index.js +3 -0
  3. package/admin/src/content-manager/pages/ListView/components/BulkActionButtons/SelectedEntriesModal/index.js +2 -1
  4. package/admin/src/hooks/useAdminRoles/index.js +17 -7
  5. package/admin/src/hooks/useAdminUsers/useAdminUsers.js +16 -7
  6. package/admin/src/hooks/useContentTypes/useContentTypes.js +18 -7
  7. package/admin/src/index.js +1 -7
  8. package/build/1227.4f48119b.chunk.js +1 -0
  9. package/build/{3483.19381b40.chunk.js → 3483.f6b2439f.chunk.js} +1 -1
  10. package/build/4174.924ebd4c.chunk.js +1 -0
  11. package/build/6266.c652bdb1.chunk.js +146 -0
  12. package/build/7897.cf22d5fe.chunk.js +6 -0
  13. package/build/{Admin-authenticatedApp.69c7ea72.chunk.js → Admin-authenticatedApp.a687d9c6.chunk.js} +1 -1
  14. package/build/{admin-app.1fde8f7a.chunk.js → admin-app.4654dc77.chunk.js} +11 -11
  15. package/build/admin-edit-roles-page.6597d934.chunk.js +267 -0
  16. package/build/admin-edit-users.3014605e.chunk.js +10 -0
  17. package/build/admin-roles-list.ab6fcfb7.chunk.js +22 -0
  18. package/build/admin-users.81bf5f4d.chunk.js +11 -0
  19. package/build/audit-logs-settings-page.4eb6cdf8.chunk.js +1 -0
  20. package/build/{content-manager.f9abb63f.chunk.js → content-manager.9187db78.chunk.js} +37 -37
  21. package/build/index.html +1 -1
  22. package/build/{main.9ed36326.js → main.da000219.js} +17 -17
  23. package/build/review-workflows-settings-create-view.5d8806b2.chunk.js +1 -0
  24. package/build/review-workflows-settings-edit-view.634903ed.chunk.js +1 -0
  25. package/build/review-workflows-settings-list-view.d138c3b5.chunk.js +56 -0
  26. package/build/{runtime~main.562cc892.js → runtime~main.9589b498.js} +2 -2
  27. package/build/sso-settings-page.caa35f7b.chunk.js +1 -0
  28. package/ee/admin/content-manager/pages/EditView/InformationBox/components/StageSelect/StageSelect.js +65 -53
  29. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/actions/index.js +50 -5
  30. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/Stages/Stage/Stage.js +257 -21
  31. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/WorkflowAttributes/WorkflowAttributes.js +8 -23
  32. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/constants.js +6 -0
  33. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/hooks/useReviewWorkflows.js +17 -7
  34. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/hooks/useReviewWorkflowsStages.js +36 -0
  35. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/CreateView/CreateView.js +68 -19
  36. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/EditView/EditView.js +105 -35
  37. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/reducer/index.js +68 -27
  38. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/selectors.js +45 -0
  39. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/utils/validateWorkflow.js +20 -0
  40. package/ee/server/config/admin-actions.js +6 -0
  41. package/ee/server/constants/workflows.js +13 -0
  42. package/ee/server/content-types/workflow-stage/index.js +6 -0
  43. package/ee/server/controllers/workflows/index.js +41 -16
  44. package/ee/server/controllers/workflows/stages/index.js +93 -6
  45. package/ee/server/migrations/review-workflows-stages-roles.js +68 -0
  46. package/ee/server/migrations/review-workflows-workflow-name.js +7 -0
  47. package/ee/server/register.js +2 -0
  48. package/ee/server/routes/review-workflows.js +10 -9
  49. package/ee/server/services/index.js +1 -0
  50. package/ee/server/services/review-workflows/stage-permissions.js +60 -0
  51. package/ee/server/services/review-workflows/stages.js +91 -12
  52. package/ee/server/services/review-workflows/workflows/index.js +20 -7
  53. package/ee/server/validation/review-workflows.js +11 -0
  54. package/package.json +8 -8
  55. package/server/content-types/Permission.js +6 -0
  56. package/server/domain/permission/index.js +11 -2
  57. package/server/services/role.js +12 -4
  58. package/server/validation/action-provider.js +1 -1
  59. package/server/validation/common-validators.js +92 -100
  60. package/server/validation/permission.js +0 -3
  61. package/build/1227.c72e74e9.chunk.js +0 -1
  62. package/build/2237.a7992513.chunk.js +0 -114
  63. package/build/4174.6efb0dc6.chunk.js +0 -1
  64. package/build/4724.a0ce68f3.chunk.js +0 -6
  65. package/build/admin-edit-roles-page.f76cb0aa.chunk.js +0 -267
  66. package/build/admin-edit-users.186c9d90.chunk.js +0 -10
  67. package/build/admin-roles-list.3a4edfa2.chunk.js +0 -22
  68. package/build/admin-users.e276bd9a.chunk.js +0 -11
  69. package/build/audit-logs-settings-page.0d9bc0f6.chunk.js +0 -1
  70. package/build/review-workflows-settings-create-view.b96b7be1.chunk.js +0 -1
  71. package/build/review-workflows-settings-edit-view.21a682a0.chunk.js +0 -1
  72. package/build/review-workflows-settings-list-view.14212324.chunk.js +0 -56
  73. package/build/sso-settings-page.d93bd81f.chunk.js +0 -1
@@ -331,7 +331,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
331
331
  .cropper-disabled .cropper-point {
332
332
  cursor: not-allowed;
333
333
  }
334
- `,""]),b.Z=x},10361:function(_){"use strict";_.exports=function(b){var i=[];return i.toString=function(){return this.map(function(f){var d="",g=typeof f[5]<"u";return f[4]&&(d+="@supports (".concat(f[4],") {")),f[2]&&(d+="@media ".concat(f[2]," {")),g&&(d+="@layer".concat(f[5].length>0?" ".concat(f[5]):""," {")),d+=b(f),g&&(d+="}"),f[2]&&(d+="}"),f[4]&&(d+="}"),d}).join("")},i.i=function(f,d,g,E,m){typeof f=="string"&&(f=[[null,f,void 0]]);var C={};if(g)for(var x=0;x<this.length;x++){var P=this[x][0];P!=null&&(C[P]=!0)}for(var T=0;T<f.length;T++){var O=[].concat(f[T]);g&&C[O[0]]||(typeof m<"u"&&(typeof O[5]>"u"||(O[1]="@layer".concat(O[5].length>0?" ".concat(O[5]):""," {").concat(O[1],"}")),O[5]=m),d&&(O[2]&&(O[1]="@media ".concat(O[2]," {").concat(O[1],"}")),O[2]=d),E&&(O[4]?(O[1]="@supports (".concat(O[4],") {").concat(O[1],"}"),O[4]=E):O[4]="".concat(E)),i.push(O))}},i}},32626:function(_){"use strict";_.exports=function(b,i){return i||(i={}),b&&(b=String(b.__esModule?b.default:b),/^['"].*['"]$/.test(b)&&(b=b.slice(1,-1)),i.hash&&(b+=i.hash),/["'() \t\n]|(%20)/.test(b)||i.needQuotes?'"'.concat(b.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):b)}},96558:function(_){"use strict";_.exports=function(b){return b[1]}},24319:function(_,b,i){"use strict";i.d(b,{Z:function(){return l}});function l(f,d){for(var g=f<0?"-":"",E=Math.abs(f).toString();E.length<d;)E="0"+E;return g+E}},22774:function(_,b,i){"use strict";i.d(b,{Z:function(){return l}});function l(f){var d=new Date(Date.UTC(f.getFullYear(),f.getMonth(),f.getDate(),f.getHours(),f.getMinutes(),f.getSeconds(),f.getMilliseconds()));return d.setUTCFullYear(f.getFullYear()),f.getTime()-d.getTime()}},96256:function(_,b,i){"use strict";i.d(b,{Z:function(){return l}});function l(f,d){if(d.length<f)throw new TypeError(f+" argument"+(f>1?"s":"")+" required, but only "+d.length+" present")}},10420:function(_,b,i){"use strict";i.d(b,{Z:function(){return l}});function l(f){if(f===null||f===!0||f===!1)return NaN;var d=Number(f);return isNaN(d)?d:d<0?Math.ceil(d):Math.floor(d)}},85544:function(_,b,i){"use strict";i.d(b,{Z:function(){return g}});var l=i(10420),f=i(907),d=i(96256);function g(E,m){(0,d.Z)(2,arguments);var C=(0,f.Z)(E),x=(0,l.Z)(m);return isNaN(x)?new Date(NaN):(x&&C.setDate(C.getDate()+x),C)}},68710:function(_,b,i){"use strict";i.d(b,{vh:function(){return E},yJ:function(){return g}});var l=7,f=365.2425,d=Math.pow(10,8)*24*60*60*1e3,g=6e4,E=36e5,m=1e3,C=-d,x=60,P=3,T=12,O=4,w=3600,R=60,F=w*24,V=F*7,L=F*f,$=L/12,U=$*3},86357:function(_,b,i){"use strict";i.d(b,{Z:function(){return be}});var l=i(907),f=i(96256);function d(te,q){(0,f.Z)(2,arguments);var ee=(0,l.Z)(te),Se=(0,l.Z)(q),tt=ee.getTime()-Se.getTime();return tt<0?-1:tt>0?1:tt}var g=i(73151),E=i(85544),m=i(10420);function C(te,q){(0,f.Z)(2,arguments);var ee=(0,l.Z)(te),Se=(0,m.Z)(q);if(isNaN(Se))return new Date(NaN);if(!Se)return ee;var tt=ee.getDate(),Ae=new Date(ee.getTime());Ae.setMonth(ee.getMonth()+Se+1,0);var pe=Ae.getDate();return tt>=pe?Ae:(ee.setFullYear(Ae.getFullYear(),Ae.getMonth(),tt),ee)}function x(te,q){if((0,f.Z)(2,arguments),!q||(0,g.Z)(q)!=="object")return new Date(NaN);var ee=q.years?(0,m.Z)(q.years):0,Se=q.months?(0,m.Z)(q.months):0,tt=q.weeks?(0,m.Z)(q.weeks):0,Ae=q.days?(0,m.Z)(q.days):0,pe=q.hours?(0,m.Z)(q.hours):0,Pe=q.minutes?(0,m.Z)(q.minutes):0,ye=q.seconds?(0,m.Z)(q.seconds):0,Ee=(0,l.Z)(te),_e=Se||ee?C(Ee,Se+ee*12):Ee,We=Ae||tt?(0,E.Z)(_e,Ae+tt*7):_e,Ie=Pe+pe*60,Fe=ye+Ie*60,ut=Fe*1e3,ht=new Date(We.getTime()+ut);return ht}var P=i(22774);function T(te){(0,f.Z)(1,arguments);var q=(0,l.Z)(te);return q.setHours(0,0,0,0),q}var O=864e5;function w(te,q){(0,f.Z)(2,arguments);var ee=T(te),Se=T(q),tt=ee.getTime()-(0,P.Z)(ee),Ae=Se.getTime()-(0,P.Z)(Se);return Math.round((tt-Ae)/O)}function R(te,q){var ee=te.getFullYear()-q.getFullYear()||te.getMonth()-q.getMonth()||te.getDate()-q.getDate()||te.getHours()-q.getHours()||te.getMinutes()-q.getMinutes()||te.getSeconds()-q.getSeconds()||te.getMilliseconds()-q.getMilliseconds();return ee<0?-1:ee>0?1:ee}function F(te,q){(0,f.Z)(2,arguments);var ee=(0,l.Z)(te),Se=(0,l.Z)(q),tt=R(ee,Se),Ae=Math.abs(w(ee,Se));ee.setDate(ee.getDate()-tt*Ae);var pe=Number(R(ee,Se)===-tt),Pe=tt*(Ae-pe);return Pe===0?0:Pe}var V=i(68710);function L(te,q){return(0,f.Z)(2,arguments),(0,l.Z)(te).getTime()-(0,l.Z)(q).getTime()}var $={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(q){return q<0?Math.ceil(q):Math.floor(q)}},U="trunc";function N(te){return te?$[te]:$[U]}function k(te,q,ee){(0,f.Z)(2,arguments);var Se=L(te,q)/V.vh;return N(ee?.roundingMethod)(Se)}function j(te,q,ee){(0,f.Z)(2,arguments);var Se=L(te,q)/V.yJ;return N(ee?.roundingMethod)(Se)}function z(te,q){(0,f.Z)(2,arguments);var ee=(0,l.Z)(te),Se=(0,l.Z)(q),tt=ee.getFullYear()-Se.getFullYear(),Ae=ee.getMonth()-Se.getMonth();return tt*12+Ae}function K(te){(0,f.Z)(1,arguments);var q=(0,l.Z)(te);return q.setHours(23,59,59,999),q}function G(te){(0,f.Z)(1,arguments);var q=(0,l.Z)(te),ee=q.getMonth();return q.setFullYear(q.getFullYear(),ee+1,0),q.setHours(23,59,59,999),q}function Y(te){(0,f.Z)(1,arguments);var q=(0,l.Z)(te);return K(q).getTime()===G(q).getTime()}function ae(te,q){(0,f.Z)(2,arguments);var ee=(0,l.Z)(te),Se=(0,l.Z)(q),tt=d(ee,Se),Ae=Math.abs(z(ee,Se)),pe;if(Ae<1)pe=0;else{ee.getMonth()===1&&ee.getDate()>27&&ee.setDate(30),ee.setMonth(ee.getMonth()-tt*Ae);var Pe=d(ee,Se)===-tt;Y((0,l.Z)(te))&&Ae===1&&d(te,Se)===1&&(Pe=!1),pe=tt*(Ae-Number(Pe))}return pe===0?0:pe}function Ce(te,q,ee){(0,f.Z)(2,arguments);var Se=L(te,q)/1e3;return N(ee?.roundingMethod)(Se)}function J(te,q){(0,f.Z)(2,arguments);var ee=(0,l.Z)(te),Se=(0,l.Z)(q);return ee.getFullYear()-Se.getFullYear()}function le(te,q){(0,f.Z)(2,arguments);var ee=(0,l.Z)(te),Se=(0,l.Z)(q),tt=d(ee,Se),Ae=Math.abs(J(ee,Se));ee.setFullYear(1584),Se.setFullYear(1584);var pe=d(ee,Se)===-tt,Pe=tt*(Ae-Number(pe));return Pe===0?0:Pe}function be(te){(0,f.Z)(1,arguments);var q=(0,l.Z)(te.start),ee=(0,l.Z)(te.end);if(isNaN(q.getTime()))throw new RangeError("Start Date is invalid");if(isNaN(ee.getTime()))throw new RangeError("End Date is invalid");var Se={};Se.years=Math.abs(le(ee,q));var tt=d(ee,q),Ae=x(q,{years:tt*Se.years});Se.months=Math.abs(ae(ee,Ae));var pe=x(Ae,{months:tt*Se.months});Se.days=Math.abs(F(ee,pe));var Pe=x(pe,{days:tt*Se.days});Se.hours=Math.abs(k(ee,Pe));var ye=x(Pe,{hours:tt*Se.hours});Se.minutes=Math.abs(j(ee,ye));var Ee=x(ye,{minutes:tt*Se.minutes});return Se.seconds=Math.abs(Ce(ee,Ee)),Se}},96315:function(_,b,i){"use strict";i.d(b,{Z:function(){return g}});var l=i(68710),f=i(96256),d=i(10420);function g(G,Y){var ae;(0,f.Z)(1,arguments);var Ce=(0,d.Z)((ae=Y?.additionalDigits)!==null&&ae!==void 0?ae:2);if(Ce!==2&&Ce!==1&&Ce!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof G=="string"||Object.prototype.toString.call(G)==="[object String]"))return new Date(NaN);var J=P(G),le;if(J.date){var be=T(J.date,Ce);le=O(be.restDateString,be.year)}if(!le||isNaN(le.getTime()))return new Date(NaN);var te=le.getTime(),q=0,ee;if(J.time&&(q=R(J.time),isNaN(q)))return new Date(NaN);if(J.timezone){if(ee=V(J.timezone),isNaN(ee))return new Date(NaN)}else{var Se=new Date(te+q),tt=new Date(0);return tt.setFullYear(Se.getUTCFullYear(),Se.getUTCMonth(),Se.getUTCDate()),tt.setHours(Se.getUTCHours(),Se.getUTCMinutes(),Se.getUTCSeconds(),Se.getUTCMilliseconds()),tt}return new Date(te+q+ee)}var E={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},m=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,C=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,x=/^([+-])(\d{2})(?::?(\d{2}))?$/;function P(G){var Y={},ae=G.split(E.dateTimeDelimiter),Ce;if(ae.length>2)return Y;if(/:/.test(ae[0])?Ce=ae[0]:(Y.date=ae[0],Ce=ae[1],E.timeZoneDelimiter.test(Y.date)&&(Y.date=G.split(E.timeZoneDelimiter)[0],Ce=G.substr(Y.date.length,G.length))),Ce){var J=E.timezone.exec(Ce);J?(Y.time=Ce.replace(J[1],""),Y.timezone=J[1]):Y.time=Ce}return Y}function T(G,Y){var ae=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+Y)+"})|(\\d{2}|[+-]\\d{"+(2+Y)+"})$)"),Ce=G.match(ae);if(!Ce)return{year:NaN,restDateString:""};var J=Ce[1]?parseInt(Ce[1]):null,le=Ce[2]?parseInt(Ce[2]):null;return{year:le===null?J:le*100,restDateString:G.slice((Ce[1]||Ce[2]).length)}}function O(G,Y){if(Y===null)return new Date(NaN);var ae=G.match(m);if(!ae)return new Date(NaN);var Ce=!!ae[4],J=w(ae[1]),le=w(ae[2])-1,be=w(ae[3]),te=w(ae[4]),q=w(ae[5])-1;if(Ce)return j(Y,te,q)?L(Y,te,q):new Date(NaN);var ee=new Date(0);return!N(Y,le,be)||!k(Y,J)?new Date(NaN):(ee.setUTCFullYear(Y,le,Math.max(J,be)),ee)}function w(G){return G?parseInt(G):1}function R(G){var Y=G.match(C);if(!Y)return NaN;var ae=F(Y[1]),Ce=F(Y[2]),J=F(Y[3]);return z(ae,Ce,J)?ae*l.vh+Ce*l.yJ+J*1e3:NaN}function F(G){return G&&parseFloat(G.replace(",","."))||0}function V(G){if(G==="Z")return 0;var Y=G.match(x);if(!Y)return 0;var ae=Y[1]==="+"?-1:1,Ce=parseInt(Y[2]),J=Y[3]&&parseInt(Y[3])||0;return K(Ce,J)?ae*(Ce*l.vh+J*l.yJ):NaN}function L(G,Y,ae){var Ce=new Date(0);Ce.setUTCFullYear(G,0,4);var J=Ce.getUTCDay()||7,le=(Y-1)*7+ae+1-J;return Ce.setUTCDate(Ce.getUTCDate()+le),Ce}var $=[31,null,31,30,31,30,31,31,30,31,30,31];function U(G){return G%400===0||G%4===0&&G%100!==0}function N(G,Y,ae){return Y>=0&&Y<=11&&ae>=1&&ae<=($[Y]||(U(G)?29:28))}function k(G,Y){return Y>=1&&Y<=(U(G)?366:365)}function j(G,Y,ae){return Y>=1&&Y<=53&&ae>=0&&ae<=6}function z(G,Y,ae){return G===24?Y===0&&ae===0:ae>=0&&ae<60&&Y>=0&&Y<60&&G>=0&&G<25}function K(G,Y){return Y>=0&&Y<=59}},907:function(_,b,i){"use strict";i.d(b,{Z:function(){return d}});var l=i(73151),f=i(96256);function d(g){(0,f.Z)(1,arguments);var E=Object.prototype.toString.call(g);return g instanceof Date||(0,l.Z)(g)==="object"&&E==="[object Date]"?new Date(g.getTime()):typeof g=="number"||E==="[object Number]"?new Date(g):((typeof g=="string"||E==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}},42866:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createBeginDrag=m;var l=i(17210),f=i(63005),d=i(41861),g=i(80929);const E={type:g.INIT_COORDS,payload:{clientOffset:null,sourceClientOffset:null}};function m(O){return function(R=[],F={publishSource:!0}){const{publishSource:V=!0,clientOffset:L,getSourceClientOffset:$}=F,U=O.getMonitor(),N=O.getRegistry();O.dispatch(f.setClientOffset(L)),C(R,U,N);const k=T(R,U);if(k==null){O.dispatch(E);return}let j=null;if(L){if(!$)throw new Error("getSourceClientOffset must be defined");x($),j=$(k)}O.dispatch(f.setClientOffset(L,j));const K=N.getSource(k).beginDrag(U,k);if(K==null)return;P(K),N.pinSource(k);const G=N.getSourceType(k);return{type:g.BEGIN_DRAG,payload:{itemType:G,item:K,sourceId:k,clientOffset:L||null,sourceClientOffset:j||null,isSourcePublic:!!V}}}}function C(O,w,R){l.invariant(!w.isDragging(),"Cannot call beginDrag while dragging."),O.forEach(function(F){l.invariant(R.getSource(F),"Expected sourceIds to be registered.")})}function x(O){l.invariant(typeof O=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function P(O){l.invariant(d.isObject(O),"Item must be an object.")}function T(O,w){let R=null;for(let F=O.length-1;F>=0;F--)if(w.canDragSource(O[F])){R=O[F];break}return R}},38957:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createDrop=m;var l=i(17210),f=i(80929),d=i(41861);function g(O,w,R){return w in O?Object.defineProperty(O,w,{value:R,enumerable:!0,configurable:!0,writable:!0}):O[w]=R,O}function E(O){for(var w=1;w<arguments.length;w++){var R=arguments[w]!=null?arguments[w]:{},F=Object.keys(R);typeof Object.getOwnPropertySymbols=="function"&&(F=F.concat(Object.getOwnPropertySymbols(R).filter(function(V){return Object.getOwnPropertyDescriptor(R,V).enumerable}))),F.forEach(function(V){g(O,V,R[V])})}return O}function m(O){return function(R={}){const F=O.getMonitor(),V=O.getRegistry();C(F),T(F).forEach(($,U)=>{const N=x($,U,V,F),k={type:f.DROP,payload:{dropResult:E({},R,N)}};O.dispatch(k)})}}function C(O){l.invariant(O.isDragging(),"Cannot call drop while not dragging."),l.invariant(!O.didDrop(),"Cannot call drop twice during one drag operation.")}function x(O,w,R,F){const V=R.getTarget(O);let L=V?V.drop(F,O):void 0;return P(L),typeof L>"u"&&(L=w===0?{}:F.getDropResult()),L}function P(O){l.invariant(typeof O>"u"||d.isObject(O),"Drop result must either be an object or undefined.")}function T(O){const w=O.getTargetIds().filter(O.canDropOnTarget,O);return w.reverse(),w}},87018:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createEndDrag=d;var l=i(17210),f=i(80929);function d(E){return function(){const C=E.getMonitor(),x=E.getRegistry();g(C);const P=C.getSourceId();return P!=null&&(x.getSource(P,!0).endDrag(C,P),x.unpinSource()),{type:f.END_DRAG}}}function g(E){l.invariant(E.isDragging(),"Cannot call endDrag while not dragging.")}},63723:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createHover=g;var l=i(17210),f=i(18943),d=i(80929);function g(P){return function(O,{clientOffset:w}={}){E(O);const R=O.slice(0),F=P.getMonitor(),V=P.getRegistry();m(R,F,V);const L=F.getItemType();return C(R,V,L),x(R,F,V),{type:d.HOVER,payload:{targetIds:R,clientOffset:w||null}}}}function E(P){l.invariant(Array.isArray(P),"Expected targetIds to be an array.")}function m(P,T,O){l.invariant(T.isDragging(),"Cannot call hover while not dragging."),l.invariant(!T.didDrop(),"Cannot call hover after drop.");for(let w=0;w<P.length;w++){const R=P[w];l.invariant(P.lastIndexOf(R)===w,"Expected targetIds to be unique in the passed array.");const F=O.getTarget(R);l.invariant(F,"Expected targetIds to be registered.")}}function C(P,T,O){for(let w=P.length-1;w>=0;w--){const R=P[w],F=T.getTargetType(R);f.matchesType(F,O)||P.splice(w,1)}}function x(P,T,O){P.forEach(function(w){O.getTarget(w).hover(T,w)})}},3228:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var l={createDragDropActions:!0,manager:!0};b.createDragDropActions=P;var f=i(42866),d=i(72004),g=i(63723),E=i(38957),m=i(87018),C=x(i(80929));Object.keys(C).forEach(function(T){T==="default"||T==="__esModule"||Object.prototype.hasOwnProperty.call(l,T)||T in b&&b[T]===C[T]||Object.defineProperty(b,T,{enumerable:!0,get:function(){return C[T]}})});function x(T){if(T&&T.__esModule)return T;var O={};if(T!=null){for(var w in T)if(Object.prototype.hasOwnProperty.call(T,w)){var R=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(T,w):{};R.get||R.set?Object.defineProperty(O,w,R):O[w]=T[w]}}return O.default=T,O}function P(T){return{beginDrag:f.createBeginDrag(T),publishDragSource:d.createPublishDragSource(T),hover:g.createHover(T),drop:E.createDrop(T),endDrag:m.createEndDrag(T)}}},63005:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.setClientOffset=f;var l=i(80929);function f(d,g){return{type:l.INIT_COORDS,payload:{sourceClientOffset:g||null,clientOffset:d||null}}}},72004:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createPublishDragSource=f;var l=i(80929);function f(d){return function(){if(d.getMonitor().isDragging())return{type:l.PUBLISH_DRAG_SOURCE}}}},80929:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.END_DRAG=b.DROP=b.HOVER=b.PUBLISH_DRAG_SOURCE=b.BEGIN_DRAG=b.INIT_COORDS=void 0;const i="dnd-core/INIT_COORDS";b.INIT_COORDS=i;const l="dnd-core/BEGIN_DRAG";b.BEGIN_DRAG=l;const f="dnd-core/PUBLISH_DRAG_SOURCE";b.PUBLISH_DRAG_SOURCE=f;const d="dnd-core/HOVER";b.HOVER=d;const g="dnd-core/DROP";b.DROP=g;const E="dnd-core/END_DRAG";b.END_DRAG=E},24424:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.addSource=g,b.addTarget=E,b.removeSource=m,b.removeTarget=C,b.REMOVE_TARGET=b.REMOVE_SOURCE=b.ADD_TARGET=b.ADD_SOURCE=void 0;const i="dnd-core/ADD_SOURCE";b.ADD_SOURCE=i;const l="dnd-core/ADD_TARGET";b.ADD_TARGET=l;const f="dnd-core/REMOVE_SOURCE";b.REMOVE_SOURCE=f;const d="dnd-core/REMOVE_TARGET";b.REMOVE_TARGET=d;function g(x){return{type:i,payload:{sourceId:x}}}function E(x){return{type:l,payload:{targetId:x}}}function m(x){return{type:f,payload:{sourceId:x}}}function C(x){return{type:d,payload:{targetId:x}}}},21159:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var l=i(3228);class f{receiveBackend(g){this.backend=g}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const g=this,{dispatch:E}=this.store;function m(x){return(...P)=>{const T=x.apply(g,P);typeof T<"u"&&E(T)}}const C=l.createDragDropActions(this);return Object.keys(C).reduce((x,P)=>{const T=C[P];return x[P]=m(T),x},{})}dispatch(g){this.store.dispatch(g)}constructor(g,E){this.isSetUp=!1,this.handleRefCountChange=()=>{const m=this.store.getState().refCount>0;this.backend&&(m&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!m&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=g,this.monitor=E,g.subscribe(this.handleRefCountChange)}}b.DragDropManagerImpl=f},44913:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var l=i(17210),f=i(18943),d=i(14997),g=i(65616);class E{subscribeToStateChange(C,x={}){const{handlerIds:P}=x;l.invariant(typeof C=="function","listener must be a function."),l.invariant(typeof P>"u"||Array.isArray(P),"handlerIds, when specified, must be an array of strings.");let T=this.store.getState().stateId;const O=()=>{const w=this.store.getState(),R=w.stateId;try{R===T||R===T+1&&!g.areDirty(w.dirtyHandlerIds,P)||C()}finally{T=R}};return this.store.subscribe(O)}subscribeToOffsetChange(C){l.invariant(typeof C=="function","listener must be a function.");let x=this.store.getState().dragOffset;const P=()=>{const T=this.store.getState().dragOffset;T!==x&&(x=T,C())};return this.store.subscribe(P)}canDragSource(C){if(!C)return!1;const x=this.registry.getSource(C);return l.invariant(x,`Expected to find a valid source. sourceId=${C}`),this.isDragging()?!1:x.canDrag(this,C)}canDropOnTarget(C){if(!C)return!1;const x=this.registry.getTarget(C);if(l.invariant(x,`Expected to find a valid target. targetId=${C}`),!this.isDragging()||this.didDrop())return!1;const P=this.registry.getTargetType(C),T=this.getItemType();return f.matchesType(P,T)&&x.canDrop(this,C)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(C){if(!C)return!1;const x=this.registry.getSource(C,!0);if(l.invariant(x,`Expected to find a valid source. sourceId=${C}`),!this.isDragging()||!this.isSourcePublic())return!1;const P=this.registry.getSourceType(C),T=this.getItemType();return P!==T?!1:x.isDragging(this,C)}isOverTarget(C,x={shallow:!1}){if(!C)return!1;const{shallow:P}=x;if(!this.isDragging())return!1;const T=this.registry.getTargetType(C),O=this.getItemType();if(O&&!f.matchesType(T,O))return!1;const w=this.getTargetIds();if(!w.length)return!1;const R=w.indexOf(C);return P?R===w.length-1:R>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return d.getSourceClientOffset(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return d.getDifferenceFromInitialOffset(this.store.getState().dragOffset)}constructor(C,x){this.store=C,this.registry=x}}b.DragDropMonitorImpl=E},15502:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var l=i(17210),f=i(24424),d=i(3677),g=i(46074),E=i(98391),m=i(40839);function C(O){const w=d.getNextUniqueId().toString();switch(O){case g.HandlerRole.SOURCE:return`S${w}`;case g.HandlerRole.TARGET:return`T${w}`;default:throw new Error(`Unknown Handler Role: ${O}`)}}function x(O){switch(O[0]){case"S":return g.HandlerRole.SOURCE;case"T":return g.HandlerRole.TARGET;default:throw new Error(`Cannot parse handler ID: ${O}`)}}function P(O,w){const R=O.entries();let F=!1;do{const{done:V,value:[,L]}=R.next();if(L===w)return!0;F=!!V}while(!F);return!1}class T{addSource(w,R){E.validateType(w),E.validateSourceContract(R);const F=this.addHandler(g.HandlerRole.SOURCE,w,R);return this.store.dispatch(f.addSource(F)),F}addTarget(w,R){E.validateType(w,!0),E.validateTargetContract(R);const F=this.addHandler(g.HandlerRole.TARGET,w,R);return this.store.dispatch(f.addTarget(F)),F}containsHandler(w){return P(this.dragSources,w)||P(this.dropTargets,w)}getSource(w,R=!1){return l.invariant(this.isSourceId(w),"Expected a valid source ID."),R&&w===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(w)}getTarget(w){return l.invariant(this.isTargetId(w),"Expected a valid target ID."),this.dropTargets.get(w)}getSourceType(w){return l.invariant(this.isSourceId(w),"Expected a valid source ID."),this.types.get(w)}getTargetType(w){return l.invariant(this.isTargetId(w),"Expected a valid target ID."),this.types.get(w)}isSourceId(w){return x(w)===g.HandlerRole.SOURCE}isTargetId(w){return x(w)===g.HandlerRole.TARGET}removeSource(w){l.invariant(this.getSource(w),"Expected an existing source."),this.store.dispatch(f.removeSource(w)),m.asap(()=>{this.dragSources.delete(w),this.types.delete(w)})}removeTarget(w){l.invariant(this.getTarget(w),"Expected an existing target."),this.store.dispatch(f.removeTarget(w)),this.dropTargets.delete(w),this.types.delete(w)}pinSource(w){const R=this.getSource(w);l.invariant(R,"Expected an existing source."),this.pinnedSourceId=w,this.pinnedSource=R}unpinSource(){l.invariant(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(w,R,F){const V=C(w);return this.types.set(V,R),w===g.HandlerRole.SOURCE?this.dragSources.set(V,F):w===g.HandlerRole.TARGET&&this.dropTargets.set(V,F),V}constructor(w){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=w}}b.HandlerRegistryImpl=T},98391:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.validateSourceContract=f,b.validateTargetContract=d,b.validateType=g;var l=i(17210);function f(E){l.invariant(typeof E.canDrag=="function","Expected canDrag to be a function."),l.invariant(typeof E.beginDrag=="function","Expected beginDrag to be a function."),l.invariant(typeof E.endDrag=="function","Expected endDrag to be a function.")}function d(E){l.invariant(typeof E.canDrop=="function","Expected canDrop to be a function."),l.invariant(typeof E.hover=="function","Expected hover to be a function."),l.invariant(typeof E.drop=="function","Expected beginDrag to be a function.")}function g(E,m){if(m&&Array.isArray(E)){E.forEach(C=>g(C,!1));return}l.invariant(typeof E=="string"||typeof E=="symbol",m?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}},41618:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createDragDropManager=m;var l=i(21159),f=i(6680),d=i(82182),g=i(44913),E=i(15502);function m(x,P=void 0,T={},O=!1){const w=C(O),R=new g.DragDropMonitorImpl(w,new E.HandlerRegistryImpl(w)),F=new l.DragDropManagerImpl(w,R),V=x(F,P,T);return F.receiveBackend(V),F}function C(x){const P=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return f.createStore(d.reduce,x&&P&&P({name:"dnd-core",instanceId:"dnd-core"}))}},67533:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var l={},f=g(i(46074));Object.keys(f).forEach(function(E){E==="default"||E==="__esModule"||Object.prototype.hasOwnProperty.call(l,E)||E in b&&b[E]===f[E]||Object.defineProperty(b,E,{enumerable:!0,get:function(){return f[E]}})});var d=g(i(41618));Object.keys(d).forEach(function(E){E==="default"||E==="__esModule"||Object.prototype.hasOwnProperty.call(l,E)||E in b&&b[E]===d[E]||Object.defineProperty(b,E,{enumerable:!0,get:function(){return d[E]}})});function g(E){if(E&&E.__esModule)return E;var m={};if(E!=null){for(var C in E)if(Object.prototype.hasOwnProperty.call(E,C)){var x=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,C):{};x.get||x.set?Object.defineProperty(m,C,x):m[C]=E[C]}}return m.default=E,m}},46074:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.HandlerRole=void 0;var i;b.HandlerRole=i,function(l){l.SOURCE="SOURCE",l.TARGET="TARGET"}(i||(b.HandlerRole=i={}))},50627:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.reduce=m;var l=i(3228),f=i(24424),d=i(5603),g=i(65616),E=i(41861);function m(C=g.NONE,x){switch(x.type){case l.HOVER:break;case f.ADD_SOURCE:case f.ADD_TARGET:case f.REMOVE_TARGET:case f.REMOVE_SOURCE:return g.NONE;case l.BEGIN_DRAG:case l.PUBLISH_DRAG_SOURCE:case l.END_DRAG:case l.DROP:default:return g.ALL}const{targetIds:P=[],prevTargetIds:T=[]}=x.payload,O=E.xor(P,T);if(!(O.length>0||!d.areArraysEqual(P,T)))return g.NONE;const R=T[T.length-1],F=P[P.length-1];return R!==F&&(R&&O.push(R),F&&O.push(F)),O}},27716:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.reduce=m;var l=i(3228),f=i(5603);function d(C,x,P){return x in C?Object.defineProperty(C,x,{value:P,enumerable:!0,configurable:!0,writable:!0}):C[x]=P,C}function g(C){for(var x=1;x<arguments.length;x++){var P=arguments[x]!=null?arguments[x]:{},T=Object.keys(P);typeof Object.getOwnPropertySymbols=="function"&&(T=T.concat(Object.getOwnPropertySymbols(P).filter(function(O){return Object.getOwnPropertyDescriptor(P,O).enumerable}))),T.forEach(function(O){d(C,O,P[O])})}return C}const E={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function m(C=E,x){const{payload:P}=x;switch(x.type){case l.INIT_COORDS:case l.BEGIN_DRAG:return{initialSourceClientOffset:P.sourceClientOffset,initialClientOffset:P.clientOffset,clientOffset:P.clientOffset};case l.HOVER:return f.areCoordsEqual(C.clientOffset,P.clientOffset)?C:g({},C,{clientOffset:P.clientOffset});case l.END_DRAG:case l.DROP:return E;default:return C}}},90231:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.reduce=C;var l=i(3228),f=i(24424),d=i(41861);function g(x,P,T){return P in x?Object.defineProperty(x,P,{value:T,enumerable:!0,configurable:!0,writable:!0}):x[P]=T,x}function E(x){for(var P=1;P<arguments.length;P++){var T=arguments[P]!=null?arguments[P]:{},O=Object.keys(T);typeof Object.getOwnPropertySymbols=="function"&&(O=O.concat(Object.getOwnPropertySymbols(T).filter(function(w){return Object.getOwnPropertyDescriptor(T,w).enumerable}))),O.forEach(function(w){g(x,w,T[w])})}return x}const m={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function C(x=m,P){const{payload:T}=P;switch(P.type){case l.BEGIN_DRAG:return E({},x,{itemType:T.itemType,item:T.item,sourceId:T.sourceId,isSourcePublic:T.isSourcePublic,dropResult:null,didDrop:!1});case l.PUBLISH_DRAG_SOURCE:return E({},x,{isSourcePublic:!0});case l.HOVER:return E({},x,{targetIds:T.targetIds});case f.REMOVE_TARGET:return x.targetIds.indexOf(T.targetId)===-1?x:E({},x,{targetIds:d.without(x.targetIds,T.targetId)});case l.DROP:return E({},x,{dropResult:T.dropResult,didDrop:!0,targetIds:[]});case l.END_DRAG:return E({},x,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return x}}},82182:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.reduce=P;var l=i(27716),f=i(90231),d=i(57874),g=i(50627),E=i(30441),m=i(41861);function C(T,O,w){return O in T?Object.defineProperty(T,O,{value:w,enumerable:!0,configurable:!0,writable:!0}):T[O]=w,T}function x(T){for(var O=1;O<arguments.length;O++){var w=arguments[O]!=null?arguments[O]:{},R=Object.keys(w);typeof Object.getOwnPropertySymbols=="function"&&(R=R.concat(Object.getOwnPropertySymbols(w).filter(function(F){return Object.getOwnPropertyDescriptor(w,F).enumerable}))),R.forEach(function(F){C(T,F,w[F])})}return T}function P(T={},O){return{dirtyHandlerIds:g.reduce(T.dirtyHandlerIds,{type:O.type,payload:x({},O.payload,{prevTargetIds:m.get(T,"dragOperation.targetIds",[])})}),dragOffset:l.reduce(T.dragOffset,O),refCount:d.reduce(T.refCount,O),dragOperation:f.reduce(T.dragOperation,O),stateId:E.reduce(T.stateId)}}},57874:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.reduce=f;var l=i(24424);function f(d=0,g){switch(g.type){case l.ADD_SOURCE:case l.ADD_TARGET:return d+1;case l.REMOVE_SOURCE:case l.REMOVE_TARGET:return d-1;default:return d}}},30441:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.reduce=i;function i(l=0){return l+1}},14997:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.add=i,b.subtract=l,b.getSourceClientOffset=f,b.getDifferenceFromInitialOffset=d;function i(g,E){return{x:g.x+E.x,y:g.y+E.y}}function l(g,E){return{x:g.x-E.x,y:g.y-E.y}}function f(g){const{clientOffset:E,initialClientOffset:m,initialSourceClientOffset:C}=g;return!E||!m||!C?null:l(i(E,C),m)}function d(g){const{clientOffset:E,initialClientOffset:m}=g;return!E||!m?null:l(E,m)}},65616:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.areDirty=g,b.ALL=b.NONE=void 0;var l=i(41861);const f=[];b.NONE=f;const d=[];b.ALL=d,f.__IS_NONE__=!0,d.__IS_ALL__=!0;function g(E,m){return E===f?!1:E===d||typeof m>"u"?!0:l.intersection(m,E).length>0}},5603:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.areCoordsEqual=l,b.areArraysEqual=f,b.strictEquality=void 0;const i=(d,g)=>d===g;b.strictEquality=i;function l(d,g){return!d&&!g?!0:!d||!g?!1:d.x===g.x&&d.y===g.y}function f(d,g,E=i){if(d.length!==g.length)return!1;for(let m=0;m<d.length;++m)if(!E(d[m],g[m]))return!1;return!0}},3677:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getNextUniqueId=l;let i=0;function l(){return i++}},41861:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.get=i,b.without=l,b.isString=f,b.isObject=d,b.xor=g,b.intersection=E;function i(m,C,x){return C.split(".").reduce((P,T)=>P&&P[T]?P[T]:x||null,m)}function l(m,C){return m.filter(x=>x!==C)}function f(m){return typeof m=="string"}function d(m){return typeof m=="object"}function g(m,C){const x=new Map,P=O=>{x.set(O,x.has(O)?x.get(O)+1:1)};m.forEach(P),C.forEach(P);const T=[];return x.forEach((O,w)=>{O===1&&T.push(w)}),T}function E(m,C){return m.filter(x=>C.indexOf(x)>-1)}},18943:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.matchesType=i;function i(l,f){return f===null?l===null:Array.isArray(l)?l.some(d=>d===f):l===f}},82702:function(_,b,i){"use strict";i.d(b,{l:function(){return l},m:function(){return f}});const l="StrapiAdmin/RBACProvider/RESET_STORE",f="StrapiAdmin/RBACProvider/SET_PERMISSIONS"},85149:function(_,b,i){"use strict";i.d(b,{Q:function(){return f},m:function(){return l}});const l="ContentManager/RBACManager/SET_PERMISSIONS",f="ContentManager/RBACManager/RESET_PERMISSIONS"},70475:function(_,b,i){"use strict";i.d(b,{IX:function(){return d},fn:function(){return l},sZ:function(){return f}});const l="ContentManager/App/GET_INIT_DATA",f="ContentManager/App/RESET_INIT_DATA",d="ContentManager/App/SET_INIT_DATA"},60371:function(_,b,i){"use strict";i.d(b,{E:function(){return d}});var l=i(97889),f=i(70475);const d={components:[],status:"loading",models:[],collectionTypeLinks:[],singleTypeLinks:[]},g=(E=d,m)=>(0,l.ZP)(E,C=>{switch(m.type){case f.fn:{C.status="loading";break}case f.sZ:return d;case f.IX:{C.collectionTypeLinks=m.data.authorizedCollectionTypeLinks.filter(({isDisplayed:x})=>x),C.singleTypeLinks=m.data.authorizedSingleTypeLinks.filter(({isDisplayed:x})=>x),C.components=m.data.components,C.models=m.data.contentTypeSchemas,C.fieldSizes=m.data.fieldSizes,C.status="resolved";break}default:return C}});b.Z=g},40582:function(_,b,i){"use strict";i.d(b,{O:function(){return l},c:function(){return f}});const l="ContentManager/EditViewLayoutManager/SET_LAYOUT",f="ContentManager/EditViewLayoutManager/RESET_PROPS"},93088:function(_,b,i){"use strict";i.d(b,{Id:function(){return f},MP:function(){return E},Rp:function(){return g},ZA:function(){return l},Zz:function(){return m},c2:function(){return d}});const l="ContentManager/ListView/GET_DATA",f="ContentManager/ListView/GET_DATA_SUCCEEDED",d="ContentManager/ListView/RESET_PROPS",g="ContentManager/ListView/ON_CHANGE_LIST_HEADERS ",E="ContentManager/ListView/ON_RESET_LIST_HEADERS ",m="ContentManager/ListView/SET_LIST_LAYOUT "},14090:function(_,b,i){"use strict";i.d(b,{E:function(){return E}});var l=i(97889),f=i(33795),d=i.n(f),g=i(93088);const E={data:[],isLoading:!0,contentType:{},components:[],initialDisplayedHeaders:[],displayedHeaders:[],pagination:{total:0}},m=(C=E,x)=>(0,l.ZP)(C,P=>{switch(x.type){case g.ZA:return{...E,contentType:C.contentType,components:C.components,initialDisplayedHeaders:C.initialDisplayedHeaders,displayedHeaders:C.displayedHeaders};case g.Id:{P.pagination=x.pagination,P.data=x.data,P.isLoading=!1;break}case g.Rp:{const{target:{name:T,value:O}}=x;if(O)P.displayedHeaders=C.displayedHeaders.filter(w=>w.name!==T);else{const{metadatas:w,attributes:R,uid:F}=C.contentType,V=w[T].list,L={name:T,fieldSchema:R[T],metadatas:V,key:`__${T}_key__`};switch(R[T].type){case"component":{const $=R[T].component,U=d()(C,["components",$,"settings","mainField"],null),N=d()(C,["components",$,"attributes",U]);P.displayedHeaders.push({...L,metadatas:{...V,mainField:{...N,name:U}}});break}case"relation":P.displayedHeaders.push({...L,queryInfos:{defaultParams:{},endPoint:`collection-types/${F}`}});break;default:P.displayedHeaders.push(L)}}break}case g.MP:{P.displayedHeaders=C.initialDisplayedHeaders;break}case g.c2:return E;case g.Zz:{const{contentType:T,components:O,displayedHeaders:w}=x;P.contentType=T,P.components=O,P.displayedHeaders=w,P.initialDisplayedHeaders=w;break}default:return P}});b.Z=m},46491:function(_,b,i){"use strict";i.d(b,{Id:function(){return f},TP:function(){return d},ZA:function(){return l},c2:function(){return g},d0:function(){return m},t9:function(){return C},tE:function(){return x},w7:function(){return E}});const l="ContentManager/CrudReducer/GET_DATA",f="ContentManager/CrudReducer/GET_DATA_SUCCEEDED",d="ContentManager/CrudReducer/INIT_FORM",g="ContentManager/CrudReducer/RESET_PROPS",E="ContentManager/CrudReducer/SET_DATA_STRUCTURES",m="ContentManager/CrudReducer/SET_STATUS",C="ContentManager/CrudReducer/SUBMIT_SUCCEEDED",x="ContentManager/CrudReducer/CLEAR_SET_MODIFIED_DATA_ONLY"},4214:function(_,b,i){"use strict";i.d(b,{q:function(){return d}});var l=i(97889),f=i(46491);const d={componentsDataStructure:{},contentTypeDataStructure:{},isLoading:!0,data:null,status:"resolved",setModifiedDataOnly:!1},g=(E=d,m)=>(0,l.ZP)(E,C=>{switch(m.type){case f.ZA:{C.isLoading=!0,C.data=null;break}case f.Id:{C.isLoading=!1,C.data=m.data,C.setModifiedDataOnly=m.setModifiedDataOnly??!1;break}case f.TP:{if(m.data){C.isLoading=!1,C.data=m.data;break}C.isLoading=!1,C.data=E.contentTypeDataStructure;break}case f.c2:return d;case f.w7:{C.componentsDataStructure=m.componentsDataStructure,C.contentTypeDataStructure=m.contentTypeDataStructure;break}case f.d0:{C.status=m.status;break}case f.t9:{C.data=m.data;break}case f.tE:{C.setModifiedDataOnly=!1;break}default:return C}});b.Z=g},59883:function(_,b,i){"use strict";i.d(b,{z8:function(){return g},Iv:function(){return O},lt:function(){return R},Sy:function(){return V},qr:function(){return $},rh:function(){return P}});var l=i(56784),f=i.n(l);class d{constructor(){this.components={}}add(N){const{name:k,Component:j}=N;f()(j,"A Component must be provided"),f()(k,"A name must be provided"),f()(this.components[k]===void 0,"A similar field already exists"),this.components[k]=j}}var g=()=>new d;const E=["biginteger","boolean","date","datetime","decimal","email","enumeration","float","integer","json","password","richtext","string","text","time","uid"],m=["min","minLength","max","maxLength","required","regex","enum","unique","private","default"],C=(U,N)=>N.items?N.items.reduce(C,U):(N.name?U.push({isValidOptionPath:m.includes(N.name)||N.name.startsWith("options"),errorMessage:`'${N.name}' must be prefixed with 'options.'`}):U.push({isValidOptionPath:!1,errorMessage:"The 'name' property is required on an options object"}),U);class x{constructor(){this.customFields={}}register(N){if(Array.isArray(N))N.forEach(k=>{this.register(k)});else{const{name:k,pluginId:j,type:z,intlLabel:K,intlDescription:G,components:Y,options:ae}=N;f()(k,"A name must be provided"),f()(z,"A type must be provided"),f()(K,"An intlLabel must be provided"),f()(G,"An intlDescription must be provided"),f()(Y,"A components object must be provided"),f()(Y.Input,"An Input component must be provided"),f()(E.includes(z),`Custom field type: '${z}' is not a valid Strapi type or it can't be used with a Custom Field`);const Ce=/^(?![0-9])[a-zA-Z0-9$_-]+$/g;f()(Ce.test(k),`Custom field name: '${k}' is not a valid object key`);const J=[...ae?.base||[],...ae?.advanced||[]];J.length&&J.reduce(C,[]).forEach(({isValidOptionPath:q,errorMessage:ee})=>{f()(q,ee)});const le=j?`plugin::${j}.${k}`:`global::${k}`,be=Object.prototype.hasOwnProperty.call(this.customFields,le);f()(!be,`Custom field: '${le}' has already been registered`),this.customFields[le]=N}}getAll(){return this.customFields}get(N){return this.customFields[N]}}var P=new x;class T{constructor(){this.fields={}}add(N){const{type:k,Component:j}=N;f()(j,"A Component must be provided"),f()(k,"A type must be provided"),this.fields[k]=j}}var O=()=>new T;class w{constructor(){this.middlewares=[]}add(N){this.middlewares.push(N)}}var R=()=>new w;class F{constructor(N){this.apis=N.apis||{},this.initializer=N.initializer||null,this.injectionZones=N.injectionZones||{},this.isReady=N.isReady!==void 0?N.isReady:!0,this.name=N.name,this.pluginId=N.id}getInjectedComponents(N,k){try{return this.injectionZones[N][k]||{}}catch(j){return console.error("Cannot get injected component",j),j}}injectComponent(N,k,j){try{this.injectionZones[N][k].push(j)}catch(z){console.error("Cannot inject component",z)}}}var V=U=>new F(U);class L{constructor({appReducers:N}){this.reducers={...N}}add(N,k){this.reducers[N]=k}}var $=({appReducers:U})=>new L({appReducers:U})},35117:function(_,b,i){"use strict";var l=i(30126),f=i(44645),E={config:{locales:["fr"]},bootstrap:()=>{}},m=i(59883),C=i(35631),x=i.n(C),P=i(77131),T=i.n(P),O=i(98374),w=i.n(O),R=i(61215),F=i.n(R),V=i(35901),L=i.n(V),U={"content-type-builder":x(),email:T(),upload:w(),i18n:F(),"users-permissions":L()},N=i(97889),k=i(82702);const j={allPermissions:null,collectionTypesRelatedPermissions:{}};var K=(ut=j,ht)=>(0,N.ZP)(ut,Ot=>{switch(ht.type){case k.m:{Ot.allPermissions=ht.permissions,Ot.collectionTypesRelatedPermissions=ht.permissions.filter(Ue=>Ue.subject).reduce((Ue,at)=>{const{subject:Pt,action:lt}=at;return Ue[Pt]||(Ue[Pt]={}),Ue[Pt]=Ue[Pt][lt]?{...Ue[Pt],[lt]:[...Ue[Pt][lt],at]}:{...Ue[Pt],[lt]:[at]},Ue},{});break}case k.l:return j;default:return ut}}),G=i(85149);const Y={permissions:null};var Ce=(ut=Y,ht)=>(0,N.ZP)(ut,Ot=>{switch(ht.type){case G.m:{Ot.permissions=Object.entries(ht.permissions).reduce((Ue,at)=>[...Ue,...at[1]],[]);break}case G.Q:{Ot.permissions=null;break}default:return Ot}}),J=i(60371),le=i(40582);const be={currentLayout:null};var q=(ut=be,ht)=>(0,N.ZP)(ut,Ot=>{switch(ht.type){case le.c:{Ot.currentLayout=null;break}case le.O:{Ot.currentLayout=ht.layout;break}default:return Ot}}),ee=i(14090),Se=i(4214),tt=i(69891);const Ae={"content-manager_app":J.Z,"content-manager_listView":ee.Z,"content-manager_rbacManager":Ce,"content-manager_editViewLayoutManager":q,"content-manager_editViewCrudReducer":Se.Z};var Pe={admin_app:tt.Z,rbacProvider:K,...Ae};window.strapi={backendURL:"http://localhost:1337",isEE:!1,telemetryDisabled:!1,features:{SSO:"sso",AUDIT_LOGS:"audit-logs",REVIEW_WORKFLOWS:"review-workflows"},projectType:"Community"};const ye=E,Ee={components:(0,m.z8)(),fields:(0,m.Iv)()},_e=(0,m.lt)(),We=(0,m.qr)({appReducers:Pe}),Ie=document.getElementById("app");(async()=>{const{get:ut}=(0,l.tg)();try{const{data:{data:{isEE:at,features:Pt}}}=await ut("/admin/project-type");window.strapi.isEE=at,window.strapi.features={...window.strapi.features,isEnabled:lt=>Pt.some(kt=>kt.name===lt)},window.strapi.projectType=at?"Enterprise":"Community"}catch(at){console.error(at)}const Ot=(await Promise.all([i.e(6715),i.e(6812),i.e(5538)]).then(i.bind(i,58917))).default({appPlugins:U,library:Ee,adminConfig:ye,bootstrap:ye,middlewares:_e,reducers:We});await Ot.bootstrapAdmin(),await Ot.initialize(),await Ot.bootstrap(),await Ot.loadTrads(),(0,f.s)(Ie).render(Ot.render())})()},4556:function(_,b,i){"use strict";i.d(b,{XS:function(){return f},eb:function(){return l},y3:function(){return d}});const l="StrapiAdmin/APP/SET_APP_RUNTIME_STATUS",f="StrapiAdmin/App/SET_ADMIN_PERMISSIONS",d=[]},69891:function(_,b,i){"use strict";i.d(b,{E:function(){return d}});var l=i(97889),f=i(4556);const d={permissions:{},status:"init"},g=(E=d,m)=>(0,l.ZP)(E,C=>{switch(m.type){case f.eb:{C.status="runtime";break}case f.XS:{C.permissions=m.payload;break}default:return C}});b.Z=g},98954:function(_,b,i){"use strict";i.d(b,{Ap:function(){return C},Id:function(){return T},Ir:function(){return f},JO:function(){return x},Ly:function(){return P},NG:function(){return R},Sh:function(){return E},Uu:function(){return d},VR:function(){return m},Zl:function(){return O},ai:function(){return F},bi:function(){return L},gz:function(){return l},lw:function(){return w},o_:function(){return g},xx:function(){return V}});const l="ContentTypeBuilder/DataManagerProvider/ADD_ATTRIBUTE",f="ContentTypeBuilder/DataManagerProvider/ADD_CUSTOM_FIELD_ATTRIBUTE",d="ContentTypeBuilder/DataManagerProvider/ADD_CREATED_COMPONENT_TO_DYNAMIC_ZONE",g="ContentTypeBuilder/DataManagerProvider/CHANGE_DYNAMIC_ZONE_COMPONENTS",E="ContentTypeBuilder/DataManagerProvider/CREATE_SCHEMA",m="ContentTypeBuilder/DataManagerProvider/CREATE_COMPONENT_SCHEMA",C="ContentTypeBuilder/DataManagerProvider/DELETE_NOT_SAVED_TYPE",x="ContentTypeBuilder/DataManagerProvider/EDIT_ATTRIBUTE",P="ContentTypeBuilder/DataManagerProvider/EDIT_CUSTOM_FIELD_ATTRIBUTE",T="ContentTypeBuilder/DataManagerProvider/GET_DATA_SUCCEEDED",O="ContentTypeBuilder/DataManagerProvider/RELOAD_PLUGIN",w="ContentTypeBuilder/DataManagerProvider/REMOVE_FIELD_FROM_DISPLAYED_COMPONENT",R="ContentTypeBuilder/DataManagerProvider/REMOVE_COMPONENT_FROM_DYNAMIC_ZONE",F="ContentTypeBuilder/DataManagerProvider/REMOVE_FIELD",V="ContentTypeBuilder/DataManagerProvider/SET_MODIFIED_DATA",L="ContentTypeBuilder/DataManagerProvider/UPDATE_SCHEMA"},41486:function(_,b,i){"use strict";i.d(b,{E:function(){return T}});var l=i(97889),f=i(33795),d=i.n(f),g=i(3040),E=i.n(g),m=i(11165),C=i(19323),x=i(98954),P=i(61730);const T={components:{},contentTypes:{},initialComponents:{},initialContentTypes:{},initialData:{},modifiedData:{},reservedNames:{},isLoading:!0,isLoadingForDataToBeSet:!0},O=["oneWay","manyWay"],w=V=>V==="manyToOne"?"oneToMany":V==="oneToMany"?"manyToOne":V,R=(V,L)=>V.schema.attributes.findIndex(({name:$})=>$===L),F=(V=T,L)=>(0,l.ZP)(V,$=>{switch(L.type){case x.gz:{const{attributeToSet:{name:U,...N},forTarget:k,targetUid:j}=L;delete N.createComponent;const z=["component","contentType"].includes(k)?[k]:[k,j],G=[...d()(V,["modifiedData",...z,"schema","attributes"],[]).slice(),{...N,name:U}];if(E()($,["modifiedData",...z,"schema","attributes"],G),L.shouldAddComponentToData){const ae=N.component,Ce=V.components[ae],J=Ce.isTemporary,le=V.modifiedData.components[ae]!==void 0;if(J||le)break;$.modifiedData.components[ae]=Ce,(0,P.Z)(Ce.schema.attributes,V.components).filter(q=>d()(V,["modifiedData","components",q])===void 0).forEach(q=>{const ee=d()(V,["components",q],{});ee.isTemporary||!1||($.modifiedData.components[q]=ee)});break}if(N.type==="relation"){const ae=N.target,Ce=N.targetAttribute||null,J=N.relation,le=(0,m.Z)(J,Ce),be=d()(V,["modifiedData",...z,"uid"]);if(N.type==="relation"&&le!=="oneWay"&&le!=="manyWay"&&ae===be){const te={name:Ce,relation:w(le),target:ae,targetAttribute:U,type:"relation"};N.private&&(te.private=N.private);const q=[...G,te];E()($,["modifiedData",...z,"schema","attributes"],q)}}break}case x.Uu:{const{dynamicZoneTarget:U,componentsToAdd:N}=L,k=R(V.modifiedData.contentType,U);N.forEach(j=>{$.modifiedData.contentType.schema.attributes[k].components.push(j)});break}case x.Ir:{const{attributeToSet:{name:U,...N},forTarget:k,targetUid:j}=L,z=["component","contentType"].includes(k)?[k]:[k,j],G=[...d()(V,["modifiedData",...z,"schema","attributes"],[]).slice(),{...N,name:U}];E()($,["modifiedData",...z,"schema","attributes"],G);break}case x.o_:{const{dynamicZoneTarget:U,newComponents:N}=L,k=R(V.modifiedData.contentType,U),j=V.modifiedData.contentType.schema.attributes[k].components,z=(0,C.Z)([...j,...N]);$.modifiedData.contentType.schema.attributes[k].components=z,(0,P.Z)((0,l.Vk)($.modifiedData.contentType.schema.attributes),V.components).filter(Y=>d()(V,["modifiedData","components",Y])===void 0).forEach(Y=>{const ae=d()(V,["components",Y],{});ae.isTemporary||!1||($.modifiedData.components[Y]=ae)});break}case x.VR:{const U={uid:L.uid,isTemporary:!0,category:L.componentCategory,schema:{...L.data,attributes:[]}};$.components[L.uid]=U,L.shouldAddComponentToData&&($.modifiedData.components[L.uid]=U);break}case x.Sh:{const U={uid:L.uid,isTemporary:!0,schema:{...L.data,attributes:[]}};$.contentTypes[L.uid]=U;break}case x.JO:{const{attributeToSet:{name:U,...N},forTarget:k,targetUid:j,initialAttribute:z}=L,K=z.name,G=["component","contentType"].includes(k)?[k]:[k,j],Y=R(d()(V,["modifiedData",...G]),K),ae=N.type==="relation";if(!ae){E()($,["modifiedData",...G,"schema","attributes",Y],L.attributeToSet);break}const Ce=d()(V,["modifiedData",...G,"schema","attributes"]).slice(),J={name:U,relation:N.relation,target:N.target,targetAttribute:N.targetAttribute,type:"relation"};N.private&&(J.private=N.private),N.pluginOptions&&(J.pluginOptions=N.pluginOptions);const le=Ce.findIndex(({name:ht})=>ht===z.name);le!==-1&&Ce.splice(le,1,J);let be=null,te=null,q=null,ee=null;const Se=d()(V,["modifiedData",...G,"uid"]),tt=z.target!==N.target,Ae=N.target===Se,pe=(0,m.Z)(N.relation,N.targetAttribute),Pe=(0,m.Z)(z.relation,z.targetAttribute),ye=z.target===Se,Ee=Pe!==pe,_e=tt&&!Ae&&ye&&ae,We=Ee&&ye&&["oneWay","manyWay"].includes(pe)&&ae,Ie=!O.includes(Pe)&&!O.includes(pe)&&ye&&Ae&&ae,Fe=O.includes(Pe)&&!O.includes(pe)&&ye&&Ae&&ae,ut=tt&&Ae&&!O.includes(pe);if((_e||We)&&(be=z.targetAttribute),be){const ht=Ce.findIndex(({name:Ot})=>Ot===be);Ce.splice(ht,1)}if(!_e){const ht=d()(V,["initialContentTypes",z.target]);if(ht){const Ot=R(ht,z.targetAttribute);ee=d()(V,["initialContentTypes",z.target,"schema","attributes",Ot])}}if(Fe||ut){q={name:N.targetAttribute,relation:w(pe),target:N.target,targetAttribute:U,type:"relation"},N.private&&(q.private=N.private),ee&&ee.pluginOptions&&(q.pluginOptions=ee.pluginOptions);const ht=Ce.findIndex(({name:at})=>at===z.name),Ot=Ce.findIndex(({name:at})=>U===at),Ue=(ht===-1?Ot:ht)+1;Ce.splice(Ue,0,q)}if(Ie&&(te=z.targetAttribute,q={name:N.targetAttribute,relation:w(pe),target:N.target,targetAttribute:U,type:"relation"},N.private&&(q.private=N.private),ee&&ee.pluginOptions&&(q.pluginOptions=ee.pluginOptions),te)){const ht=Ce.findIndex(({name:Ot})=>Ot===te);Ce.splice(ht,1,q)}E()($,["modifiedData",...G,"schema","attributes"],Ce);break}case x.Ly:{const{forTarget:U,targetUid:N,initialAttribute:k,attributeToSet:j}=L,z=k.name,K=["component","contentType"].includes(U)?[U]:[U,N],G=R(d()(V,["modifiedData",...K]),z);E()($,["modifiedData",...K,"schema","attributes",G],j);break}case x.Id:{$.components=L.components,$.initialComponents=L.components,$.initialContentTypes=L.contentTypes,$.contentTypes=L.contentTypes,$.reservedNames=L.reservedNames,$.isLoading=!1;break}case x.Ap:{$.contentTypes=V.initialContentTypes,$.components=V.initialComponents;break}case x.Zl:return T;case x.NG:{const U=R(V.modifiedData.contentType,L.dzName);$.modifiedData.contentType.schema.attributes[U].components.splice(L.componentToRemoveIndex,1);break}case x.ai:{const{mainDataKey:U,attributeToRemoveName:N}=L,k=["modifiedData",U,"schema","attributes"],j=R(V.modifiedData[U],N),z=[...k,j],K=d()(V,z);if(K.type==="relation"&&U==="contentType"){const{target:Ce,relation:J,targetAttribute:le}=K,be=(0,m.Z)(J,le),te=V.modifiedData.contentType.uid;if(Ce===te&&!O.includes(be)){const Se=V.modifiedData[U].schema.attributes.slice().filter(tt=>!(tt.name===N||tt.target===te&&tt.targetAttribute===N));$.modifiedData[U].schema.attributes=Se;break}}V.modifiedData[U].schema.attributes.slice().reduce((Ce,J)=>(J.type!=="uid"||J.targetField!==N||Ce.push(J.name),Ce),[]).forEach(Ce=>{const J=R(V.modifiedData[U],Ce);delete $.modifiedData[U].schema.attributes[J].targetField}),$.modifiedData[U].schema.attributes.splice(j,1);break}case x.lw:{const{attributeToRemoveName:U,componentUid:N}=L,k=R(V.modifiedData.components[N],U);$.modifiedData.components[N].schema.attributes.splice(k,1);break}case x.xx:{$.isLoadingForDataToBeSet=!1,$.initialData=L.schemaToSet,$.modifiedData=L.schemaToSet,L.hasJustCreatedSchema||($.components=V.initialComponents,$.contentTypes=V.initialContentTypes);break}case x.bi:{const{data:{displayName:U,category:N,icon:k,kind:j},schemaType:z,uid:K}=L;if($.modifiedData[z].schema.displayName=U,L.schemaType==="component"){$.modifiedData.component.category=N,$.modifiedData.component.schema.icon=k;const G=(0,l.Vk)($.modifiedData.component);$.components[K]=G;break}$.modifiedData.contentType.schema.kind=j;break}default:return $}});b.Z=F},61730:function(_,b,i){"use strict";var l=i(33795),f=i.n(l),d=i(19323);const g=(E,m)=>{const C=E.reduce((x,P)=>{const T=P.type;if(T==="component"){const O=P.component;x.push(O);const w=f()(m,[O,"schema","attributes"],[]);x.push(...g(w,m))}if(T==="dynamiczone"){const O=P.components,w=O.reduce((R,F)=>{const V=f()(m,[F,"schema","attributes"],[]);return[...R,...g(V,m)]},[]);return[...x,...O,...w]}return x},[]);return(0,d.Z)(C)};b.Z=g},52486:function(_,b,i){"use strict";i.d(b,{Ey:function(){return w},I:function(){return C},OY:function(){return T},P0:function(){return l},QQ:function(){return d},S0:function(){return P},VZ:function(){return O},_H:function(){return x},aG:function(){return f},c2:function(){return g},oF:function(){return m},yC:function(){return E}});const l="ContentTypeBuilder/FormModal/ON_CHANGE",f="ContentTypeBuilder/FormModal/ON_CHANGE_RELATION_TARGET",d="ContentTypeBuilder/FormModal/ON_CHANGE_RELATION_TYPE",g="ContentTypeBuilder/FormModal/RESET_PROPS",E="ContentTypeBuilder/FormModal/RESET_PROPS_AND_SET_FORM_FOR_ADDING_AN_EXISTING_COMPO",m="ContentTypeBuilder/FormModal/RESET_PROPS_AND_SAVE_CURRENT_DATA",C="ContentTypeBuilder/FormModal/RESET_PROPS_AND_SET_THE_FORM_FOR_ADDING_A_COMPO_TO_A_DZ",x="ContentTypeBuilder/FormModal/SET_DATA_TO_EDIT",P="ContentTypeBuilder/FormModal/SET_ATTRIBUTE_DATA_SCHEMA",T="ContentTypeBuilder/FormModal/SET_CUSTOM_FIELD_DATA_SCHEMA",O="ContentTypeBuilder/FormModal/SET_DYNAMIC_ZONE_DATA_SCHEMA",w="ContentTypeBuilder/FormModal/SET_ERRORS"},61738:function(_,b,i){"use strict";i.d(b,{Z:function(){return $},E:function(){return V}});var l=i(97889),f=i(3040),d=i.n(f),g=i(54002),E=i.n(g),m=i(24443),C=i.n(m),x=i(11165),P=i(43658),T=i(52486),O=i(72666);const w=(U,N)=>{if(N.items)return N.items.reduce(w,U);if("defaultValue"in N){const{name:k,defaultValue:j}=N;U.push({name:k,defaultValue:j})}return U},R=U=>["manyToMany","oneToMany","manyWay"].includes(U)?2:1,F=U=>["manyToMany","manyToOne"].includes(U)?2:1,V={formErrors:{},modifiedData:{},initialData:{},componentToCreate:{},isCreatingComponentWhileAddingAField:!1};var $=(U=V,N)=>(0,l.ZP)(U,k=>{switch(N.type){case T.P0:{const{keys:j,value:z}=N,K=U.modifiedData;if(Boolean(K.default)&&j.length===1&&j.includes("type")){const Y=K.type;Y&&["date","datetime","time"].includes(Y)&&delete k.modifiedData.default}d()(k,["modifiedData",...j],z);break}case T.aG:{const{target:{oneThatIsCreatingARelationWithAnother:j,selectedContentTypeFriendlyName:z,targetContentTypeAllowedRelations:K,value:G}}=N;let Y=!1,ae=null;d()(k,["modifiedData","target"],G);const Ce=U.modifiedData;if(Array.isArray(K)){const te=(0,x.Z)(Ce.relation,Ce.targetAttribute);if(!K.includes(te)){const q=K[0];Y=!0,ae=q,q==="oneWay"?d()(k,["modifiedData","relation"],"oneToOne"):q==="manyWay"?d()(k,["modifiedData","relation"],"oneToMany"):d()(k,["modifiedData","relation"],q)}}let J;if(Y?J=C()(E()((0,P.Z)(z)),R(ae)):J=C()(E()((0,P.Z)(z)),R(Ce.relation)),d()(k,["modifiedData","name"],J),U.modifiedData.targetAttribute===null)break;if(Y&&["oneWay","manyWay"].includes(ae)){d()(k,["modifiedData","targetAttribute"],null);break}const be=C()(E()((0,P.Z)(j)),F(Ce.relation));d()(k,["modifiedData","targetAttribute"],be);break}case T.QQ:{const{target:{oneThatIsCreatingARelationWithAnother:j,value:z}}=N,K=U.modifiedData.name;if(!["oneWay","manyWay"].includes(z)){d()(k,["modifiedData","relation"],z);const G=U.modifiedData.targetAttribute;d()(k,["modifiedData","name"],C()(E()((0,P.Z)(K)),R(z))),d()(k,["modifiedData","targetAttribute"],C()(G||E()((0,P.Z)(j)),F(z)));break}if(z==="oneWay"){d()(k,["modifiedData","relation"],"oneToOne"),d()(k,["modifiedData","targetAttribute"],null),d()(k,["modifiedData","name"],C()(E()(K),1));break}d()(k,["modifiedData","relation"],"oneToMany"),d()(k,["modifiedData","targetAttribute"],null),d()(k,["modifiedData","name"],C()(E()(K),2));break}case T.c2:return V;case T.yC:return{...V,modifiedData:{type:"component",repeatable:!0,...N.options}};case T.oF:{const j=U.modifiedData.componentToCreate,z={displayName:j.displayName,type:"component",repeatable:!1,...N.options,component:(0,O.N)(j.displayName,j.category)};return{...V,componentToCreate:j,modifiedData:z,isCreatingComponentWhileAddingAField:U.modifiedData.createComponent}}case T.I:{const z={...U.modifiedData,createComponent:!0,componentToCreate:{type:"component"}};return{...V,modifiedData:z}}case T._H:{k.modifiedData=N.data,k.initialData=N.data;break}case T.S0:{const{attributeType:j,isEditing:z,modifiedDataToSetForEditing:K,nameToSetForRelation:G,targetUid:Y,step:ae,options:Ce={}}=N;if(z){k.modifiedData=K,k.initialData=K;break}let J;j==="component"?ae==="1"?J={type:"component",createComponent:!0,componentToCreate:{type:"component"}}:J={...Ce,type:"component",repeatable:!0}:j==="dynamiczone"?J={...Ce,type:"dynamiczone",components:[]}:j==="text"?J={...Ce,type:"string"}:j==="number"||j==="date"?J=Ce:j==="media"?J={allowedTypes:["images","files","videos","audios"],type:"media",multiple:!0,...Ce}:j==="enumeration"?J={...Ce,type:"enumeration",enum:[]}:j==="relation"?J={name:E()(G),relation:"oneToOne",targetAttribute:null,target:Y,type:"relation"}:J={...Ce,type:j,default:null},k.modifiedData=J;break}case T.OY:{const{customField:j,isEditing:z,modifiedDataToSetForEditing:K,options:G={}}=N;if(z){k.modifiedData=K,k.initialData=K;break}k.modifiedData={...G,type:j.type};const ae=[...j?.options?.base||[],...j?.options?.advanced||[]].reduce(w,[]);ae.length&&ae.forEach(({name:Ce,defaultValue:J})=>d()(k.modifiedData,Ce,J));break}case T.VZ:{k.modifiedData=N.attributeToEdit,k.initialData=N.attributeToEdit;break}case T.Ey:{k.formErrors=N.errors;break}default:return k}})},72666:function(_,b,i){"use strict";i.d(b,{E:function(){return f},N:function(){return d}});var l=i(43658);const f=g=>{const E=(0,l.Z)(g);return`api::${E}.${E}`},d=(g,E)=>`${(0,l.Z)(E)}.${(0,l.Z)(g)}`},63338:function(_,b,i){"use strict";i.d(b,{_:function(){return l}});const l={main:[{action:"plugin::content-type-builder.read",subject:null}]}},81611:function(_,b,i){"use strict";i.d(b,{default:function(){return j}});var l=i(30126),f=i(97314),d=i(32735),g=i(42498),m=()=>d.createElement(g.Z,null),C=i(63338),x=i(53728),P=i(41486),T=i(61738),w={[`${x.Z}_formModal`]:T.Z,[`${x.Z}_dataManagerProvider`]:P.Z},R=i(99381),F=i.n(R),V=i(33795),L=i.n(V),$=i(24346),N={components:{inputs:{},add({id:z,component:K}){this.inputs[z]||(this.inputs[z]=K)}},types:{attribute:{},contentType:{validators:[],form:{advanced:[],base:[]}},component:{validators:[],form:{advanced:[],base:[]}}},contentTypeSchemaMutations:[],addContentTypeSchemaMutation(z){this.contentTypeSchemaMutations.push(z)},extendContentType({validator:z,form:{advanced:K,base:G}}){const{contentType:Y}=this.types;Y.validators.push(z),Y.form.advanced.push(K),Y.form.base.push(G)},extendFields(z,{validator:K,form:{advanced:G,base:Y}}){const ae=this.types.attribute;z.forEach(Ce=>{ae[Ce]||(ae[Ce]={validators:[],form:{advanced:[],base:[]}}),ae[Ce].validators.push(K),ae[Ce].form.advanced.push(G),ae[Ce].form.base.push(Y)})},getAdvancedForm(z,K=null){return L()(this.types,[...z,"form","advanced"],[]).reduce((Y,ae)=>{const Ce=ae(K);return[...Y,...Ce]},[])},makeCustomFieldValidator(z,K,...G){return K?z.shape({options:$.Ry().shape(K(G))}):z},makeValidator(z,K,...G){const ae=L()(this.types,[...z,"validators"],[]).reduce((Ce,J)=>{const le=J(G);return{...Ce,...le}},{});return K.shape({pluginOptions:$.Ry().shape(ae)})},mutateContentTypeSchema(z,K){let G=F()(z);const Y=F()(K);return this.contentTypeSchemaMutations.forEach(ae=>{G=ae(G,Y)}),G}};const k=f.s1.u2;var j={register(z){z.addReducers(w),z.addMenuLink({to:`/plugins/${x.Z}`,icon:m,intlLabel:{id:`${x.Z}.plugin.name`,defaultMessage:"Content Types Builder"},permissions:C._.main,async Component(){return await Promise.all([i.e(3021),i.e(6715),i.e(8880)]).then(i.bind(i,27214))}}),z.registerPlugin({id:x.Z,name:k,apis:{forms:N}})},bootstrap(){},async registerTrads({locales:z}){const K=await Promise.all(z.map(G=>i(31866)(`./${G}.json`).then(({default:Y})=>({data:(0,l.jV)(Y,x.Z),locale:G})).catch(()=>({data:{},locale:G}))));return Promise.resolve(K)}}},53728:function(_,b,i){"use strict";var l=i(97314);const f=l.u2.replace(/^@strapi\/plugin-/i,"");b.Z=f},11165:function(_,b){"use strict";const i=(l,f)=>{const d=f==null;return l==="oneToOne"&&d?"oneWay":l==="oneToMany"&&d?"manyWay":l};b.Z=i},19323:function(_,b){"use strict";const i=l=>[...new Set(l)];b.Z=i},43658:function(_,b,i){"use strict";var l=i(40791),f=i.n(l);const d=g=>f()(g,{separator:"-"});b.Z=d},35631:function(_,b,i){"use strict";_.exports=i(81611).default},7597:function(_,b,i){"use strict";i.d(b,{_:function(){return l}});const l={settings:[{action:"plugin::email.settings.read",subject:null}]}},84004:function(_,b,i){"use strict";var l=i(30126),f=i(7597);b.default={register(d){d.createSettingSection({id:"email",intlLabel:{id:"email.SettingsNav.section-label",defaultMessage:"Email Plugin"}},[{intlLabel:{id:"email.Settings.email.plugin.title",defaultMessage:"Settings"},id:"settings",to:"/settings/email",async Component(){return await i.e(1495).then(i.bind(i,34570))},permissions:f._.settings}]),d.registerPlugin({id:"email",name:"email"})},bootstrap(){},async registerTrads({locales:d}){const g=await Promise.all(d.map(E=>i(38182)(`./${E}.json`).then(({default:m})=>({data:(0,l.jV)(m,"email"),locale:E})).catch(()=>({data:{},locale:E}))));return Promise.resolve(g)}}},77131:function(_,b,i){"use strict";_.exports=i(84004).default},30126:function(_,b,i){"use strict";i.d(b,{Hn:function(){return wf},iq:function(){return Uf},m$:function(){return Fu},O4:function(){return nd},jW:function(){return Gc},QH:function(){return nu},Y_:function(){return ce},W1:function(){return et},MG:function(){return mn},tM:function(){return nr},c4:function(){return dr},x7:function(){return ri},W$:function(){return Ki},J5:function(){return $i},l0:function(){return Lo},jm:function(){return xo},Zc:function(){return ns},rt:function(){return ws},rU:function(){return is},Qj:function(){return Ia},dO:function(){return bu},dJ:function(){return Qo},ZF:function(){return Df},X0:function(){return bc},N$:function(){return Xs},w7:function(){return qs},v4:function(){return Bu},tU:function(){return Pf},oL:function(){return Af},JV:function(){return Ll},ij:function(){return zf},fG:function(){return ku},m:function(){return xu},SL:function(){return Rf},fz:function(){return Uu},qb:function(){return Za},_Y:function(){return $o},iA:function(){return Bs},L8:function(){return zs},I8:function(){return Ga},w6:function(){return Wu},e5:function(){return Vs},ZT:function(){return Qc},dU:function(){return zu},nn:function(){return Vu},tg:function(){return Vf},mD:function(){return gl},k2:function(){return Ma},UN:function(){return Hu},CJ:function(){return sr},qX:function(){return pi},OT:function(){return Mi},X7:function(){return Gi},CR:function(){return ao},jV:function(){return Io},Q1:function(){return os},UW:function(){return Cc},I0:function(){return Xc},So:function(){return va},L7:function(){return Hl},Vu:function(){return ol},Wq:function(){return hd},W6:function(){return Zu},VP:function(){return If},Xe:function(){return rd},mZ:function(){return Ku},kY:function(){return pd},L0:function(){return Hf},E2:function(){return Mc},go:function(){return id},c1:function(){return Sc},yX:function(){return od},F5:function(){return md},lm:function(){return Zf},o1:function(){return Kf},Yw:function(){return kd},aM:function(){return Od},Kx:function(){return Td},ss:function(){return wd},vn:function(){return Mu},Uq:function(){return qc},j1:function(){return Oc},Sh:function(){return sl},rS:function(){return Rs}});var l=i(33795),f=i.n(l),d=i(32735),g=i(74512),E=i(96377),m=i(42567),C=i(17626),x=i(98610),P=i(8471);const T=Z=>{switch(Z){case"danger":return"danger100";case"success":return"success100";case"warning":return"warning100";default:return"primary100"}},O=Z=>T(Z).replace("100","200"),w=({theme:Z,variant:me})=>me==="danger"?Z.colors.danger700:me==="success"?Z.colors.success700:me==="warning"?Z.colors.warning700:Z.colors.primary700;var R=i(59619),F=i(77981),V=i(84642),L=i(8365);const $=(0,P.ZP)(F.x)`
334
+ `,""]),b.Z=x},10361:function(_){"use strict";_.exports=function(b){var i=[];return i.toString=function(){return this.map(function(f){var d="",g=typeof f[5]<"u";return f[4]&&(d+="@supports (".concat(f[4],") {")),f[2]&&(d+="@media ".concat(f[2]," {")),g&&(d+="@layer".concat(f[5].length>0?" ".concat(f[5]):""," {")),d+=b(f),g&&(d+="}"),f[2]&&(d+="}"),f[4]&&(d+="}"),d}).join("")},i.i=function(f,d,g,E,m){typeof f=="string"&&(f=[[null,f,void 0]]);var C={};if(g)for(var x=0;x<this.length;x++){var P=this[x][0];P!=null&&(C[P]=!0)}for(var T=0;T<f.length;T++){var O=[].concat(f[T]);g&&C[O[0]]||(typeof m<"u"&&(typeof O[5]>"u"||(O[1]="@layer".concat(O[5].length>0?" ".concat(O[5]):""," {").concat(O[1],"}")),O[5]=m),d&&(O[2]&&(O[1]="@media ".concat(O[2]," {").concat(O[1],"}")),O[2]=d),E&&(O[4]?(O[1]="@supports (".concat(O[4],") {").concat(O[1],"}"),O[4]=E):O[4]="".concat(E)),i.push(O))}},i}},32626:function(_){"use strict";_.exports=function(b,i){return i||(i={}),b&&(b=String(b.__esModule?b.default:b),/^['"].*['"]$/.test(b)&&(b=b.slice(1,-1)),i.hash&&(b+=i.hash),/["'() \t\n]|(%20)/.test(b)||i.needQuotes?'"'.concat(b.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):b)}},96558:function(_){"use strict";_.exports=function(b){return b[1]}},24319:function(_,b,i){"use strict";i.d(b,{Z:function(){return l}});function l(f,d){for(var g=f<0?"-":"",E=Math.abs(f).toString();E.length<d;)E="0"+E;return g+E}},22774:function(_,b,i){"use strict";i.d(b,{Z:function(){return l}});function l(f){var d=new Date(Date.UTC(f.getFullYear(),f.getMonth(),f.getDate(),f.getHours(),f.getMinutes(),f.getSeconds(),f.getMilliseconds()));return d.setUTCFullYear(f.getFullYear()),f.getTime()-d.getTime()}},96256:function(_,b,i){"use strict";i.d(b,{Z:function(){return l}});function l(f,d){if(d.length<f)throw new TypeError(f+" argument"+(f>1?"s":"")+" required, but only "+d.length+" present")}},10420:function(_,b,i){"use strict";i.d(b,{Z:function(){return l}});function l(f){if(f===null||f===!0||f===!1)return NaN;var d=Number(f);return isNaN(d)?d:d<0?Math.ceil(d):Math.floor(d)}},85544:function(_,b,i){"use strict";i.d(b,{Z:function(){return g}});var l=i(10420),f=i(907),d=i(96256);function g(E,m){(0,d.Z)(2,arguments);var C=(0,f.Z)(E),x=(0,l.Z)(m);return isNaN(x)?new Date(NaN):(x&&C.setDate(C.getDate()+x),C)}},68710:function(_,b,i){"use strict";i.d(b,{vh:function(){return E},yJ:function(){return g}});var l=7,f=365.2425,d=Math.pow(10,8)*24*60*60*1e3,g=6e4,E=36e5,m=1e3,C=-d,x=60,P=3,T=12,O=4,w=3600,R=60,F=w*24,V=F*7,L=F*f,$=L/12,U=$*3},86357:function(_,b,i){"use strict";i.d(b,{Z:function(){return be}});var l=i(907),f=i(96256);function d(te,q){(0,f.Z)(2,arguments);var ee=(0,l.Z)(te),Se=(0,l.Z)(q),tt=ee.getTime()-Se.getTime();return tt<0?-1:tt>0?1:tt}var g=i(73151),E=i(85544),m=i(10420);function C(te,q){(0,f.Z)(2,arguments);var ee=(0,l.Z)(te),Se=(0,m.Z)(q);if(isNaN(Se))return new Date(NaN);if(!Se)return ee;var tt=ee.getDate(),Ae=new Date(ee.getTime());Ae.setMonth(ee.getMonth()+Se+1,0);var pe=Ae.getDate();return tt>=pe?Ae:(ee.setFullYear(Ae.getFullYear(),Ae.getMonth(),tt),ee)}function x(te,q){if((0,f.Z)(2,arguments),!q||(0,g.Z)(q)!=="object")return new Date(NaN);var ee=q.years?(0,m.Z)(q.years):0,Se=q.months?(0,m.Z)(q.months):0,tt=q.weeks?(0,m.Z)(q.weeks):0,Ae=q.days?(0,m.Z)(q.days):0,pe=q.hours?(0,m.Z)(q.hours):0,Pe=q.minutes?(0,m.Z)(q.minutes):0,ye=q.seconds?(0,m.Z)(q.seconds):0,Ee=(0,l.Z)(te),_e=Se||ee?C(Ee,Se+ee*12):Ee,We=Ae||tt?(0,E.Z)(_e,Ae+tt*7):_e,Ie=Pe+pe*60,Fe=ye+Ie*60,ut=Fe*1e3,ht=new Date(We.getTime()+ut);return ht}var P=i(22774);function T(te){(0,f.Z)(1,arguments);var q=(0,l.Z)(te);return q.setHours(0,0,0,0),q}var O=864e5;function w(te,q){(0,f.Z)(2,arguments);var ee=T(te),Se=T(q),tt=ee.getTime()-(0,P.Z)(ee),Ae=Se.getTime()-(0,P.Z)(Se);return Math.round((tt-Ae)/O)}function R(te,q){var ee=te.getFullYear()-q.getFullYear()||te.getMonth()-q.getMonth()||te.getDate()-q.getDate()||te.getHours()-q.getHours()||te.getMinutes()-q.getMinutes()||te.getSeconds()-q.getSeconds()||te.getMilliseconds()-q.getMilliseconds();return ee<0?-1:ee>0?1:ee}function F(te,q){(0,f.Z)(2,arguments);var ee=(0,l.Z)(te),Se=(0,l.Z)(q),tt=R(ee,Se),Ae=Math.abs(w(ee,Se));ee.setDate(ee.getDate()-tt*Ae);var pe=Number(R(ee,Se)===-tt),Pe=tt*(Ae-pe);return Pe===0?0:Pe}var V=i(68710);function L(te,q){return(0,f.Z)(2,arguments),(0,l.Z)(te).getTime()-(0,l.Z)(q).getTime()}var $={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(q){return q<0?Math.ceil(q):Math.floor(q)}},U="trunc";function N(te){return te?$[te]:$[U]}function k(te,q,ee){(0,f.Z)(2,arguments);var Se=L(te,q)/V.vh;return N(ee?.roundingMethod)(Se)}function j(te,q,ee){(0,f.Z)(2,arguments);var Se=L(te,q)/V.yJ;return N(ee?.roundingMethod)(Se)}function z(te,q){(0,f.Z)(2,arguments);var ee=(0,l.Z)(te),Se=(0,l.Z)(q),tt=ee.getFullYear()-Se.getFullYear(),Ae=ee.getMonth()-Se.getMonth();return tt*12+Ae}function K(te){(0,f.Z)(1,arguments);var q=(0,l.Z)(te);return q.setHours(23,59,59,999),q}function G(te){(0,f.Z)(1,arguments);var q=(0,l.Z)(te),ee=q.getMonth();return q.setFullYear(q.getFullYear(),ee+1,0),q.setHours(23,59,59,999),q}function Y(te){(0,f.Z)(1,arguments);var q=(0,l.Z)(te);return K(q).getTime()===G(q).getTime()}function ae(te,q){(0,f.Z)(2,arguments);var ee=(0,l.Z)(te),Se=(0,l.Z)(q),tt=d(ee,Se),Ae=Math.abs(z(ee,Se)),pe;if(Ae<1)pe=0;else{ee.getMonth()===1&&ee.getDate()>27&&ee.setDate(30),ee.setMonth(ee.getMonth()-tt*Ae);var Pe=d(ee,Se)===-tt;Y((0,l.Z)(te))&&Ae===1&&d(te,Se)===1&&(Pe=!1),pe=tt*(Ae-Number(Pe))}return pe===0?0:pe}function Ce(te,q,ee){(0,f.Z)(2,arguments);var Se=L(te,q)/1e3;return N(ee?.roundingMethod)(Se)}function J(te,q){(0,f.Z)(2,arguments);var ee=(0,l.Z)(te),Se=(0,l.Z)(q);return ee.getFullYear()-Se.getFullYear()}function le(te,q){(0,f.Z)(2,arguments);var ee=(0,l.Z)(te),Se=(0,l.Z)(q),tt=d(ee,Se),Ae=Math.abs(J(ee,Se));ee.setFullYear(1584),Se.setFullYear(1584);var pe=d(ee,Se)===-tt,Pe=tt*(Ae-Number(pe));return Pe===0?0:Pe}function be(te){(0,f.Z)(1,arguments);var q=(0,l.Z)(te.start),ee=(0,l.Z)(te.end);if(isNaN(q.getTime()))throw new RangeError("Start Date is invalid");if(isNaN(ee.getTime()))throw new RangeError("End Date is invalid");var Se={};Se.years=Math.abs(le(ee,q));var tt=d(ee,q),Ae=x(q,{years:tt*Se.years});Se.months=Math.abs(ae(ee,Ae));var pe=x(Ae,{months:tt*Se.months});Se.days=Math.abs(F(ee,pe));var Pe=x(pe,{days:tt*Se.days});Se.hours=Math.abs(k(ee,Pe));var ye=x(Pe,{hours:tt*Se.hours});Se.minutes=Math.abs(j(ee,ye));var Ee=x(ye,{minutes:tt*Se.minutes});return Se.seconds=Math.abs(Ce(ee,Ee)),Se}},96315:function(_,b,i){"use strict";i.d(b,{Z:function(){return g}});var l=i(68710),f=i(96256),d=i(10420);function g(G,Y){var ae;(0,f.Z)(1,arguments);var Ce=(0,d.Z)((ae=Y?.additionalDigits)!==null&&ae!==void 0?ae:2);if(Ce!==2&&Ce!==1&&Ce!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof G=="string"||Object.prototype.toString.call(G)==="[object String]"))return new Date(NaN);var J=P(G),le;if(J.date){var be=T(J.date,Ce);le=O(be.restDateString,be.year)}if(!le||isNaN(le.getTime()))return new Date(NaN);var te=le.getTime(),q=0,ee;if(J.time&&(q=R(J.time),isNaN(q)))return new Date(NaN);if(J.timezone){if(ee=V(J.timezone),isNaN(ee))return new Date(NaN)}else{var Se=new Date(te+q),tt=new Date(0);return tt.setFullYear(Se.getUTCFullYear(),Se.getUTCMonth(),Se.getUTCDate()),tt.setHours(Se.getUTCHours(),Se.getUTCMinutes(),Se.getUTCSeconds(),Se.getUTCMilliseconds()),tt}return new Date(te+q+ee)}var E={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},m=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,C=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,x=/^([+-])(\d{2})(?::?(\d{2}))?$/;function P(G){var Y={},ae=G.split(E.dateTimeDelimiter),Ce;if(ae.length>2)return Y;if(/:/.test(ae[0])?Ce=ae[0]:(Y.date=ae[0],Ce=ae[1],E.timeZoneDelimiter.test(Y.date)&&(Y.date=G.split(E.timeZoneDelimiter)[0],Ce=G.substr(Y.date.length,G.length))),Ce){var J=E.timezone.exec(Ce);J?(Y.time=Ce.replace(J[1],""),Y.timezone=J[1]):Y.time=Ce}return Y}function T(G,Y){var ae=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+Y)+"})|(\\d{2}|[+-]\\d{"+(2+Y)+"})$)"),Ce=G.match(ae);if(!Ce)return{year:NaN,restDateString:""};var J=Ce[1]?parseInt(Ce[1]):null,le=Ce[2]?parseInt(Ce[2]):null;return{year:le===null?J:le*100,restDateString:G.slice((Ce[1]||Ce[2]).length)}}function O(G,Y){if(Y===null)return new Date(NaN);var ae=G.match(m);if(!ae)return new Date(NaN);var Ce=!!ae[4],J=w(ae[1]),le=w(ae[2])-1,be=w(ae[3]),te=w(ae[4]),q=w(ae[5])-1;if(Ce)return j(Y,te,q)?L(Y,te,q):new Date(NaN);var ee=new Date(0);return!N(Y,le,be)||!k(Y,J)?new Date(NaN):(ee.setUTCFullYear(Y,le,Math.max(J,be)),ee)}function w(G){return G?parseInt(G):1}function R(G){var Y=G.match(C);if(!Y)return NaN;var ae=F(Y[1]),Ce=F(Y[2]),J=F(Y[3]);return z(ae,Ce,J)?ae*l.vh+Ce*l.yJ+J*1e3:NaN}function F(G){return G&&parseFloat(G.replace(",","."))||0}function V(G){if(G==="Z")return 0;var Y=G.match(x);if(!Y)return 0;var ae=Y[1]==="+"?-1:1,Ce=parseInt(Y[2]),J=Y[3]&&parseInt(Y[3])||0;return K(Ce,J)?ae*(Ce*l.vh+J*l.yJ):NaN}function L(G,Y,ae){var Ce=new Date(0);Ce.setUTCFullYear(G,0,4);var J=Ce.getUTCDay()||7,le=(Y-1)*7+ae+1-J;return Ce.setUTCDate(Ce.getUTCDate()+le),Ce}var $=[31,null,31,30,31,30,31,31,30,31,30,31];function U(G){return G%400===0||G%4===0&&G%100!==0}function N(G,Y,ae){return Y>=0&&Y<=11&&ae>=1&&ae<=($[Y]||(U(G)?29:28))}function k(G,Y){return Y>=1&&Y<=(U(G)?366:365)}function j(G,Y,ae){return Y>=1&&Y<=53&&ae>=0&&ae<=6}function z(G,Y,ae){return G===24?Y===0&&ae===0:ae>=0&&ae<60&&Y>=0&&Y<60&&G>=0&&G<25}function K(G,Y){return Y>=0&&Y<=59}},907:function(_,b,i){"use strict";i.d(b,{Z:function(){return d}});var l=i(73151),f=i(96256);function d(g){(0,f.Z)(1,arguments);var E=Object.prototype.toString.call(g);return g instanceof Date||(0,l.Z)(g)==="object"&&E==="[object Date]"?new Date(g.getTime()):typeof g=="number"||E==="[object Number]"?new Date(g):((typeof g=="string"||E==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}},42866:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createBeginDrag=m;var l=i(17210),f=i(63005),d=i(41861),g=i(80929);const E={type:g.INIT_COORDS,payload:{clientOffset:null,sourceClientOffset:null}};function m(O){return function(R=[],F={publishSource:!0}){const{publishSource:V=!0,clientOffset:L,getSourceClientOffset:$}=F,U=O.getMonitor(),N=O.getRegistry();O.dispatch(f.setClientOffset(L)),C(R,U,N);const k=T(R,U);if(k==null){O.dispatch(E);return}let j=null;if(L){if(!$)throw new Error("getSourceClientOffset must be defined");x($),j=$(k)}O.dispatch(f.setClientOffset(L,j));const K=N.getSource(k).beginDrag(U,k);if(K==null)return;P(K),N.pinSource(k);const G=N.getSourceType(k);return{type:g.BEGIN_DRAG,payload:{itemType:G,item:K,sourceId:k,clientOffset:L||null,sourceClientOffset:j||null,isSourcePublic:!!V}}}}function C(O,w,R){l.invariant(!w.isDragging(),"Cannot call beginDrag while dragging."),O.forEach(function(F){l.invariant(R.getSource(F),"Expected sourceIds to be registered.")})}function x(O){l.invariant(typeof O=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function P(O){l.invariant(d.isObject(O),"Item must be an object.")}function T(O,w){let R=null;for(let F=O.length-1;F>=0;F--)if(w.canDragSource(O[F])){R=O[F];break}return R}},38957:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createDrop=m;var l=i(17210),f=i(80929),d=i(41861);function g(O,w,R){return w in O?Object.defineProperty(O,w,{value:R,enumerable:!0,configurable:!0,writable:!0}):O[w]=R,O}function E(O){for(var w=1;w<arguments.length;w++){var R=arguments[w]!=null?arguments[w]:{},F=Object.keys(R);typeof Object.getOwnPropertySymbols=="function"&&(F=F.concat(Object.getOwnPropertySymbols(R).filter(function(V){return Object.getOwnPropertyDescriptor(R,V).enumerable}))),F.forEach(function(V){g(O,V,R[V])})}return O}function m(O){return function(R={}){const F=O.getMonitor(),V=O.getRegistry();C(F),T(F).forEach(($,U)=>{const N=x($,U,V,F),k={type:f.DROP,payload:{dropResult:E({},R,N)}};O.dispatch(k)})}}function C(O){l.invariant(O.isDragging(),"Cannot call drop while not dragging."),l.invariant(!O.didDrop(),"Cannot call drop twice during one drag operation.")}function x(O,w,R,F){const V=R.getTarget(O);let L=V?V.drop(F,O):void 0;return P(L),typeof L>"u"&&(L=w===0?{}:F.getDropResult()),L}function P(O){l.invariant(typeof O>"u"||d.isObject(O),"Drop result must either be an object or undefined.")}function T(O){const w=O.getTargetIds().filter(O.canDropOnTarget,O);return w.reverse(),w}},87018:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createEndDrag=d;var l=i(17210),f=i(80929);function d(E){return function(){const C=E.getMonitor(),x=E.getRegistry();g(C);const P=C.getSourceId();return P!=null&&(x.getSource(P,!0).endDrag(C,P),x.unpinSource()),{type:f.END_DRAG}}}function g(E){l.invariant(E.isDragging(),"Cannot call endDrag while not dragging.")}},63723:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createHover=g;var l=i(17210),f=i(18943),d=i(80929);function g(P){return function(O,{clientOffset:w}={}){E(O);const R=O.slice(0),F=P.getMonitor(),V=P.getRegistry();m(R,F,V);const L=F.getItemType();return C(R,V,L),x(R,F,V),{type:d.HOVER,payload:{targetIds:R,clientOffset:w||null}}}}function E(P){l.invariant(Array.isArray(P),"Expected targetIds to be an array.")}function m(P,T,O){l.invariant(T.isDragging(),"Cannot call hover while not dragging."),l.invariant(!T.didDrop(),"Cannot call hover after drop.");for(let w=0;w<P.length;w++){const R=P[w];l.invariant(P.lastIndexOf(R)===w,"Expected targetIds to be unique in the passed array.");const F=O.getTarget(R);l.invariant(F,"Expected targetIds to be registered.")}}function C(P,T,O){for(let w=P.length-1;w>=0;w--){const R=P[w],F=T.getTargetType(R);f.matchesType(F,O)||P.splice(w,1)}}function x(P,T,O){P.forEach(function(w){O.getTarget(w).hover(T,w)})}},3228:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var l={createDragDropActions:!0,manager:!0};b.createDragDropActions=P;var f=i(42866),d=i(72004),g=i(63723),E=i(38957),m=i(87018),C=x(i(80929));Object.keys(C).forEach(function(T){T==="default"||T==="__esModule"||Object.prototype.hasOwnProperty.call(l,T)||T in b&&b[T]===C[T]||Object.defineProperty(b,T,{enumerable:!0,get:function(){return C[T]}})});function x(T){if(T&&T.__esModule)return T;var O={};if(T!=null){for(var w in T)if(Object.prototype.hasOwnProperty.call(T,w)){var R=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(T,w):{};R.get||R.set?Object.defineProperty(O,w,R):O[w]=T[w]}}return O.default=T,O}function P(T){return{beginDrag:f.createBeginDrag(T),publishDragSource:d.createPublishDragSource(T),hover:g.createHover(T),drop:E.createDrop(T),endDrag:m.createEndDrag(T)}}},63005:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.setClientOffset=f;var l=i(80929);function f(d,g){return{type:l.INIT_COORDS,payload:{sourceClientOffset:g||null,clientOffset:d||null}}}},72004:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createPublishDragSource=f;var l=i(80929);function f(d){return function(){if(d.getMonitor().isDragging())return{type:l.PUBLISH_DRAG_SOURCE}}}},80929:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.END_DRAG=b.DROP=b.HOVER=b.PUBLISH_DRAG_SOURCE=b.BEGIN_DRAG=b.INIT_COORDS=void 0;const i="dnd-core/INIT_COORDS";b.INIT_COORDS=i;const l="dnd-core/BEGIN_DRAG";b.BEGIN_DRAG=l;const f="dnd-core/PUBLISH_DRAG_SOURCE";b.PUBLISH_DRAG_SOURCE=f;const d="dnd-core/HOVER";b.HOVER=d;const g="dnd-core/DROP";b.DROP=g;const E="dnd-core/END_DRAG";b.END_DRAG=E},24424:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.addSource=g,b.addTarget=E,b.removeSource=m,b.removeTarget=C,b.REMOVE_TARGET=b.REMOVE_SOURCE=b.ADD_TARGET=b.ADD_SOURCE=void 0;const i="dnd-core/ADD_SOURCE";b.ADD_SOURCE=i;const l="dnd-core/ADD_TARGET";b.ADD_TARGET=l;const f="dnd-core/REMOVE_SOURCE";b.REMOVE_SOURCE=f;const d="dnd-core/REMOVE_TARGET";b.REMOVE_TARGET=d;function g(x){return{type:i,payload:{sourceId:x}}}function E(x){return{type:l,payload:{targetId:x}}}function m(x){return{type:f,payload:{sourceId:x}}}function C(x){return{type:d,payload:{targetId:x}}}},21159:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var l=i(3228);class f{receiveBackend(g){this.backend=g}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const g=this,{dispatch:E}=this.store;function m(x){return(...P)=>{const T=x.apply(g,P);typeof T<"u"&&E(T)}}const C=l.createDragDropActions(this);return Object.keys(C).reduce((x,P)=>{const T=C[P];return x[P]=m(T),x},{})}dispatch(g){this.store.dispatch(g)}constructor(g,E){this.isSetUp=!1,this.handleRefCountChange=()=>{const m=this.store.getState().refCount>0;this.backend&&(m&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!m&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=g,this.monitor=E,g.subscribe(this.handleRefCountChange)}}b.DragDropManagerImpl=f},44913:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var l=i(17210),f=i(18943),d=i(14997),g=i(65616);class E{subscribeToStateChange(C,x={}){const{handlerIds:P}=x;l.invariant(typeof C=="function","listener must be a function."),l.invariant(typeof P>"u"||Array.isArray(P),"handlerIds, when specified, must be an array of strings.");let T=this.store.getState().stateId;const O=()=>{const w=this.store.getState(),R=w.stateId;try{R===T||R===T+1&&!g.areDirty(w.dirtyHandlerIds,P)||C()}finally{T=R}};return this.store.subscribe(O)}subscribeToOffsetChange(C){l.invariant(typeof C=="function","listener must be a function.");let x=this.store.getState().dragOffset;const P=()=>{const T=this.store.getState().dragOffset;T!==x&&(x=T,C())};return this.store.subscribe(P)}canDragSource(C){if(!C)return!1;const x=this.registry.getSource(C);return l.invariant(x,`Expected to find a valid source. sourceId=${C}`),this.isDragging()?!1:x.canDrag(this,C)}canDropOnTarget(C){if(!C)return!1;const x=this.registry.getTarget(C);if(l.invariant(x,`Expected to find a valid target. targetId=${C}`),!this.isDragging()||this.didDrop())return!1;const P=this.registry.getTargetType(C),T=this.getItemType();return f.matchesType(P,T)&&x.canDrop(this,C)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(C){if(!C)return!1;const x=this.registry.getSource(C,!0);if(l.invariant(x,`Expected to find a valid source. sourceId=${C}`),!this.isDragging()||!this.isSourcePublic())return!1;const P=this.registry.getSourceType(C),T=this.getItemType();return P!==T?!1:x.isDragging(this,C)}isOverTarget(C,x={shallow:!1}){if(!C)return!1;const{shallow:P}=x;if(!this.isDragging())return!1;const T=this.registry.getTargetType(C),O=this.getItemType();if(O&&!f.matchesType(T,O))return!1;const w=this.getTargetIds();if(!w.length)return!1;const R=w.indexOf(C);return P?R===w.length-1:R>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return d.getSourceClientOffset(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return d.getDifferenceFromInitialOffset(this.store.getState().dragOffset)}constructor(C,x){this.store=C,this.registry=x}}b.DragDropMonitorImpl=E},15502:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var l=i(17210),f=i(24424),d=i(3677),g=i(46074),E=i(98391),m=i(40839);function C(O){const w=d.getNextUniqueId().toString();switch(O){case g.HandlerRole.SOURCE:return`S${w}`;case g.HandlerRole.TARGET:return`T${w}`;default:throw new Error(`Unknown Handler Role: ${O}`)}}function x(O){switch(O[0]){case"S":return g.HandlerRole.SOURCE;case"T":return g.HandlerRole.TARGET;default:throw new Error(`Cannot parse handler ID: ${O}`)}}function P(O,w){const R=O.entries();let F=!1;do{const{done:V,value:[,L]}=R.next();if(L===w)return!0;F=!!V}while(!F);return!1}class T{addSource(w,R){E.validateType(w),E.validateSourceContract(R);const F=this.addHandler(g.HandlerRole.SOURCE,w,R);return this.store.dispatch(f.addSource(F)),F}addTarget(w,R){E.validateType(w,!0),E.validateTargetContract(R);const F=this.addHandler(g.HandlerRole.TARGET,w,R);return this.store.dispatch(f.addTarget(F)),F}containsHandler(w){return P(this.dragSources,w)||P(this.dropTargets,w)}getSource(w,R=!1){return l.invariant(this.isSourceId(w),"Expected a valid source ID."),R&&w===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(w)}getTarget(w){return l.invariant(this.isTargetId(w),"Expected a valid target ID."),this.dropTargets.get(w)}getSourceType(w){return l.invariant(this.isSourceId(w),"Expected a valid source ID."),this.types.get(w)}getTargetType(w){return l.invariant(this.isTargetId(w),"Expected a valid target ID."),this.types.get(w)}isSourceId(w){return x(w)===g.HandlerRole.SOURCE}isTargetId(w){return x(w)===g.HandlerRole.TARGET}removeSource(w){l.invariant(this.getSource(w),"Expected an existing source."),this.store.dispatch(f.removeSource(w)),m.asap(()=>{this.dragSources.delete(w),this.types.delete(w)})}removeTarget(w){l.invariant(this.getTarget(w),"Expected an existing target."),this.store.dispatch(f.removeTarget(w)),this.dropTargets.delete(w),this.types.delete(w)}pinSource(w){const R=this.getSource(w);l.invariant(R,"Expected an existing source."),this.pinnedSourceId=w,this.pinnedSource=R}unpinSource(){l.invariant(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(w,R,F){const V=C(w);return this.types.set(V,R),w===g.HandlerRole.SOURCE?this.dragSources.set(V,F):w===g.HandlerRole.TARGET&&this.dropTargets.set(V,F),V}constructor(w){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=w}}b.HandlerRegistryImpl=T},98391:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.validateSourceContract=f,b.validateTargetContract=d,b.validateType=g;var l=i(17210);function f(E){l.invariant(typeof E.canDrag=="function","Expected canDrag to be a function."),l.invariant(typeof E.beginDrag=="function","Expected beginDrag to be a function."),l.invariant(typeof E.endDrag=="function","Expected endDrag to be a function.")}function d(E){l.invariant(typeof E.canDrop=="function","Expected canDrop to be a function."),l.invariant(typeof E.hover=="function","Expected hover to be a function."),l.invariant(typeof E.drop=="function","Expected beginDrag to be a function.")}function g(E,m){if(m&&Array.isArray(E)){E.forEach(C=>g(C,!1));return}l.invariant(typeof E=="string"||typeof E=="symbol",m?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}},41618:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.createDragDropManager=m;var l=i(21159),f=i(6680),d=i(82182),g=i(44913),E=i(15502);function m(x,P=void 0,T={},O=!1){const w=C(O),R=new g.DragDropMonitorImpl(w,new E.HandlerRegistryImpl(w)),F=new l.DragDropManagerImpl(w,R),V=x(F,P,T);return F.receiveBackend(V),F}function C(x){const P=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return f.createStore(d.reduce,x&&P&&P({name:"dnd-core",instanceId:"dnd-core"}))}},67533:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var l={},f=g(i(46074));Object.keys(f).forEach(function(E){E==="default"||E==="__esModule"||Object.prototype.hasOwnProperty.call(l,E)||E in b&&b[E]===f[E]||Object.defineProperty(b,E,{enumerable:!0,get:function(){return f[E]}})});var d=g(i(41618));Object.keys(d).forEach(function(E){E==="default"||E==="__esModule"||Object.prototype.hasOwnProperty.call(l,E)||E in b&&b[E]===d[E]||Object.defineProperty(b,E,{enumerable:!0,get:function(){return d[E]}})});function g(E){if(E&&E.__esModule)return E;var m={};if(E!=null){for(var C in E)if(Object.prototype.hasOwnProperty.call(E,C)){var x=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,C):{};x.get||x.set?Object.defineProperty(m,C,x):m[C]=E[C]}}return m.default=E,m}},46074:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.HandlerRole=void 0;var i;b.HandlerRole=i,function(l){l.SOURCE="SOURCE",l.TARGET="TARGET"}(i||(b.HandlerRole=i={}))},50627:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.reduce=m;var l=i(3228),f=i(24424),d=i(5603),g=i(65616),E=i(41861);function m(C=g.NONE,x){switch(x.type){case l.HOVER:break;case f.ADD_SOURCE:case f.ADD_TARGET:case f.REMOVE_TARGET:case f.REMOVE_SOURCE:return g.NONE;case l.BEGIN_DRAG:case l.PUBLISH_DRAG_SOURCE:case l.END_DRAG:case l.DROP:default:return g.ALL}const{targetIds:P=[],prevTargetIds:T=[]}=x.payload,O=E.xor(P,T);if(!(O.length>0||!d.areArraysEqual(P,T)))return g.NONE;const R=T[T.length-1],F=P[P.length-1];return R!==F&&(R&&O.push(R),F&&O.push(F)),O}},27716:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.reduce=m;var l=i(3228),f=i(5603);function d(C,x,P){return x in C?Object.defineProperty(C,x,{value:P,enumerable:!0,configurable:!0,writable:!0}):C[x]=P,C}function g(C){for(var x=1;x<arguments.length;x++){var P=arguments[x]!=null?arguments[x]:{},T=Object.keys(P);typeof Object.getOwnPropertySymbols=="function"&&(T=T.concat(Object.getOwnPropertySymbols(P).filter(function(O){return Object.getOwnPropertyDescriptor(P,O).enumerable}))),T.forEach(function(O){d(C,O,P[O])})}return C}const E={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function m(C=E,x){const{payload:P}=x;switch(x.type){case l.INIT_COORDS:case l.BEGIN_DRAG:return{initialSourceClientOffset:P.sourceClientOffset,initialClientOffset:P.clientOffset,clientOffset:P.clientOffset};case l.HOVER:return f.areCoordsEqual(C.clientOffset,P.clientOffset)?C:g({},C,{clientOffset:P.clientOffset});case l.END_DRAG:case l.DROP:return E;default:return C}}},90231:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.reduce=C;var l=i(3228),f=i(24424),d=i(41861);function g(x,P,T){return P in x?Object.defineProperty(x,P,{value:T,enumerable:!0,configurable:!0,writable:!0}):x[P]=T,x}function E(x){for(var P=1;P<arguments.length;P++){var T=arguments[P]!=null?arguments[P]:{},O=Object.keys(T);typeof Object.getOwnPropertySymbols=="function"&&(O=O.concat(Object.getOwnPropertySymbols(T).filter(function(w){return Object.getOwnPropertyDescriptor(T,w).enumerable}))),O.forEach(function(w){g(x,w,T[w])})}return x}const m={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function C(x=m,P){const{payload:T}=P;switch(P.type){case l.BEGIN_DRAG:return E({},x,{itemType:T.itemType,item:T.item,sourceId:T.sourceId,isSourcePublic:T.isSourcePublic,dropResult:null,didDrop:!1});case l.PUBLISH_DRAG_SOURCE:return E({},x,{isSourcePublic:!0});case l.HOVER:return E({},x,{targetIds:T.targetIds});case f.REMOVE_TARGET:return x.targetIds.indexOf(T.targetId)===-1?x:E({},x,{targetIds:d.without(x.targetIds,T.targetId)});case l.DROP:return E({},x,{dropResult:T.dropResult,didDrop:!0,targetIds:[]});case l.END_DRAG:return E({},x,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return x}}},82182:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.reduce=P;var l=i(27716),f=i(90231),d=i(57874),g=i(50627),E=i(30441),m=i(41861);function C(T,O,w){return O in T?Object.defineProperty(T,O,{value:w,enumerable:!0,configurable:!0,writable:!0}):T[O]=w,T}function x(T){for(var O=1;O<arguments.length;O++){var w=arguments[O]!=null?arguments[O]:{},R=Object.keys(w);typeof Object.getOwnPropertySymbols=="function"&&(R=R.concat(Object.getOwnPropertySymbols(w).filter(function(F){return Object.getOwnPropertyDescriptor(w,F).enumerable}))),R.forEach(function(F){C(T,F,w[F])})}return T}function P(T={},O){return{dirtyHandlerIds:g.reduce(T.dirtyHandlerIds,{type:O.type,payload:x({},O.payload,{prevTargetIds:m.get(T,"dragOperation.targetIds",[])})}),dragOffset:l.reduce(T.dragOffset,O),refCount:d.reduce(T.refCount,O),dragOperation:f.reduce(T.dragOperation,O),stateId:E.reduce(T.stateId)}}},57874:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.reduce=f;var l=i(24424);function f(d=0,g){switch(g.type){case l.ADD_SOURCE:case l.ADD_TARGET:return d+1;case l.REMOVE_SOURCE:case l.REMOVE_TARGET:return d-1;default:return d}}},30441:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.reduce=i;function i(l=0){return l+1}},14997:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.add=i,b.subtract=l,b.getSourceClientOffset=f,b.getDifferenceFromInitialOffset=d;function i(g,E){return{x:g.x+E.x,y:g.y+E.y}}function l(g,E){return{x:g.x-E.x,y:g.y-E.y}}function f(g){const{clientOffset:E,initialClientOffset:m,initialSourceClientOffset:C}=g;return!E||!m||!C?null:l(i(E,C),m)}function d(g){const{clientOffset:E,initialClientOffset:m}=g;return!E||!m?null:l(E,m)}},65616:function(_,b,i){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.areDirty=g,b.ALL=b.NONE=void 0;var l=i(41861);const f=[];b.NONE=f;const d=[];b.ALL=d,f.__IS_NONE__=!0,d.__IS_ALL__=!0;function g(E,m){return E===f?!1:E===d||typeof m>"u"?!0:l.intersection(m,E).length>0}},5603:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.areCoordsEqual=l,b.areArraysEqual=f,b.strictEquality=void 0;const i=(d,g)=>d===g;b.strictEquality=i;function l(d,g){return!d&&!g?!0:!d||!g?!1:d.x===g.x&&d.y===g.y}function f(d,g,E=i){if(d.length!==g.length)return!1;for(let m=0;m<d.length;++m)if(!E(d[m],g[m]))return!1;return!0}},3677:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getNextUniqueId=l;let i=0;function l(){return i++}},41861:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.get=i,b.without=l,b.isString=f,b.isObject=d,b.xor=g,b.intersection=E;function i(m,C,x){return C.split(".").reduce((P,T)=>P&&P[T]?P[T]:x||null,m)}function l(m,C){return m.filter(x=>x!==C)}function f(m){return typeof m=="string"}function d(m){return typeof m=="object"}function g(m,C){const x=new Map,P=O=>{x.set(O,x.has(O)?x.get(O)+1:1)};m.forEach(P),C.forEach(P);const T=[];return x.forEach((O,w)=>{O===1&&T.push(w)}),T}function E(m,C){return m.filter(x=>C.indexOf(x)>-1)}},18943:function(_,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.matchesType=i;function i(l,f){return f===null?l===null:Array.isArray(l)?l.some(d=>d===f):l===f}},82702:function(_,b,i){"use strict";i.d(b,{l:function(){return l},m:function(){return f}});const l="StrapiAdmin/RBACProvider/RESET_STORE",f="StrapiAdmin/RBACProvider/SET_PERMISSIONS"},85149:function(_,b,i){"use strict";i.d(b,{Q:function(){return f},m:function(){return l}});const l="ContentManager/RBACManager/SET_PERMISSIONS",f="ContentManager/RBACManager/RESET_PERMISSIONS"},70475:function(_,b,i){"use strict";i.d(b,{IX:function(){return d},fn:function(){return l},sZ:function(){return f}});const l="ContentManager/App/GET_INIT_DATA",f="ContentManager/App/RESET_INIT_DATA",d="ContentManager/App/SET_INIT_DATA"},60371:function(_,b,i){"use strict";i.d(b,{E:function(){return d}});var l=i(97889),f=i(70475);const d={components:[],status:"loading",models:[],collectionTypeLinks:[],singleTypeLinks:[]},g=(E=d,m)=>(0,l.ZP)(E,C=>{switch(m.type){case f.fn:{C.status="loading";break}case f.sZ:return d;case f.IX:{C.collectionTypeLinks=m.data.authorizedCollectionTypeLinks.filter(({isDisplayed:x})=>x),C.singleTypeLinks=m.data.authorizedSingleTypeLinks.filter(({isDisplayed:x})=>x),C.components=m.data.components,C.models=m.data.contentTypeSchemas,C.fieldSizes=m.data.fieldSizes,C.status="resolved";break}default:return C}});b.Z=g},40582:function(_,b,i){"use strict";i.d(b,{O:function(){return l},c:function(){return f}});const l="ContentManager/EditViewLayoutManager/SET_LAYOUT",f="ContentManager/EditViewLayoutManager/RESET_PROPS"},93088:function(_,b,i){"use strict";i.d(b,{Id:function(){return f},MP:function(){return E},Rp:function(){return g},ZA:function(){return l},Zz:function(){return m},c2:function(){return d}});const l="ContentManager/ListView/GET_DATA",f="ContentManager/ListView/GET_DATA_SUCCEEDED",d="ContentManager/ListView/RESET_PROPS",g="ContentManager/ListView/ON_CHANGE_LIST_HEADERS ",E="ContentManager/ListView/ON_RESET_LIST_HEADERS ",m="ContentManager/ListView/SET_LIST_LAYOUT "},14090:function(_,b,i){"use strict";i.d(b,{E:function(){return E}});var l=i(97889),f=i(33795),d=i.n(f),g=i(93088);const E={data:[],isLoading:!0,contentType:{},components:[],initialDisplayedHeaders:[],displayedHeaders:[],pagination:{total:0}},m=(C=E,x)=>(0,l.ZP)(C,P=>{switch(x.type){case g.ZA:return{...E,contentType:C.contentType,components:C.components,initialDisplayedHeaders:C.initialDisplayedHeaders,displayedHeaders:C.displayedHeaders};case g.Id:{P.pagination=x.pagination,P.data=x.data,P.isLoading=!1;break}case g.Rp:{const{target:{name:T,value:O}}=x;if(O)P.displayedHeaders=C.displayedHeaders.filter(w=>w.name!==T);else{const{metadatas:w,attributes:R,uid:F}=C.contentType,V=w[T].list,L={name:T,fieldSchema:R[T],metadatas:V,key:`__${T}_key__`};switch(R[T].type){case"component":{const $=R[T].component,U=d()(C,["components",$,"settings","mainField"],null),N=d()(C,["components",$,"attributes",U]);P.displayedHeaders.push({...L,metadatas:{...V,mainField:{...N,name:U}}});break}case"relation":P.displayedHeaders.push({...L,queryInfos:{defaultParams:{},endPoint:`collection-types/${F}`}});break;default:P.displayedHeaders.push(L)}}break}case g.MP:{P.displayedHeaders=C.initialDisplayedHeaders;break}case g.c2:return E;case g.Zz:{const{contentType:T,components:O,displayedHeaders:w}=x;P.contentType=T,P.components=O,P.displayedHeaders=w,P.initialDisplayedHeaders=w;break}default:return P}});b.Z=m},46491:function(_,b,i){"use strict";i.d(b,{Id:function(){return f},TP:function(){return d},ZA:function(){return l},c2:function(){return g},d0:function(){return m},t9:function(){return C},tE:function(){return x},w7:function(){return E}});const l="ContentManager/CrudReducer/GET_DATA",f="ContentManager/CrudReducer/GET_DATA_SUCCEEDED",d="ContentManager/CrudReducer/INIT_FORM",g="ContentManager/CrudReducer/RESET_PROPS",E="ContentManager/CrudReducer/SET_DATA_STRUCTURES",m="ContentManager/CrudReducer/SET_STATUS",C="ContentManager/CrudReducer/SUBMIT_SUCCEEDED",x="ContentManager/CrudReducer/CLEAR_SET_MODIFIED_DATA_ONLY"},4214:function(_,b,i){"use strict";i.d(b,{q:function(){return d}});var l=i(97889),f=i(46491);const d={componentsDataStructure:{},contentTypeDataStructure:{},isLoading:!0,data:null,status:"resolved",setModifiedDataOnly:!1},g=(E=d,m)=>(0,l.ZP)(E,C=>{switch(m.type){case f.ZA:{C.isLoading=!0,C.data=null;break}case f.Id:{C.isLoading=!1,C.data=m.data,C.setModifiedDataOnly=m.setModifiedDataOnly??!1;break}case f.TP:{if(m.data){C.isLoading=!1,C.data=m.data;break}C.isLoading=!1,C.data=E.contentTypeDataStructure;break}case f.c2:return d;case f.w7:{C.componentsDataStructure=m.componentsDataStructure,C.contentTypeDataStructure=m.contentTypeDataStructure;break}case f.d0:{C.status=m.status;break}case f.t9:{C.data=m.data;break}case f.tE:{C.setModifiedDataOnly=!1;break}default:return C}});b.Z=g},59883:function(_,b,i){"use strict";i.d(b,{z8:function(){return g},Iv:function(){return O},lt:function(){return R},Sy:function(){return V},qr:function(){return $},rh:function(){return P}});var l=i(56784),f=i.n(l);class d{constructor(){this.components={}}add(N){const{name:k,Component:j}=N;f()(j,"A Component must be provided"),f()(k,"A name must be provided"),f()(this.components[k]===void 0,"A similar field already exists"),this.components[k]=j}}var g=()=>new d;const E=["biginteger","boolean","date","datetime","decimal","email","enumeration","float","integer","json","password","richtext","string","text","time","uid"],m=["min","minLength","max","maxLength","required","regex","enum","unique","private","default"],C=(U,N)=>N.items?N.items.reduce(C,U):(N.name?U.push({isValidOptionPath:m.includes(N.name)||N.name.startsWith("options"),errorMessage:`'${N.name}' must be prefixed with 'options.'`}):U.push({isValidOptionPath:!1,errorMessage:"The 'name' property is required on an options object"}),U);class x{constructor(){this.customFields={}}register(N){if(Array.isArray(N))N.forEach(k=>{this.register(k)});else{const{name:k,pluginId:j,type:z,intlLabel:K,intlDescription:G,components:Y,options:ae}=N;f()(k,"A name must be provided"),f()(z,"A type must be provided"),f()(K,"An intlLabel must be provided"),f()(G,"An intlDescription must be provided"),f()(Y,"A components object must be provided"),f()(Y.Input,"An Input component must be provided"),f()(E.includes(z),`Custom field type: '${z}' is not a valid Strapi type or it can't be used with a Custom Field`);const Ce=/^(?![0-9])[a-zA-Z0-9$_-]+$/g;f()(Ce.test(k),`Custom field name: '${k}' is not a valid object key`);const J=[...ae?.base||[],...ae?.advanced||[]];J.length&&J.reduce(C,[]).forEach(({isValidOptionPath:q,errorMessage:ee})=>{f()(q,ee)});const le=j?`plugin::${j}.${k}`:`global::${k}`,be=Object.prototype.hasOwnProperty.call(this.customFields,le);f()(!be,`Custom field: '${le}' has already been registered`),this.customFields[le]=N}}getAll(){return this.customFields}get(N){return this.customFields[N]}}var P=new x;class T{constructor(){this.fields={}}add(N){const{type:k,Component:j}=N;f()(j,"A Component must be provided"),f()(k,"A type must be provided"),this.fields[k]=j}}var O=()=>new T;class w{constructor(){this.middlewares=[]}add(N){this.middlewares.push(N)}}var R=()=>new w;class F{constructor(N){this.apis=N.apis||{},this.initializer=N.initializer||null,this.injectionZones=N.injectionZones||{},this.isReady=N.isReady!==void 0?N.isReady:!0,this.name=N.name,this.pluginId=N.id}getInjectedComponents(N,k){try{return this.injectionZones[N][k]||{}}catch(j){return console.error("Cannot get injected component",j),j}}injectComponent(N,k,j){try{this.injectionZones[N][k].push(j)}catch(z){console.error("Cannot inject component",z)}}}var V=U=>new F(U);class L{constructor({appReducers:N}){this.reducers={...N}}add(N,k){this.reducers[N]=k}}var $=({appReducers:U})=>new L({appReducers:U})},35117:function(_,b,i){"use strict";var l=i(30126),f=i(44645),E={config:{locales:["fr"]},bootstrap:()=>{}},m=i(59883),C=i(35631),x=i.n(C),P=i(77131),T=i.n(P),O=i(98374),w=i.n(O),R=i(61215),F=i.n(R),V=i(35901),L=i.n(V),U={"content-type-builder":x(),email:T(),upload:w(),i18n:F(),"users-permissions":L()},N=i(97889),k=i(82702);const j={allPermissions:null,collectionTypesRelatedPermissions:{}};var K=(ut=j,ht)=>(0,N.ZP)(ut,Ot=>{switch(ht.type){case k.m:{Ot.allPermissions=ht.permissions,Ot.collectionTypesRelatedPermissions=ht.permissions.filter(Ue=>Ue.subject).reduce((Ue,at)=>{const{subject:Pt,action:lt}=at;return Ue[Pt]||(Ue[Pt]={}),Ue[Pt]=Ue[Pt][lt]?{...Ue[Pt],[lt]:[...Ue[Pt][lt],at]}:{...Ue[Pt],[lt]:[at]},Ue},{});break}case k.l:return j;default:return ut}}),G=i(85149);const Y={permissions:null};var Ce=(ut=Y,ht)=>(0,N.ZP)(ut,Ot=>{switch(ht.type){case G.m:{Ot.permissions=Object.entries(ht.permissions).reduce((Ue,at)=>[...Ue,...at[1]],[]);break}case G.Q:{Ot.permissions=null;break}default:return Ot}}),J=i(60371),le=i(40582);const be={currentLayout:null};var q=(ut=be,ht)=>(0,N.ZP)(ut,Ot=>{switch(ht.type){case le.c:{Ot.currentLayout=null;break}case le.O:{Ot.currentLayout=ht.layout;break}default:return Ot}}),ee=i(14090),Se=i(4214),tt=i(69891);const Ae={"content-manager_app":J.Z,"content-manager_listView":ee.Z,"content-manager_rbacManager":Ce,"content-manager_editViewLayoutManager":q,"content-manager_editViewCrudReducer":Se.Z};var Pe={admin_app:tt.Z,rbacProvider:K,...Ae};window.strapi={backendURL:"http://localhost:1337",isEE:!1,telemetryDisabled:!1,features:{SSO:"sso",AUDIT_LOGS:"audit-logs",REVIEW_WORKFLOWS:"review-workflows"},projectType:"Community"};const ye=E,Ee={components:(0,m.z8)(),fields:(0,m.Iv)()},_e=(0,m.lt)(),We=(0,m.qr)({appReducers:Pe}),Ie=document.getElementById("app");(async()=>{const{get:ut}=(0,l.tg)();try{const{data:{data:{isEE:at,features:Pt}}}=await ut("/admin/project-type");window.strapi.isEE=at,window.strapi.features={...window.strapi.features,isEnabled:lt=>Pt.some(kt=>kt.name===lt)},window.strapi.projectType=at?"Enterprise":"Community"}catch(at){console.error(at)}const Ot=(await Promise.all([i.e(6715),i.e(6812),i.e(5538)]).then(i.bind(i,58917))).default({appPlugins:U,library:Ee,adminConfig:ye,bootstrap:ye,middlewares:_e,reducers:We});await Ot.bootstrapAdmin(),await Ot.initialize(),await Ot.bootstrap(),await Ot.loadTrads(),(0,f.s)(Ie).render(Ot.render())})()},4556:function(_,b,i){"use strict";i.d(b,{XS:function(){return f},eb:function(){return l},y3:function(){return d}});const l="StrapiAdmin/APP/SET_APP_RUNTIME_STATUS",f="StrapiAdmin/App/SET_ADMIN_PERMISSIONS",d=[]},69891:function(_,b,i){"use strict";i.d(b,{E:function(){return d}});var l=i(97889),f=i(4556);const d={permissions:{},status:"init"},g=(E=d,m)=>(0,l.ZP)(E,C=>{switch(m.type){case f.eb:{C.status="runtime";break}case f.XS:{C.permissions=m.payload;break}default:return C}});b.Z=g},98954:function(_,b,i){"use strict";i.d(b,{Ap:function(){return C},Id:function(){return T},Ir:function(){return f},JO:function(){return x},Ly:function(){return P},NG:function(){return R},Sh:function(){return E},Uu:function(){return d},VR:function(){return m},Zl:function(){return O},ai:function(){return F},bi:function(){return L},gz:function(){return l},lw:function(){return w},o_:function(){return g},xx:function(){return V}});const l="ContentTypeBuilder/DataManagerProvider/ADD_ATTRIBUTE",f="ContentTypeBuilder/DataManagerProvider/ADD_CUSTOM_FIELD_ATTRIBUTE",d="ContentTypeBuilder/DataManagerProvider/ADD_CREATED_COMPONENT_TO_DYNAMIC_ZONE",g="ContentTypeBuilder/DataManagerProvider/CHANGE_DYNAMIC_ZONE_COMPONENTS",E="ContentTypeBuilder/DataManagerProvider/CREATE_SCHEMA",m="ContentTypeBuilder/DataManagerProvider/CREATE_COMPONENT_SCHEMA",C="ContentTypeBuilder/DataManagerProvider/DELETE_NOT_SAVED_TYPE",x="ContentTypeBuilder/DataManagerProvider/EDIT_ATTRIBUTE",P="ContentTypeBuilder/DataManagerProvider/EDIT_CUSTOM_FIELD_ATTRIBUTE",T="ContentTypeBuilder/DataManagerProvider/GET_DATA_SUCCEEDED",O="ContentTypeBuilder/DataManagerProvider/RELOAD_PLUGIN",w="ContentTypeBuilder/DataManagerProvider/REMOVE_FIELD_FROM_DISPLAYED_COMPONENT",R="ContentTypeBuilder/DataManagerProvider/REMOVE_COMPONENT_FROM_DYNAMIC_ZONE",F="ContentTypeBuilder/DataManagerProvider/REMOVE_FIELD",V="ContentTypeBuilder/DataManagerProvider/SET_MODIFIED_DATA",L="ContentTypeBuilder/DataManagerProvider/UPDATE_SCHEMA"},41486:function(_,b,i){"use strict";i.d(b,{E:function(){return T}});var l=i(97889),f=i(33795),d=i.n(f),g=i(3040),E=i.n(g),m=i(11165),C=i(19323),x=i(98954),P=i(61730);const T={components:{},contentTypes:{},initialComponents:{},initialContentTypes:{},initialData:{},modifiedData:{},reservedNames:{},isLoading:!0,isLoadingForDataToBeSet:!0},O=["oneWay","manyWay"],w=V=>V==="manyToOne"?"oneToMany":V==="oneToMany"?"manyToOne":V,R=(V,L)=>V.schema.attributes.findIndex(({name:$})=>$===L),F=(V=T,L)=>(0,l.ZP)(V,$=>{switch(L.type){case x.gz:{const{attributeToSet:{name:U,...N},forTarget:k,targetUid:j}=L;delete N.createComponent;const z=["component","contentType"].includes(k)?[k]:[k,j],G=[...d()(V,["modifiedData",...z,"schema","attributes"],[]).slice(),{...N,name:U}];if(E()($,["modifiedData",...z,"schema","attributes"],G),L.shouldAddComponentToData){const ae=N.component,Ce=V.components[ae],J=Ce.isTemporary,le=V.modifiedData.components[ae]!==void 0;if(J||le)break;$.modifiedData.components[ae]=Ce,(0,P.Z)(Ce.schema.attributes,V.components).filter(q=>d()(V,["modifiedData","components",q])===void 0).forEach(q=>{const ee=d()(V,["components",q],{});ee.isTemporary||!1||($.modifiedData.components[q]=ee)});break}if(N.type==="relation"){const ae=N.target,Ce=N.targetAttribute||null,J=N.relation,le=(0,m.Z)(J,Ce),be=d()(V,["modifiedData",...z,"uid"]);if(N.type==="relation"&&le!=="oneWay"&&le!=="manyWay"&&ae===be){const te={name:Ce,relation:w(le),target:ae,targetAttribute:U,type:"relation"};N.private&&(te.private=N.private);const q=[...G,te];E()($,["modifiedData",...z,"schema","attributes"],q)}}break}case x.Uu:{const{dynamicZoneTarget:U,componentsToAdd:N}=L,k=R(V.modifiedData.contentType,U);N.forEach(j=>{$.modifiedData.contentType.schema.attributes[k].components.push(j)});break}case x.Ir:{const{attributeToSet:{name:U,...N},forTarget:k,targetUid:j}=L,z=["component","contentType"].includes(k)?[k]:[k,j],G=[...d()(V,["modifiedData",...z,"schema","attributes"],[]).slice(),{...N,name:U}];E()($,["modifiedData",...z,"schema","attributes"],G);break}case x.o_:{const{dynamicZoneTarget:U,newComponents:N}=L,k=R(V.modifiedData.contentType,U),j=V.modifiedData.contentType.schema.attributes[k].components,z=(0,C.Z)([...j,...N]);$.modifiedData.contentType.schema.attributes[k].components=z,(0,P.Z)((0,l.Vk)($.modifiedData.contentType.schema.attributes),V.components).filter(Y=>d()(V,["modifiedData","components",Y])===void 0).forEach(Y=>{const ae=d()(V,["components",Y],{});ae.isTemporary||!1||($.modifiedData.components[Y]=ae)});break}case x.VR:{const U={uid:L.uid,isTemporary:!0,category:L.componentCategory,schema:{...L.data,attributes:[]}};$.components[L.uid]=U,L.shouldAddComponentToData&&($.modifiedData.components[L.uid]=U);break}case x.Sh:{const U={uid:L.uid,isTemporary:!0,schema:{...L.data,attributes:[]}};$.contentTypes[L.uid]=U;break}case x.JO:{const{attributeToSet:{name:U,...N},forTarget:k,targetUid:j,initialAttribute:z}=L,K=z.name,G=["component","contentType"].includes(k)?[k]:[k,j],Y=R(d()(V,["modifiedData",...G]),K),ae=N.type==="relation";if(!ae){E()($,["modifiedData",...G,"schema","attributes",Y],L.attributeToSet);break}const Ce=d()(V,["modifiedData",...G,"schema","attributes"]).slice(),J={name:U,relation:N.relation,target:N.target,targetAttribute:N.targetAttribute,type:"relation"};N.private&&(J.private=N.private),N.pluginOptions&&(J.pluginOptions=N.pluginOptions);const le=Ce.findIndex(({name:ht})=>ht===z.name);le!==-1&&Ce.splice(le,1,J);let be=null,te=null,q=null,ee=null;const Se=d()(V,["modifiedData",...G,"uid"]),tt=z.target!==N.target,Ae=N.target===Se,pe=(0,m.Z)(N.relation,N.targetAttribute),Pe=(0,m.Z)(z.relation,z.targetAttribute),ye=z.target===Se,Ee=Pe!==pe,_e=tt&&!Ae&&ye&&ae,We=Ee&&ye&&["oneWay","manyWay"].includes(pe)&&ae,Ie=!O.includes(Pe)&&!O.includes(pe)&&ye&&Ae&&ae,Fe=O.includes(Pe)&&!O.includes(pe)&&ye&&Ae&&ae,ut=tt&&Ae&&!O.includes(pe);if((_e||We)&&(be=z.targetAttribute),be){const ht=Ce.findIndex(({name:Ot})=>Ot===be);Ce.splice(ht,1)}if(!_e){const ht=d()(V,["initialContentTypes",z.target]);if(ht){const Ot=R(ht,z.targetAttribute);ee=d()(V,["initialContentTypes",z.target,"schema","attributes",Ot])}}if(Fe||ut){q={name:N.targetAttribute,relation:w(pe),target:N.target,targetAttribute:U,type:"relation"},N.private&&(q.private=N.private),ee&&ee.pluginOptions&&(q.pluginOptions=ee.pluginOptions);const ht=Ce.findIndex(({name:at})=>at===z.name),Ot=Ce.findIndex(({name:at})=>U===at),Ue=(ht===-1?Ot:ht)+1;Ce.splice(Ue,0,q)}if(Ie&&(te=z.targetAttribute,q={name:N.targetAttribute,relation:w(pe),target:N.target,targetAttribute:U,type:"relation"},N.private&&(q.private=N.private),ee&&ee.pluginOptions&&(q.pluginOptions=ee.pluginOptions),te)){const ht=Ce.findIndex(({name:Ot})=>Ot===te);Ce.splice(ht,1,q)}E()($,["modifiedData",...G,"schema","attributes"],Ce);break}case x.Ly:{const{forTarget:U,targetUid:N,initialAttribute:k,attributeToSet:j}=L,z=k.name,K=["component","contentType"].includes(U)?[U]:[U,N],G=R(d()(V,["modifiedData",...K]),z);E()($,["modifiedData",...K,"schema","attributes",G],j);break}case x.Id:{$.components=L.components,$.initialComponents=L.components,$.initialContentTypes=L.contentTypes,$.contentTypes=L.contentTypes,$.reservedNames=L.reservedNames,$.isLoading=!1;break}case x.Ap:{$.contentTypes=V.initialContentTypes,$.components=V.initialComponents;break}case x.Zl:return T;case x.NG:{const U=R(V.modifiedData.contentType,L.dzName);$.modifiedData.contentType.schema.attributes[U].components.splice(L.componentToRemoveIndex,1);break}case x.ai:{const{mainDataKey:U,attributeToRemoveName:N}=L,k=["modifiedData",U,"schema","attributes"],j=R(V.modifiedData[U],N),z=[...k,j],K=d()(V,z);if(K.type==="relation"&&U==="contentType"){const{target:Ce,relation:J,targetAttribute:le}=K,be=(0,m.Z)(J,le),te=V.modifiedData.contentType.uid;if(Ce===te&&!O.includes(be)){const Se=V.modifiedData[U].schema.attributes.slice().filter(tt=>!(tt.name===N||tt.target===te&&tt.targetAttribute===N));$.modifiedData[U].schema.attributes=Se;break}}V.modifiedData[U].schema.attributes.slice().reduce((Ce,J)=>(J.type!=="uid"||J.targetField!==N||Ce.push(J.name),Ce),[]).forEach(Ce=>{const J=R(V.modifiedData[U],Ce);delete $.modifiedData[U].schema.attributes[J].targetField}),$.modifiedData[U].schema.attributes.splice(j,1);break}case x.lw:{const{attributeToRemoveName:U,componentUid:N}=L,k=R(V.modifiedData.components[N],U);$.modifiedData.components[N].schema.attributes.splice(k,1);break}case x.xx:{$.isLoadingForDataToBeSet=!1,$.initialData=L.schemaToSet,$.modifiedData=L.schemaToSet,L.hasJustCreatedSchema||($.components=V.initialComponents,$.contentTypes=V.initialContentTypes);break}case x.bi:{const{data:{displayName:U,category:N,icon:k,kind:j},schemaType:z,uid:K}=L;if($.modifiedData[z].schema.displayName=U,L.schemaType==="component"){$.modifiedData.component.category=N,$.modifiedData.component.schema.icon=k;const G=(0,l.Vk)($.modifiedData.component);$.components[K]=G;break}$.modifiedData.contentType.schema.kind=j;break}default:return $}});b.Z=F},61730:function(_,b,i){"use strict";var l=i(33795),f=i.n(l),d=i(19323);const g=(E,m)=>{const C=E.reduce((x,P)=>{const T=P.type;if(T==="component"){const O=P.component;x.push(O);const w=f()(m,[O,"schema","attributes"],[]);x.push(...g(w,m))}if(T==="dynamiczone"){const O=P.components,w=O.reduce((R,F)=>{const V=f()(m,[F,"schema","attributes"],[]);return[...R,...g(V,m)]},[]);return[...x,...O,...w]}return x},[]);return(0,d.Z)(C)};b.Z=g},52486:function(_,b,i){"use strict";i.d(b,{Ey:function(){return w},I:function(){return C},OY:function(){return T},P0:function(){return l},QQ:function(){return d},S0:function(){return P},VZ:function(){return O},_H:function(){return x},aG:function(){return f},c2:function(){return g},oF:function(){return m},yC:function(){return E}});const l="ContentTypeBuilder/FormModal/ON_CHANGE",f="ContentTypeBuilder/FormModal/ON_CHANGE_RELATION_TARGET",d="ContentTypeBuilder/FormModal/ON_CHANGE_RELATION_TYPE",g="ContentTypeBuilder/FormModal/RESET_PROPS",E="ContentTypeBuilder/FormModal/RESET_PROPS_AND_SET_FORM_FOR_ADDING_AN_EXISTING_COMPO",m="ContentTypeBuilder/FormModal/RESET_PROPS_AND_SAVE_CURRENT_DATA",C="ContentTypeBuilder/FormModal/RESET_PROPS_AND_SET_THE_FORM_FOR_ADDING_A_COMPO_TO_A_DZ",x="ContentTypeBuilder/FormModal/SET_DATA_TO_EDIT",P="ContentTypeBuilder/FormModal/SET_ATTRIBUTE_DATA_SCHEMA",T="ContentTypeBuilder/FormModal/SET_CUSTOM_FIELD_DATA_SCHEMA",O="ContentTypeBuilder/FormModal/SET_DYNAMIC_ZONE_DATA_SCHEMA",w="ContentTypeBuilder/FormModal/SET_ERRORS"},61738:function(_,b,i){"use strict";i.d(b,{Z:function(){return $},E:function(){return V}});var l=i(97889),f=i(3040),d=i.n(f),g=i(54002),E=i.n(g),m=i(24443),C=i.n(m),x=i(11165),P=i(43658),T=i(52486),O=i(72666);const w=(U,N)=>{if(N.items)return N.items.reduce(w,U);if("defaultValue"in N){const{name:k,defaultValue:j}=N;U.push({name:k,defaultValue:j})}return U},R=U=>["manyToMany","oneToMany","manyWay"].includes(U)?2:1,F=U=>["manyToMany","manyToOne"].includes(U)?2:1,V={formErrors:{},modifiedData:{},initialData:{},componentToCreate:{},isCreatingComponentWhileAddingAField:!1};var $=(U=V,N)=>(0,l.ZP)(U,k=>{switch(N.type){case T.P0:{const{keys:j,value:z}=N,K=U.modifiedData;if(Boolean(K.default)&&j.length===1&&j.includes("type")){const Y=K.type;Y&&["date","datetime","time"].includes(Y)&&delete k.modifiedData.default}d()(k,["modifiedData",...j],z);break}case T.aG:{const{target:{oneThatIsCreatingARelationWithAnother:j,selectedContentTypeFriendlyName:z,targetContentTypeAllowedRelations:K,value:G}}=N;let Y=!1,ae=null;d()(k,["modifiedData","target"],G);const Ce=U.modifiedData;if(Array.isArray(K)){const te=(0,x.Z)(Ce.relation,Ce.targetAttribute);if(!K.includes(te)){const q=K[0];Y=!0,ae=q,q==="oneWay"?d()(k,["modifiedData","relation"],"oneToOne"):q==="manyWay"?d()(k,["modifiedData","relation"],"oneToMany"):d()(k,["modifiedData","relation"],q)}}let J;if(Y?J=C()(E()((0,P.Z)(z)),R(ae)):J=C()(E()((0,P.Z)(z)),R(Ce.relation)),d()(k,["modifiedData","name"],J),U.modifiedData.targetAttribute===null)break;if(Y&&["oneWay","manyWay"].includes(ae)){d()(k,["modifiedData","targetAttribute"],null);break}const be=C()(E()((0,P.Z)(j)),F(Ce.relation));d()(k,["modifiedData","targetAttribute"],be);break}case T.QQ:{const{target:{oneThatIsCreatingARelationWithAnother:j,value:z}}=N,K=U.modifiedData.name;if(!["oneWay","manyWay"].includes(z)){d()(k,["modifiedData","relation"],z);const G=U.modifiedData.targetAttribute;d()(k,["modifiedData","name"],C()(E()((0,P.Z)(K)),R(z))),d()(k,["modifiedData","targetAttribute"],C()(G||E()((0,P.Z)(j)),F(z)));break}if(z==="oneWay"){d()(k,["modifiedData","relation"],"oneToOne"),d()(k,["modifiedData","targetAttribute"],null),d()(k,["modifiedData","name"],C()(E()(K),1));break}d()(k,["modifiedData","relation"],"oneToMany"),d()(k,["modifiedData","targetAttribute"],null),d()(k,["modifiedData","name"],C()(E()(K),2));break}case T.c2:return V;case T.yC:return{...V,modifiedData:{type:"component",repeatable:!0,...N.options}};case T.oF:{const j=U.modifiedData.componentToCreate,z={displayName:j.displayName,type:"component",repeatable:!1,...N.options,component:(0,O.N)(j.displayName,j.category)};return{...V,componentToCreate:j,modifiedData:z,isCreatingComponentWhileAddingAField:U.modifiedData.createComponent}}case T.I:{const z={...U.modifiedData,createComponent:!0,componentToCreate:{type:"component"}};return{...V,modifiedData:z}}case T._H:{k.modifiedData=N.data,k.initialData=N.data;break}case T.S0:{const{attributeType:j,isEditing:z,modifiedDataToSetForEditing:K,nameToSetForRelation:G,targetUid:Y,step:ae,options:Ce={}}=N;if(z){k.modifiedData=K,k.initialData=K;break}let J;j==="component"?ae==="1"?J={type:"component",createComponent:!0,componentToCreate:{type:"component"}}:J={...Ce,type:"component",repeatable:!0}:j==="dynamiczone"?J={...Ce,type:"dynamiczone",components:[]}:j==="text"?J={...Ce,type:"string"}:j==="number"||j==="date"?J=Ce:j==="media"?J={allowedTypes:["images","files","videos","audios"],type:"media",multiple:!0,...Ce}:j==="enumeration"?J={...Ce,type:"enumeration",enum:[]}:j==="relation"?J={name:E()(G),relation:"oneToOne",targetAttribute:null,target:Y,type:"relation"}:J={...Ce,type:j,default:null},k.modifiedData=J;break}case T.OY:{const{customField:j,isEditing:z,modifiedDataToSetForEditing:K,options:G={}}=N;if(z){k.modifiedData=K,k.initialData=K;break}k.modifiedData={...G,type:j.type};const ae=[...j?.options?.base||[],...j?.options?.advanced||[]].reduce(w,[]);ae.length&&ae.forEach(({name:Ce,defaultValue:J})=>d()(k.modifiedData,Ce,J));break}case T.VZ:{k.modifiedData=N.attributeToEdit,k.initialData=N.attributeToEdit;break}case T.Ey:{k.formErrors=N.errors;break}default:return k}})},72666:function(_,b,i){"use strict";i.d(b,{E:function(){return f},N:function(){return d}});var l=i(43658);const f=g=>{const E=(0,l.Z)(g);return`api::${E}.${E}`},d=(g,E)=>`${(0,l.Z)(E)}.${(0,l.Z)(g)}`},63338:function(_,b,i){"use strict";i.d(b,{_:function(){return l}});const l={main:[{action:"plugin::content-type-builder.read",subject:null}]}},81611:function(_,b,i){"use strict";i.d(b,{default:function(){return j}});var l=i(30126),f=i(97314),d=i(32735),g=i(42498),m=()=>d.createElement(g.Z,null),C=i(63338),x=i(53728),P=i(41486),T=i(61738),w={[`${x.Z}_formModal`]:T.Z,[`${x.Z}_dataManagerProvider`]:P.Z},R=i(99381),F=i.n(R),V=i(33795),L=i.n(V),$=i(24346),N={components:{inputs:{},add({id:z,component:K}){this.inputs[z]||(this.inputs[z]=K)}},types:{attribute:{},contentType:{validators:[],form:{advanced:[],base:[]}},component:{validators:[],form:{advanced:[],base:[]}}},contentTypeSchemaMutations:[],addContentTypeSchemaMutation(z){this.contentTypeSchemaMutations.push(z)},extendContentType({validator:z,form:{advanced:K,base:G}}){const{contentType:Y}=this.types;Y.validators.push(z),Y.form.advanced.push(K),Y.form.base.push(G)},extendFields(z,{validator:K,form:{advanced:G,base:Y}}){const ae=this.types.attribute;z.forEach(Ce=>{ae[Ce]||(ae[Ce]={validators:[],form:{advanced:[],base:[]}}),ae[Ce].validators.push(K),ae[Ce].form.advanced.push(G),ae[Ce].form.base.push(Y)})},getAdvancedForm(z,K=null){return L()(this.types,[...z,"form","advanced"],[]).reduce((Y,ae)=>{const Ce=ae(K);return[...Y,...Ce]},[])},makeCustomFieldValidator(z,K,...G){return K?z.shape({options:$.Ry().shape(K(G))}):z},makeValidator(z,K,...G){const ae=L()(this.types,[...z,"validators"],[]).reduce((Ce,J)=>{const le=J(G);return{...Ce,...le}},{});return K.shape({pluginOptions:$.Ry().shape(ae)})},mutateContentTypeSchema(z,K){let G=F()(z);const Y=F()(K);return this.contentTypeSchemaMutations.forEach(ae=>{G=ae(G,Y)}),G}};const k=f.s1.u2;var j={register(z){z.addReducers(w),z.addMenuLink({to:`/plugins/${x.Z}`,icon:m,intlLabel:{id:`${x.Z}.plugin.name`,defaultMessage:"Content Types Builder"},permissions:C._.main,async Component(){return await Promise.all([i.e(3021),i.e(6715),i.e(8880)]).then(i.bind(i,27214))}}),z.registerPlugin({id:x.Z,name:k,apis:{forms:N}})},bootstrap(){},async registerTrads({locales:z}){const K=await Promise.all(z.map(G=>i(31866)(`./${G}.json`).then(({default:Y})=>({data:(0,l.jV)(Y,x.Z),locale:G})).catch(()=>({data:{},locale:G}))));return Promise.resolve(K)}}},53728:function(_,b,i){"use strict";var l=i(97314);const f=l.u2.replace(/^@strapi\/plugin-/i,"");b.Z=f},11165:function(_,b){"use strict";const i=(l,f)=>{const d=f==null;return l==="oneToOne"&&d?"oneWay":l==="oneToMany"&&d?"manyWay":l};b.Z=i},19323:function(_,b){"use strict";const i=l=>[...new Set(l)];b.Z=i},43658:function(_,b,i){"use strict";var l=i(40791),f=i.n(l);const d=g=>f()(g,{separator:"-"});b.Z=d},35631:function(_,b,i){"use strict";_.exports=i(81611).default},7597:function(_,b,i){"use strict";i.d(b,{_:function(){return l}});const l={settings:[{action:"plugin::email.settings.read",subject:null}]}},84004:function(_,b,i){"use strict";var l=i(30126),f=i(7597);b.default={register(d){d.createSettingSection({id:"email",intlLabel:{id:"email.SettingsNav.section-label",defaultMessage:"Email Plugin"}},[{intlLabel:{id:"email.Settings.email.plugin.title",defaultMessage:"Settings"},id:"settings",to:"/settings/email",async Component(){return await i.e(1495).then(i.bind(i,34570))},permissions:f._.settings}]),d.registerPlugin({id:"email",name:"email"})},bootstrap(){},async registerTrads({locales:d}){const g=await Promise.all(d.map(E=>i(38182)(`./${E}.json`).then(({default:m})=>({data:(0,l.jV)(m,"email"),locale:E})).catch(()=>({data:{},locale:E}))));return Promise.resolve(g)}}},77131:function(_,b,i){"use strict";_.exports=i(84004).default},30126:function(_,b,i){"use strict";i.d(b,{Hn:function(){return wf},iq:function(){return Uf},m$:function(){return Fu},O4:function(){return nd},jW:function(){return Gc},QH:function(){return nu},Y_:function(){return ce},W1:function(){return et},MG:function(){return mn},tM:function(){return nr},c4:function(){return dr},x7:function(){return ri},W$:function(){return Ki},J5:function(){return $i},l0:function(){return Lo},jm:function(){return xo},Zc:function(){return ns},rt:function(){return ws},rU:function(){return is},Qj:function(){return Ia},dO:function(){return bu},dJ:function(){return Qo},ZF:function(){return Df},X0:function(){return bc},N$:function(){return Xs},w7:function(){return qs},v4:function(){return Bu},tU:function(){return Pf},oL:function(){return Af},JV:function(){return Ll},ij:function(){return zf},fG:function(){return ku},m:function(){return xu},SL:function(){return Rf},fz:function(){return Uu},qb:function(){return Za},_Y:function(){return $o},iA:function(){return Bs},L8:function(){return zs},I8:function(){return Ga},w6:function(){return Wu},e5:function(){return Vs},ZT:function(){return Qc},dU:function(){return zu},nn:function(){return Vu},tg:function(){return Vf},mD:function(){return gl},k2:function(){return Ma},UN:function(){return Hu},CJ:function(){return sr},qX:function(){return pi},OT:function(){return Mi},X7:function(){return Gi},CR:function(){return ao},jV:function(){return Io},Q1:function(){return os},UW:function(){return Cc},I0:function(){return Xc},So:function(){return va},L7:function(){return Zl},Vu:function(){return ol},Wq:function(){return hd},W6:function(){return Zu},VP:function(){return If},Xe:function(){return rd},mZ:function(){return Ku},kY:function(){return pd},L0:function(){return Hf},E2:function(){return Mc},go:function(){return id},c1:function(){return Sc},yX:function(){return od},F5:function(){return md},lm:function(){return Zf},o1:function(){return Kf},Yw:function(){return kd},aM:function(){return Od},Kx:function(){return Td},ss:function(){return wd},vn:function(){return Mu},Uq:function(){return qc},j1:function(){return Oc},Sh:function(){return sl},rS:function(){return Rs}});var l=i(33795),f=i.n(l),d=i(32735),g=i(74512),E=i(96377),m=i(42567),C=i(17626),x=i(98610),P=i(8471);const T=Z=>{switch(Z){case"danger":return"danger100";case"success":return"success100";case"warning":return"warning100";default:return"primary100"}},O=Z=>T(Z).replace("100","200"),w=({theme:Z,variant:me})=>me==="danger"?Z.colors.danger700:me==="success"?Z.colors.success700:me==="warning"?Z.colors.warning700:Z.colors.primary700;var R=i(59619),F=i(77981),V=i(84642),L=i(8365);const $=(0,P.ZP)(F.x)`
335
335
  svg {
336
336
  height: 100%;
337
337
  width: 100%;
@@ -392,7 +392,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
392
392
  pointer-events: none;
393
393
  `:void 0}
394
394
  `,Ee=({children:Z,to:me,...Le})=>{const{activePage:nt}=Se(),oe=nt===1;return(0,g.jsxs)(ye,{to:oe?"#":me,"aria-disabled":oe,tabIndex:oe?-1:void 0,...Le,children:[(0,g.jsx)(tt.T,{children:Z}),(0,g.jsx)(be.Z,{"aria-hidden":!0})]})};Ee.displayName="PreviousLink";const _e=({children:Z,to:me,...Le})=>{const{activePage:nt,pageCount:oe}=Se(),wt=nt===oe;return(0,g.jsxs)(ye,{to:wt?"#":me,"aria-disabled":wt,tabIndex:wt?-1:void 0,...Le,children:[(0,g.jsx)(tt.T,{children:Z}),(0,g.jsx)(te.Z,{"aria-hidden":!0})]})};_e.displayName="NextLink";const We=({number:Z,children:me,...Le})=>{const{activePage:nt}=Se(),oe=nt===Z;return(0,g.jsxs)(Pe,{...Le,active:oe,children:[(0,g.jsx)(tt.T,{children:me}),(0,g.jsx)(L.Z,{"aria-hidden":!0,fontWeight:oe?"bold":void 0,lineHeight:"revert",variant:"pi",children:Z})]})};We.displayName="PageLink";const Ie=({children:Z,...me})=>(0,g.jsxs)(F.x,{...me,children:[(0,g.jsx)(tt.T,{children:Z}),(0,g.jsx)(L.Z,{"aria-hidden":!0,lineHeight:"revert",textColor:"neutral800",variant:"pi",children:"\u2026"})]});var Fe=i(80564),ut=i(750),ht=i(37561),Ot=i(18129),Ue=i(14763),at=i(90163),Pt=i(35547),lt=i(8919),kt=i(40260);const nn=({children:Z,label:me="Pagination",activePage:Le,pageCount:nt})=>{const oe=d.useMemo(()=>({activePage:Le,pageCount:nt}),[Le,nt]);return(0,g.jsx)(ee.Provider,{value:oe,children:(0,g.jsx)(F.x,{"aria-label":me,as:"nav",children:(0,g.jsx)(V.k,{as:"ol",gap:1,children:d.Children.map(Z,(wt,Ft)=>(0,g.jsx)("li",{children:wt},Ft))})})})};var hn=i(63208),Rn=i(56116),kn=i(41604),$t=i(16773),yn=i(4987),Yn=i(23699),cn=i(35435),st=i(1690),on=i(27947),dt=i(2846),Dt=i(15367),Ht=i(41013),rn=i(7993),ke=i(70420),ct=i(11349),D=i(45037),W=i(91917),re=i(31797),Oe=i(23982),Ze=i(86332),pt=i(29213),$e=i(10364),Re=i(62161);const Be=Z=>(0,g.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...Z,children:(0,g.jsx)("rect",{width:24,height:5,y:9.5,fill:"#212134",rx:.2})}),Ne=Be;var bt=i(82064),Kt=i(69321),an=i(17229),In=i(94997),rr=i(60216),Wn=i.n(rr),gr=i(67879),fr=i(53038),Rr=i(41190),Vr=i(90431),ei=i(86834),Ct=i.n(ei),St=i(79922),Pn=i.n(St),Qt=i(48344),qn=i.n(Qt),Tt=i(59177),fe=i(84306),ve=i(33348),Qe=i.n(ve),jt=i(36866),bn=i.n(jt),zn=i(907),Cr=i(24319),Zr=i(96256);function Jr(Z,me){var Le,nt;(0,Zr.Z)(1,arguments);var oe=(0,zn.Z)(Z);if(isNaN(oe.getTime()))throw new RangeError("Invalid time value");var wt=String((Le=me?.format)!==null&&Le!==void 0?Le:"extended"),Ft=String((nt=me?.representation)!==null&&nt!==void 0?nt:"complete");if(wt!=="extended"&&wt!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(Ft!=="date"&&Ft!=="time"&&Ft!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var Je="",Nt="",sn=wt==="extended"?"-":"",Dn=wt==="extended"?":":"";if(Ft!=="time"){var Kn=(0,Cr.Z)(oe.getDate(),2),Dr=(0,Cr.Z)(oe.getMonth()+1,2),mr=(0,Cr.Z)(oe.getFullYear(),4);Je="".concat(mr).concat(sn).concat(Dr).concat(sn).concat(Kn)}if(Ft!=="date"){var Nr=oe.getTimezoneOffset();if(Nr!==0){var ti=Math.abs(Nr),Tr=(0,Cr.Z)(Math.floor(ti/60),2),Ai=(0,Cr.Z)(ti%60,2),Yi=Nr<0?"+":"-";Nt="".concat(Yi).concat(Tr,":").concat(Ai)}else Nt="Z";var yi=(0,Cr.Z)(oe.getHours(),2),Ji=(0,Cr.Z)(oe.getMinutes(),2),ko=(0,Cr.Z)(oe.getSeconds(),2),Ri=Je===""?"":"T",jo=[yi,Ji,ko].join(Dn);Je="".concat(Je).concat(Ri).concat(jo).concat(Nt)}return Je}var _r=i(92802),Xn=i(67582),mt=i(37755),Ke=i(92577),Mt=i(13613),tn=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Fn(Z){var me=Z.defaultInputValue,Le=me===void 0?"":me,nt=Z.defaultMenuIsOpen,oe=nt===void 0?!1:nt,wt=Z.defaultValue,Ft=wt===void 0?null:wt,Je=Z.inputValue,Nt=Z.menuIsOpen,sn=Z.onChange,Dn=Z.onInputChange,Kn=Z.onMenuClose,Dr=Z.onMenuOpen,mr=Z.value,Nr=(0,Mt.Z)(Z,tn),ti=(0,d.useState)(Je!==void 0?Je:Le),Tr=(0,Ke.Z)(ti,2),Ai=Tr[0],Yi=Tr[1],yi=(0,d.useState)(Nt!==void 0?Nt:oe),Ji=(0,Ke.Z)(yi,2),ko=Ji[0],Ri=Ji[1],jo=(0,d.useState)(mr!==void 0?mr:Ft),vo=(0,Ke.Z)(jo,2),Cs=vo[0],al=vo[1],fs=(0,d.useCallback)(function(ea,ll){typeof sn=="function"&&sn(ea,ll),al(ea)},[sn]),ps=(0,d.useCallback)(function(ea,ll){var vl;typeof Dn=="function"&&(vl=Dn(ea,ll)),Yi(vl!==void 0?vl:ea)},[Dn]),ys=(0,d.useCallback)(function(){typeof Dr=="function"&&Dr(),Ri(!0)},[Dr]),Xi=(0,d.useCallback)(function(){typeof Kn=="function"&&Kn(),Ri(!1)},[Kn]),ls=Je!==void 0?Je:Ai,_a=Nt!==void 0?Nt:ko,Ya=mr!==void 0?mr:Cs;return(0,mt.Z)((0,mt.Z)({},Nr),{},{inputValue:ls,menuIsOpen:_a,onChange:fs,onInputChange:ps,onMenuClose:Xi,onMenuOpen:ys,value:Ya})}var Cn=i(20011);function Bn(Z,me){if(!(Z instanceof me))throw new TypeError("Cannot call a class as a function")}var Ge=i(63525);function At(Z,me){for(var Le=0;Le<me.length;Le++){var nt=me[Le];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(Z,(0,Ge.Z)(nt.key),nt)}}function Bt(Z,me,Le){return me&&At(Z.prototype,me),Le&&At(Z,Le),Object.defineProperty(Z,"prototype",{writable:!1}),Z}var Zt=i(45901);function Yt(Z,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function");Z.prototype=Object.create(me&&me.prototype,{constructor:{value:Z,writable:!0,configurable:!0}}),Object.defineProperty(Z,"prototype",{writable:!1}),me&&(0,Zt.Z)(Z,me)}function vn(Z){return vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Le){return Le.__proto__||Object.getPrototypeOf(Le)},vn(Z)}function Un(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var tr=i(36655),Nn=i(93173);function Vn(Z,me){if(me&&((0,tr.Z)(me)==="object"||typeof me=="function"))return me;if(me!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(0,Nn.Z)(Z)}function Ye(Z){var me=Un();return function(){var nt=vn(Z),oe;if(me){var wt=vn(this).constructor;oe=Reflect.construct(nt,arguments,wt)}else oe=nt.apply(this,arguments);return Vn(this,oe)}}var de=i(37017);function ne(Z){if(Array.isArray(Z))return(0,de.Z)(Z)}function ge(Z){if(typeof Symbol<"u"&&Z[Symbol.iterator]!=null||Z["@@iterator"]!=null)return Array.from(Z)}var je=i(49139);function He(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
395
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function it(Z){return ne(Z)||ge(Z)||(0,je.Z)(Z)||He()}var Rt=i(97830),fn=Number.isNaN||function(me){return typeof me=="number"&&me!==me};function qt(Z,me){return!!(Z===me||fn(Z)&&fn(me))}function Vt(Z,me){if(Z.length!==me.length)return!1;for(var Le=0;Le<Z.length;Le++)if(!qt(Z[Le],me[Le]))return!1;return!0}function Jt(Z,me){me===void 0&&(me=Vt);var Le=null;function nt(){for(var oe=[],wt=0;wt<arguments.length;wt++)oe[wt]=arguments[wt];if(Le&&Le.lastThis===this&&me(oe,Le.lastArgs))return Le.lastResult;var Ft=Z.apply(this,oe);return Le={lastResult:Ft,lastArgs:oe,lastThis:this},Ft}return nt.clear=function(){Le=null},nt}function dn(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var Jn={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Hn=function(me){return(0,Rt.tZ)("span",(0,Cn.Z)({css:Jn},me))},Ir={guidance:function(me){var Le=me.isSearchable,nt=me.isMulti,oe=me.isDisabled,wt=me.tabSelectsValue,Ft=me.context;switch(Ft){case"menu":return"Use Up and Down to choose options".concat(oe?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(wt?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(me["aria-label"]||"Select"," is focused ").concat(Le?",type to refine list":"",", press Down to open the menu, ").concat(nt?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(me){var Le=me.action,nt=me.label,oe=nt===void 0?"":nt,wt=me.labels,Ft=me.isDisabled;switch(Le){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(oe,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(wt.length>1?"s":""," ").concat(wt.join(","),", selected.");case"select-option":return Ft?"option ".concat(oe," is disabled. Select another option."):"option ".concat(oe,", selected.");default:return""}},onFocus:function(me){var Le=me.context,nt=me.focused,oe=me.options,wt=me.label,Ft=wt===void 0?"":wt,Je=me.selectValue,Nt=me.isDisabled,sn=me.isSelected,Dn=function(Nr,ti){return Nr&&Nr.length?"".concat(Nr.indexOf(ti)+1," of ").concat(Nr.length):""};if(Le==="value"&&Je)return"value ".concat(Ft," focused, ").concat(Dn(Je,nt),".");if(Le==="menu"){var Kn=Nt?" disabled":"",Dr="".concat(sn?"selected":"focused").concat(Kn);return"option ".concat(Ft," ").concat(Dr,", ").concat(Dn(oe,nt),".")}return""},onFilter:function(me){var Le=me.inputValue,nt=me.resultsMessage;return"".concat(nt).concat(Le?" for search term "+Le:"",".")}},vr=function(me){var Le=me.ariaSelection,nt=me.focusedOption,oe=me.focusedValue,wt=me.focusableOptions,Ft=me.isFocused,Je=me.selectValue,Nt=me.selectProps,sn=me.id,Dn=Nt.ariaLiveMessages,Kn=Nt.getOptionLabel,Dr=Nt.inputValue,mr=Nt.isMulti,Nr=Nt.isOptionDisabled,ti=Nt.isSearchable,Tr=Nt.menuIsOpen,Ai=Nt.options,Yi=Nt.screenReaderStatus,yi=Nt.tabSelectsValue,Ji=Nt["aria-label"],ko=Nt["aria-live"],Ri=(0,d.useMemo)(function(){return(0,mt.Z)((0,mt.Z)({},Ir),Dn||{})},[Dn]),jo=(0,d.useMemo)(function(){var Xi="";if(Le&&Ri.onChange){var ls=Le.option,_a=Le.options,Ya=Le.removedValue,ea=Le.removedValues,ll=Le.value,vl=function(Ve){return Array.isArray(Ve)?null:Ve},c=Ya||ls||vl(ll),h=c?Kn(c):"",M=_a||ea||void 0,I=M?M.map(Kn):[],Q=(0,mt.Z)({isDisabled:c&&Nr(c,Je),label:h,labels:I},Le);Xi=Ri.onChange(Q)}return Xi},[Le,Ri,Nr,Je,Kn]),vo=(0,d.useMemo)(function(){var Xi="",ls=nt||oe,_a=!!(nt&&Je&&Je.includes(nt));if(ls&&Ri.onFocus){var Ya={focused:ls,label:Kn(ls),isDisabled:Nr(ls,Je),isSelected:_a,options:wt,context:ls===nt?"menu":"value",selectValue:Je};Xi=Ri.onFocus(Ya)}return Xi},[nt,oe,Kn,Nr,Ri,wt,Je]),Cs=(0,d.useMemo)(function(){var Xi="";if(Tr&&Ai.length&&Ri.onFilter){var ls=Yi({count:wt.length});Xi=Ri.onFilter({inputValue:Dr,resultsMessage:ls})}return Xi},[wt,Dr,Tr,Ri,Ai,Yi]),al=(0,d.useMemo)(function(){var Xi="";if(Ri.guidance){var ls=oe?"value":Tr?"menu":"input";Xi=Ri.guidance({"aria-label":Ji,context:ls,isDisabled:nt&&Nr(nt,Je),isMulti:mr,isSearchable:ti,tabSelectsValue:yi})}return Xi},[Ji,nt,oe,mr,Nr,ti,Tr,Ri,Je,yi]),fs="".concat(vo," ").concat(Cs," ").concat(al),ps=(0,Rt.tZ)(d.Fragment,null,(0,Rt.tZ)("span",{id:"aria-selection"},jo),(0,Rt.tZ)("span",{id:"aria-context"},fs)),ys=Le?.action==="initial-input-focus";return(0,Rt.tZ)(d.Fragment,null,(0,Rt.tZ)(Hn,{id:sn},ys&&ps),(0,Rt.tZ)(Hn,{"aria-live":ko,"aria-atomic":"false","aria-relevant":"additions text"},Ft&&!ys&&ps))},yr=[{base:"A",letters:"A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"},{base:"AA",letters:"\uA732"},{base:"AE",letters:"\xC6\u01FC\u01E2"},{base:"AO",letters:"\uA734"},{base:"AU",letters:"\uA736"},{base:"AV",letters:"\uA738\uA73A"},{base:"AY",letters:"\uA73C"},{base:"B",letters:"B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"},{base:"C",letters:"C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"},{base:"D",letters:"D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"},{base:"DZ",letters:"\u01F1\u01C4"},{base:"Dz",letters:"\u01F2\u01C5"},{base:"E",letters:"E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"},{base:"F",letters:"F\u24BB\uFF26\u1E1E\u0191\uA77B"},{base:"G",letters:"G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"},{base:"H",letters:"H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"},{base:"I",letters:"I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"},{base:"J",letters:"J\u24BF\uFF2A\u0134\u0248"},{base:"K",letters:"K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"},{base:"L",letters:"L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"},{base:"LJ",letters:"\u01C7"},{base:"Lj",letters:"\u01C8"},{base:"M",letters:"M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"},{base:"N",letters:"N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"},{base:"NJ",letters:"\u01CA"},{base:"Nj",letters:"\u01CB"},{base:"O",letters:"O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"},{base:"OI",letters:"\u01A2"},{base:"OO",letters:"\uA74E"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"},{base:"Q",letters:"Q\u24C6\uFF31\uA756\uA758\u024A"},{base:"R",letters:"R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"},{base:"S",letters:"S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"},{base:"T",letters:"T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"},{base:"TZ",letters:"\uA728"},{base:"U",letters:"U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"},{base:"V",letters:"V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"},{base:"VY",letters:"\uA760"},{base:"W",letters:"W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"},{base:"X",letters:"X\u24CD\uFF38\u1E8A\u1E8C"},{base:"Y",letters:"Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"},{base:"Z",letters:"Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"},{base:"a",letters:"a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"},{base:"aa",letters:"\uA733"},{base:"ae",letters:"\xE6\u01FD\u01E3"},{base:"ao",letters:"\uA735"},{base:"au",letters:"\uA737"},{base:"av",letters:"\uA739\uA73B"},{base:"ay",letters:"\uA73D"},{base:"b",letters:"b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"},{base:"c",letters:"c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"},{base:"d",letters:"d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"},{base:"dz",letters:"\u01F3\u01C6"},{base:"e",letters:"e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"},{base:"f",letters:"f\u24D5\uFF46\u1E1F\u0192\uA77C"},{base:"g",letters:"g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"},{base:"h",letters:"h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"},{base:"j",letters:"j\u24D9\uFF4A\u0135\u01F0\u0249"},{base:"k",letters:"k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"},{base:"l",letters:"l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"},{base:"lj",letters:"\u01C9"},{base:"m",letters:"m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"},{base:"n",letters:"n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"},{base:"nj",letters:"\u01CC"},{base:"o",letters:"o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"},{base:"oi",letters:"\u01A3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\uA74F"},{base:"p",letters:"p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"},{base:"q",letters:"q\u24E0\uFF51\u024B\uA757\uA759"},{base:"r",letters:"r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"},{base:"s",letters:"s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"},{base:"t",letters:"t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"},{base:"tz",letters:"\uA729"},{base:"u",letters:"u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"},{base:"v",letters:"v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"},{base:"vy",letters:"\uA761"},{base:"w",letters:"w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"},{base:"x",letters:"x\u24E7\uFF58\u1E8B\u1E8D"},{base:"y",letters:"y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"},{base:"z",letters:"z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"}],Er=new RegExp("["+yr.map(function(Z){return Z.letters}).join("")+"]","g"),Or={},we=0;we<yr.length;we++)for(var ue=yr[we],Te=0;Te<ue.letters.length;Te++)Or[ue.letters[Te]]=ue.base;var ze=function(me){return me.replace(Er,function(Le){return Or[Le]})},ft=Jt(ze),yt=function(me){return me.replace(/^\s+|\s+$/g,"")},ln=function(me){return"".concat(me.label," ").concat(me.value)},En=function(me){return function(Le,nt){if(Le.data.__isNew__)return!0;var oe=(0,mt.Z)({ignoreCase:!0,ignoreAccents:!0,stringify:ln,trim:!0,matchFrom:"any"},me),wt=oe.ignoreCase,Ft=oe.ignoreAccents,Je=oe.stringify,Nt=oe.trim,sn=oe.matchFrom,Dn=Nt?yt(nt):nt,Kn=Nt?yt(Je(Le)):Je(Le);return wt&&(Dn=Dn.toLowerCase(),Kn=Kn.toLowerCase()),Ft&&(Dn=ft(Dn),Kn=ze(Kn)),sn==="start"?Kn.substr(0,Dn.length)===Dn:Kn.indexOf(Dn)>-1}},jr=["innerRef"];function ot(Z){var me=Z.innerRef,Le=(0,Mt.Z)(Z,jr),nt=(0,Xn.r)(Le,"onExited","in","enter","exit","appear");return(0,Rt.tZ)("input",(0,Cn.Z)({ref:me},nt,{css:(0,Rt.iv)({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var zt=function(me){me.preventDefault(),me.stopPropagation()};function Ut(Z){var me=Z.isEnabled,Le=Z.onBottomArrive,nt=Z.onBottomLeave,oe=Z.onTopArrive,wt=Z.onTopLeave,Ft=(0,d.useRef)(!1),Je=(0,d.useRef)(!1),Nt=(0,d.useRef)(0),sn=(0,d.useRef)(null),Dn=(0,d.useCallback)(function(Tr,Ai){if(sn.current!==null){var Yi=sn.current,yi=Yi.scrollTop,Ji=Yi.scrollHeight,ko=Yi.clientHeight,Ri=sn.current,jo=Ai>0,vo=Ji-ko-yi,Cs=!1;vo>Ai&&Ft.current&&(nt&&nt(Tr),Ft.current=!1),jo&&Je.current&&(wt&&wt(Tr),Je.current=!1),jo&&Ai>vo?(Le&&!Ft.current&&Le(Tr),Ri.scrollTop=Ji,Cs=!0,Ft.current=!0):!jo&&-Ai>yi&&(oe&&!Je.current&&oe(Tr),Ri.scrollTop=0,Cs=!0,Je.current=!0),Cs&&zt(Tr)}},[Le,nt,oe,wt]),Kn=(0,d.useCallback)(function(Tr){Dn(Tr,Tr.deltaY)},[Dn]),Dr=(0,d.useCallback)(function(Tr){Nt.current=Tr.changedTouches[0].clientY},[]),mr=(0,d.useCallback)(function(Tr){var Ai=Nt.current-Tr.changedTouches[0].clientY;Dn(Tr,Ai)},[Dn]),Nr=(0,d.useCallback)(function(Tr){if(Tr){var Ai=Xn.s?{passive:!1}:!1;Tr.addEventListener("wheel",Kn,Ai),Tr.addEventListener("touchstart",Dr,Ai),Tr.addEventListener("touchmove",mr,Ai)}},[mr,Dr,Kn]),ti=(0,d.useCallback)(function(Tr){Tr&&(Tr.removeEventListener("wheel",Kn,!1),Tr.removeEventListener("touchstart",Dr,!1),Tr.removeEventListener("touchmove",mr,!1))},[mr,Dr,Kn]);return(0,d.useEffect)(function(){if(me){var Tr=sn.current;return Nr(Tr),function(){ti(Tr)}}},[me,Nr,ti]),function(Tr){sn.current=Tr}}var Ln=["boxSizing","height","overflow","paddingRight","position"],Gn={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function xn(Z){Z.preventDefault()}function ur(Z){Z.stopPropagation()}function Sr(){var Z=this.scrollTop,me=this.scrollHeight,Le=Z+this.offsetHeight;Z===0?this.scrollTop=1:Le===me&&(this.scrollTop=Z-1)}function Fr(){return"ontouchstart"in window||navigator.maxTouchPoints}var ni=!!(typeof window<"u"&&window.document&&window.document.createElement),di=0,Ar={capture:!1,passive:!1};function ai(Z){var me=Z.isEnabled,Le=Z.accountForScrollbars,nt=Le===void 0?!0:Le,oe=(0,d.useRef)({}),wt=(0,d.useRef)(null),Ft=(0,d.useCallback)(function(Nt){if(ni){var sn=document.body,Dn=sn&&sn.style;if(nt&&Ln.forEach(function(Nr){var ti=Dn&&Dn[Nr];oe.current[Nr]=ti}),nt&&di<1){var Kn=parseInt(oe.current.paddingRight,10)||0,Dr=document.body?document.body.clientWidth:0,mr=window.innerWidth-Dr+Kn||0;Object.keys(Gn).forEach(function(Nr){var ti=Gn[Nr];Dn&&(Dn[Nr]=ti)}),Dn&&(Dn.paddingRight="".concat(mr,"px"))}sn&&Fr()&&(sn.addEventListener("touchmove",xn,Ar),Nt&&(Nt.addEventListener("touchstart",Sr,Ar),Nt.addEventListener("touchmove",ur,Ar))),di+=1}},[nt]),Je=(0,d.useCallback)(function(Nt){if(ni){var sn=document.body,Dn=sn&&sn.style;di=Math.max(di-1,0),nt&&di<1&&Ln.forEach(function(Kn){var Dr=oe.current[Kn];Dn&&(Dn[Kn]=Dr)}),sn&&Fr()&&(sn.removeEventListener("touchmove",xn,Ar),Nt&&(Nt.removeEventListener("touchstart",Sr,Ar),Nt.removeEventListener("touchmove",ur,Ar)))}},[nt]);return(0,d.useEffect)(function(){if(me){var Nt=wt.current;return Ft(Nt),function(){Je(Nt)}}},[me,Ft,Je]),function(Nt){wt.current=Nt}}function Oi(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var $r=function(){return document.activeElement&&document.activeElement.blur()},_i={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Wi(Z){var me=Z.children,Le=Z.lockEnabled,nt=Z.captureEnabled,oe=nt===void 0?!0:nt,wt=Z.onBottomArrive,Ft=Z.onBottomLeave,Je=Z.onTopArrive,Nt=Z.onTopLeave,sn=Ut({isEnabled:oe,onBottomArrive:wt,onBottomLeave:Ft,onTopArrive:Je,onTopLeave:Nt}),Dn=ai({isEnabled:Le}),Kn=function(mr){sn(mr),Dn(mr)};return(0,Rt.tZ)(d.Fragment,null,Le&&(0,Rt.tZ)("div",{onClick:$r,css:_i}),me(Kn))}function so(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var yo={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},to=function(me){var Le=me.name,nt=me.onFocus;return(0,Rt.tZ)("input",{required:!0,name:Le,tabIndex:-1,onFocus:nt,css:yo,value:"",onChange:function(){}})},Xe=function(me){return me.label},De=function(me){return me.label},_t=function(me){return me.value},Et=function(me){return!!me.isDisabled},Xt={clearIndicator:Xn.a,container:Xn.b,control:Xn.d,dropdownIndicator:Xn.e,group:Xn.g,groupHeading:Xn.f,indicatorsContainer:Xn.i,indicatorSeparator:Xn.h,input:Xn.j,loadingIndicator:Xn.l,loadingMessage:Xn.k,menu:Xn.m,menuList:Xn.n,menuPortal:Xn.o,multiValue:Xn.p,multiValueLabel:Xn.q,multiValueRemove:Xn.t,noOptionsMessage:Xn.u,option:Xn.v,placeholder:Xn.w,singleValue:Xn.x,valueContainer:Xn.y};function Sn(Z){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Le=_objectSpread({},Z);return Object.keys(me).forEach(function(nt){var oe=nt;Z[oe]?Le[oe]=function(wt,Ft){return me[oe](Z[oe](wt,Ft),Ft)}:Le[oe]=me[oe]}),Le}var On={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},jn=4,cr=4,ii=38,li=cr*2,Yr={baseUnit:cr,controlHeight:ii,menuGutter:li},oi={borderRadius:jn,colors:On,spacing:Yr},qr={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:(0,Xn.z)(),captureMenuScroll:!(0,Xn.z)(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:En(),formatGroupLabel:Xe,getOptionLabel:De,getOptionValue:_t,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Et,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!(0,Xn.A)(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(me){var Le=me.count;return"".concat(Le," result").concat(Le!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function gi(Z,me,Le,nt){var oe=Eo(Z,me,Le),wt=hi(Z,me,Le),Ft=ho(Z,me),Je=Hi(Z,me);return{type:"option",data:me,isDisabled:oe,isSelected:wt,label:Ft,value:Je,index:nt}}function Qi(Z,me){return Z.options.map(function(Le,nt){if("options"in Le){var oe=Le.options.map(function(Ft,Je){return gi(Z,Ft,me,Je)}).filter(function(Ft){return ui(Z,Ft)});return oe.length>0?{type:"group",data:Le,options:oe,index:nt}:void 0}var wt=gi(Z,Le,me,nt);return ui(Z,wt)?wt:void 0}).filter(Xn.G)}function zi(Z){return Z.reduce(function(me,Le){return Le.type==="group"?me.push.apply(me,it(Le.options.map(function(nt){return nt.data}))):me.push(Le.data),me},[])}function Li(Z,me){return zi(Qi(Z,me))}function ui(Z,me){var Le=Z.inputValue,nt=Le===void 0?"":Le,oe=me.data,wt=me.isSelected,Ft=me.label,Je=me.value;return(!Uo(Z)||!wt)&&wo(Z,{label:Ft,value:Je,data:oe},nt)}function Vi(Z,me){var Le=Z.focusedValue,nt=Z.selectValue,oe=nt.indexOf(Le);if(oe>-1){var wt=me.indexOf(Le);if(wt>-1)return Le;if(oe<me.length)return me[oe]}return null}function Bi(Z,me){var Le=Z.focusedOption;return Le&&me.indexOf(Le)>-1?Le:me[0]}var ho=function(me,Le){return me.getOptionLabel(Le)},Hi=function(me,Le){return me.getOptionValue(Le)};function Eo(Z,me,Le){return typeof Z.isOptionDisabled=="function"?Z.isOptionDisabled(me,Le):!1}function hi(Z,me,Le){if(Le.indexOf(me)>-1)return!0;if(typeof Z.isOptionSelected=="function")return Z.isOptionSelected(me,Le);var nt=Hi(Z,me);return Le.some(function(oe){return Hi(Z,oe)===nt})}function wo(Z,me,Le){return Z.filterOption?Z.filterOption(me,Le):!0}var Uo=function(me){var Le=me.hideSelectedOptions,nt=me.isMulti;return Le===void 0?nt:Le},ie=1,B=function(Z){Yt(Le,Z);var me=Ye(Le);function Le(nt){var oe;if(Bn(this,Le),oe=me.call(this,nt),oe.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},oe.blockOptionHover=!1,oe.isComposing=!1,oe.commonProps=void 0,oe.initialTouchX=0,oe.initialTouchY=0,oe.instancePrefix="",oe.openAfterFocus=!1,oe.scrollToFocusedOptionOnUpdate=!1,oe.userIsDragging=void 0,oe.controlRef=null,oe.getControlRef=function(Je){oe.controlRef=Je},oe.focusedOptionRef=null,oe.getFocusedOptionRef=function(Je){oe.focusedOptionRef=Je},oe.menuListRef=null,oe.getMenuListRef=function(Je){oe.menuListRef=Je},oe.inputRef=null,oe.getInputRef=function(Je){oe.inputRef=Je},oe.focus=oe.focusInput,oe.blur=oe.blurInput,oe.onChange=function(Je,Nt){var sn=oe.props,Dn=sn.onChange,Kn=sn.name;Nt.name=Kn,oe.ariaOnChange(Je,Nt),Dn(Je,Nt)},oe.setValue=function(Je,Nt,sn){var Dn=oe.props,Kn=Dn.closeMenuOnSelect,Dr=Dn.isMulti,mr=Dn.inputValue;oe.onInputChange("",{action:"set-value",prevInputValue:mr}),Kn&&(oe.setState({inputIsHiddenAfterUpdate:!Dr}),oe.onMenuClose()),oe.setState({clearFocusValueOnUpdate:!0}),oe.onChange(Je,{action:Nt,option:sn})},oe.selectOption=function(Je){var Nt=oe.props,sn=Nt.blurInputOnSelect,Dn=Nt.isMulti,Kn=Nt.name,Dr=oe.state.selectValue,mr=Dn&&oe.isOptionSelected(Je,Dr),Nr=oe.isOptionDisabled(Je,Dr);if(mr){var ti=oe.getOptionValue(Je);oe.setValue((0,Xn.B)(Dr.filter(function(Tr){return oe.getOptionValue(Tr)!==ti})),"deselect-option",Je)}else if(!Nr)Dn?oe.setValue((0,Xn.B)([].concat(it(Dr),[Je])),"select-option",Je):oe.setValue((0,Xn.C)(Je),"select-option");else{oe.ariaOnChange((0,Xn.C)(Je),{action:"select-option",option:Je,name:Kn});return}sn&&oe.blurInput()},oe.removeValue=function(Je){var Nt=oe.props.isMulti,sn=oe.state.selectValue,Dn=oe.getOptionValue(Je),Kn=sn.filter(function(mr){return oe.getOptionValue(mr)!==Dn}),Dr=(0,Xn.D)(Nt,Kn,Kn[0]||null);oe.onChange(Dr,{action:"remove-value",removedValue:Je}),oe.focusInput()},oe.clearValue=function(){var Je=oe.state.selectValue;oe.onChange((0,Xn.D)(oe.props.isMulti,[],null),{action:"clear",removedValues:Je})},oe.popValue=function(){var Je=oe.props.isMulti,Nt=oe.state.selectValue,sn=Nt[Nt.length-1],Dn=Nt.slice(0,Nt.length-1),Kn=(0,Xn.D)(Je,Dn,Dn[0]||null);oe.onChange(Kn,{action:"pop-value",removedValue:sn})},oe.getValue=function(){return oe.state.selectValue},oe.cx=function(){for(var Je=arguments.length,Nt=new Array(Je),sn=0;sn<Je;sn++)Nt[sn]=arguments[sn];return Xn.E.apply(void 0,[oe.props.classNamePrefix].concat(Nt))},oe.getOptionLabel=function(Je){return ho(oe.props,Je)},oe.getOptionValue=function(Je){return Hi(oe.props,Je)},oe.getStyles=function(Je,Nt){var sn=oe.props.unstyled,Dn=Xt[Je](Nt,sn);Dn.boxSizing="border-box";var Kn=oe.props.styles[Je];return Kn?Kn(Dn,Nt):Dn},oe.getClassNames=function(Je,Nt){var sn,Dn;return(sn=(Dn=oe.props.classNames)[Je])===null||sn===void 0?void 0:sn.call(Dn,Nt)},oe.getElementId=function(Je){return"".concat(oe.instancePrefix,"-").concat(Je)},oe.getComponents=function(){return(0,Xn.F)(oe.props)},oe.buildCategorizedOptions=function(){return Qi(oe.props,oe.state.selectValue)},oe.getCategorizedOptions=function(){return oe.props.menuIsOpen?oe.buildCategorizedOptions():[]},oe.buildFocusableOptions=function(){return zi(oe.buildCategorizedOptions())},oe.getFocusableOptions=function(){return oe.props.menuIsOpen?oe.buildFocusableOptions():[]},oe.ariaOnChange=function(Je,Nt){oe.setState({ariaSelection:(0,mt.Z)({value:Je},Nt)})},oe.onMenuMouseDown=function(Je){Je.button===0&&(Je.stopPropagation(),Je.preventDefault(),oe.focusInput())},oe.onMenuMouseMove=function(Je){oe.blockOptionHover=!1},oe.onControlMouseDown=function(Je){if(!Je.defaultPrevented){var Nt=oe.props.openMenuOnClick;oe.state.isFocused?oe.props.menuIsOpen?Je.target.tagName!=="INPUT"&&Je.target.tagName!=="TEXTAREA"&&oe.onMenuClose():Nt&&oe.openMenu("first"):(Nt&&(oe.openAfterFocus=!0),oe.focusInput()),Je.target.tagName!=="INPUT"&&Je.target.tagName!=="TEXTAREA"&&Je.preventDefault()}},oe.onDropdownIndicatorMouseDown=function(Je){if(!(Je&&Je.type==="mousedown"&&Je.button!==0)&&!oe.props.isDisabled){var Nt=oe.props,sn=Nt.isMulti,Dn=Nt.menuIsOpen;oe.focusInput(),Dn?(oe.setState({inputIsHiddenAfterUpdate:!sn}),oe.onMenuClose()):oe.openMenu("first"),Je.preventDefault()}},oe.onClearIndicatorMouseDown=function(Je){Je&&Je.type==="mousedown"&&Je.button!==0||(oe.clearValue(),Je.preventDefault(),oe.openAfterFocus=!1,Je.type==="touchend"?oe.focusInput():setTimeout(function(){return oe.focusInput()}))},oe.onScroll=function(Je){typeof oe.props.closeMenuOnScroll=="boolean"?Je.target instanceof HTMLElement&&(0,Xn.H)(Je.target)&&oe.props.onMenuClose():typeof oe.props.closeMenuOnScroll=="function"&&oe.props.closeMenuOnScroll(Je)&&oe.props.onMenuClose()},oe.onCompositionStart=function(){oe.isComposing=!0},oe.onCompositionEnd=function(){oe.isComposing=!1},oe.onTouchStart=function(Je){var Nt=Je.touches,sn=Nt&&Nt.item(0);sn&&(oe.initialTouchX=sn.clientX,oe.initialTouchY=sn.clientY,oe.userIsDragging=!1)},oe.onTouchMove=function(Je){var Nt=Je.touches,sn=Nt&&Nt.item(0);if(sn){var Dn=Math.abs(sn.clientX-oe.initialTouchX),Kn=Math.abs(sn.clientY-oe.initialTouchY),Dr=5;oe.userIsDragging=Dn>Dr||Kn>Dr}},oe.onTouchEnd=function(Je){oe.userIsDragging||(oe.controlRef&&!oe.controlRef.contains(Je.target)&&oe.menuListRef&&!oe.menuListRef.contains(Je.target)&&oe.blurInput(),oe.initialTouchX=0,oe.initialTouchY=0)},oe.onControlTouchEnd=function(Je){oe.userIsDragging||oe.onControlMouseDown(Je)},oe.onClearIndicatorTouchEnd=function(Je){oe.userIsDragging||oe.onClearIndicatorMouseDown(Je)},oe.onDropdownIndicatorTouchEnd=function(Je){oe.userIsDragging||oe.onDropdownIndicatorMouseDown(Je)},oe.handleInputChange=function(Je){var Nt=oe.props.inputValue,sn=Je.currentTarget.value;oe.setState({inputIsHiddenAfterUpdate:!1}),oe.onInputChange(sn,{action:"input-change",prevInputValue:Nt}),oe.props.menuIsOpen||oe.onMenuOpen()},oe.onInputFocus=function(Je){oe.props.onFocus&&oe.props.onFocus(Je),oe.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(oe.openAfterFocus||oe.props.openMenuOnFocus)&&oe.openMenu("first"),oe.openAfterFocus=!1},oe.onInputBlur=function(Je){var Nt=oe.props.inputValue;if(oe.menuListRef&&oe.menuListRef.contains(document.activeElement)){oe.inputRef.focus();return}oe.props.onBlur&&oe.props.onBlur(Je),oe.onInputChange("",{action:"input-blur",prevInputValue:Nt}),oe.onMenuClose(),oe.setState({focusedValue:null,isFocused:!1})},oe.onOptionHover=function(Je){oe.blockOptionHover||oe.state.focusedOption===Je||oe.setState({focusedOption:Je})},oe.shouldHideSelectedOptions=function(){return Uo(oe.props)},oe.onValueInputFocus=function(Je){Je.preventDefault(),Je.stopPropagation(),oe.focus()},oe.onKeyDown=function(Je){var Nt=oe.props,sn=Nt.isMulti,Dn=Nt.backspaceRemovesValue,Kn=Nt.escapeClearsValue,Dr=Nt.inputValue,mr=Nt.isClearable,Nr=Nt.isDisabled,ti=Nt.menuIsOpen,Tr=Nt.onKeyDown,Ai=Nt.tabSelectsValue,Yi=Nt.openMenuOnFocus,yi=oe.state,Ji=yi.focusedOption,ko=yi.focusedValue,Ri=yi.selectValue;if(!Nr&&!(typeof Tr=="function"&&(Tr(Je),Je.defaultPrevented))){switch(oe.blockOptionHover=!0,Je.key){case"ArrowLeft":if(!sn||Dr)return;oe.focusValue("previous");break;case"ArrowRight":if(!sn||Dr)return;oe.focusValue("next");break;case"Delete":case"Backspace":if(Dr)return;if(ko)oe.removeValue(ko);else{if(!Dn)return;sn?oe.popValue():mr&&oe.clearValue()}break;case"Tab":if(oe.isComposing||Je.shiftKey||!ti||!Ai||!Ji||Yi&&oe.isOptionSelected(Ji,Ri))return;oe.selectOption(Ji);break;case"Enter":if(Je.keyCode===229)break;if(ti){if(!Ji||oe.isComposing)return;oe.selectOption(Ji);break}return;case"Escape":ti?(oe.setState({inputIsHiddenAfterUpdate:!1}),oe.onInputChange("",{action:"menu-close",prevInputValue:Dr}),oe.onMenuClose()):mr&&Kn&&oe.clearValue();break;case" ":if(Dr)return;if(!ti){oe.openMenu("first");break}if(!Ji)return;oe.selectOption(Ji);break;case"ArrowUp":ti?oe.focusOption("up"):oe.openMenu("last");break;case"ArrowDown":ti?oe.focusOption("down"):oe.openMenu("first");break;case"PageUp":if(!ti)return;oe.focusOption("pageup");break;case"PageDown":if(!ti)return;oe.focusOption("pagedown");break;case"Home":if(!ti)return;oe.focusOption("first");break;case"End":if(!ti)return;oe.focusOption("last");break;default:return}Je.preventDefault()}},oe.instancePrefix="react-select-"+(oe.props.instanceId||++ie),oe.state.selectValue=(0,Xn.I)(nt.value),nt.menuIsOpen&&oe.state.selectValue.length){var wt=oe.buildFocusableOptions(),Ft=wt.indexOf(oe.state.selectValue[0]);oe.state.focusedOption=wt[Ft]}return oe}return Bt(Le,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&(0,Xn.J)(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(oe){var wt=this.props,Ft=wt.isDisabled,Je=wt.menuIsOpen,Nt=this.state.isFocused;(Nt&&!Ft&&oe.isDisabled||Nt&&Je&&!oe.menuIsOpen)&&this.focusInput(),Nt&&Ft&&!oe.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!Nt&&!Ft&&oe.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&((0,Xn.J)(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(oe,wt){this.props.onInputChange(oe,wt)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(oe){var wt=this,Ft=this.state,Je=Ft.selectValue,Nt=Ft.isFocused,sn=this.buildFocusableOptions(),Dn=oe==="first"?0:sn.length-1;if(!this.props.isMulti){var Kn=sn.indexOf(Je[0]);Kn>-1&&(Dn=Kn)}this.scrollToFocusedOptionOnUpdate=!(Nt&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:sn[Dn]},function(){return wt.onMenuOpen()})}},{key:"focusValue",value:function(oe){var wt=this.state,Ft=wt.selectValue,Je=wt.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var Nt=Ft.indexOf(Je);Je||(Nt=-1);var sn=Ft.length-1,Dn=-1;if(Ft.length){switch(oe){case"previous":Nt===0?Dn=0:Nt===-1?Dn=sn:Dn=Nt-1;break;case"next":Nt>-1&&Nt<sn&&(Dn=Nt+1);break}this.setState({inputIsHidden:Dn!==-1,focusedValue:Ft[Dn]})}}}},{key:"focusOption",value:function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",wt=this.props.pageSize,Ft=this.state.focusedOption,Je=this.getFocusableOptions();if(Je.length){var Nt=0,sn=Je.indexOf(Ft);Ft||(sn=-1),oe==="up"?Nt=sn>0?sn-1:Je.length-1:oe==="down"?Nt=(sn+1)%Je.length:oe==="pageup"?(Nt=sn-wt,Nt<0&&(Nt=0)):oe==="pagedown"?(Nt=sn+wt,Nt>Je.length-1&&(Nt=Je.length-1)):oe==="last"&&(Nt=Je.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:Je[Nt],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(oi):(0,mt.Z)((0,mt.Z)({},oi),this.props.theme):oi}},{key:"getCommonProps",value:function(){var oe=this.clearValue,wt=this.cx,Ft=this.getStyles,Je=this.getClassNames,Nt=this.getValue,sn=this.selectOption,Dn=this.setValue,Kn=this.props,Dr=Kn.isMulti,mr=Kn.isRtl,Nr=Kn.options,ti=this.hasValue();return{clearValue:oe,cx:wt,getStyles:Ft,getClassNames:Je,getValue:Nt,hasValue:ti,isMulti:Dr,isRtl:mr,options:Nr,selectOption:sn,selectProps:Kn,setValue:Dn,theme:this.getTheme()}}},{key:"hasValue",value:function(){var oe=this.state.selectValue;return oe.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var oe=this.props,wt=oe.isClearable,Ft=oe.isMulti;return wt===void 0?Ft:wt}},{key:"isOptionDisabled",value:function(oe,wt){return Eo(this.props,oe,wt)}},{key:"isOptionSelected",value:function(oe,wt){return hi(this.props,oe,wt)}},{key:"filterOption",value:function(oe,wt){return wo(this.props,oe,wt)}},{key:"formatOptionLabel",value:function(oe,wt){if(typeof this.props.formatOptionLabel=="function"){var Ft=this.props.inputValue,Je=this.state.selectValue;return this.props.formatOptionLabel(oe,{context:wt,inputValue:Ft,selectValue:Je})}else return this.getOptionLabel(oe)}},{key:"formatGroupLabel",value:function(oe){return this.props.formatGroupLabel(oe)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var oe=this.props,wt=oe.isDisabled,Ft=oe.isSearchable,Je=oe.inputId,Nt=oe.inputValue,sn=oe.tabIndex,Dn=oe.form,Kn=oe.menuIsOpen,Dr=oe.required,mr=this.getComponents(),Nr=mr.Input,ti=this.state,Tr=ti.inputIsHidden,Ai=ti.ariaSelection,Yi=this.commonProps,yi=Je||this.getElementId("input"),Ji=(0,mt.Z)((0,mt.Z)((0,mt.Z)({"aria-autocomplete":"list","aria-expanded":Kn,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":Dr,role:"combobox"},Kn&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!Ft&&{"aria-readonly":!0}),this.hasValue()?Ai?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return Ft?d.createElement(Nr,(0,Cn.Z)({},Yi,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:yi,innerRef:this.getInputRef,isDisabled:wt,isHidden:Tr,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:sn,form:Dn,type:"text",value:Nt},Ji)):d.createElement(ot,(0,Cn.Z)({id:yi,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Xn.K,onFocus:this.onInputFocus,disabled:wt,tabIndex:sn,inputMode:"none",form:Dn,value:""},Ji))}},{key:"renderPlaceholderOrValue",value:function(){var oe=this,wt=this.getComponents(),Ft=wt.MultiValue,Je=wt.MultiValueContainer,Nt=wt.MultiValueLabel,sn=wt.MultiValueRemove,Dn=wt.SingleValue,Kn=wt.Placeholder,Dr=this.commonProps,mr=this.props,Nr=mr.controlShouldRenderValue,ti=mr.isDisabled,Tr=mr.isMulti,Ai=mr.inputValue,Yi=mr.placeholder,yi=this.state,Ji=yi.selectValue,ko=yi.focusedValue,Ri=yi.isFocused;if(!this.hasValue()||!Nr)return Ai?null:d.createElement(Kn,(0,Cn.Z)({},Dr,{key:"placeholder",isDisabled:ti,isFocused:Ri,innerProps:{id:this.getElementId("placeholder")}}),Yi);if(Tr)return Ji.map(function(vo,Cs){var al=vo===ko,fs="".concat(oe.getOptionLabel(vo),"-").concat(oe.getOptionValue(vo));return d.createElement(Ft,(0,Cn.Z)({},Dr,{components:{Container:Je,Label:Nt,Remove:sn},isFocused:al,isDisabled:ti,key:fs,index:Cs,removeProps:{onClick:function(){return oe.removeValue(vo)},onTouchEnd:function(){return oe.removeValue(vo)},onMouseDown:function(ys){ys.preventDefault()}},data:vo}),oe.formatOptionLabel(vo,"value"))});if(Ai)return null;var jo=Ji[0];return d.createElement(Dn,(0,Cn.Z)({},Dr,{data:jo,isDisabled:ti}),this.formatOptionLabel(jo,"value"))}},{key:"renderClearIndicator",value:function(){var oe=this.getComponents(),wt=oe.ClearIndicator,Ft=this.commonProps,Je=this.props,Nt=Je.isDisabled,sn=Je.isLoading,Dn=this.state.isFocused;if(!this.isClearable()||!wt||Nt||!this.hasValue()||sn)return null;var Kn={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return d.createElement(wt,(0,Cn.Z)({},Ft,{innerProps:Kn,isFocused:Dn}))}},{key:"renderLoadingIndicator",value:function(){var oe=this.getComponents(),wt=oe.LoadingIndicator,Ft=this.commonProps,Je=this.props,Nt=Je.isDisabled,sn=Je.isLoading,Dn=this.state.isFocused;if(!wt||!sn)return null;var Kn={"aria-hidden":"true"};return d.createElement(wt,(0,Cn.Z)({},Ft,{innerProps:Kn,isDisabled:Nt,isFocused:Dn}))}},{key:"renderIndicatorSeparator",value:function(){var oe=this.getComponents(),wt=oe.DropdownIndicator,Ft=oe.IndicatorSeparator;if(!wt||!Ft)return null;var Je=this.commonProps,Nt=this.props.isDisabled,sn=this.state.isFocused;return d.createElement(Ft,(0,Cn.Z)({},Je,{isDisabled:Nt,isFocused:sn}))}},{key:"renderDropdownIndicator",value:function(){var oe=this.getComponents(),wt=oe.DropdownIndicator;if(!wt)return null;var Ft=this.commonProps,Je=this.props.isDisabled,Nt=this.state.isFocused,sn={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return d.createElement(wt,(0,Cn.Z)({},Ft,{innerProps:sn,isDisabled:Je,isFocused:Nt}))}},{key:"renderMenu",value:function(){var oe=this,wt=this.getComponents(),Ft=wt.Group,Je=wt.GroupHeading,Nt=wt.Menu,sn=wt.MenuList,Dn=wt.MenuPortal,Kn=wt.LoadingMessage,Dr=wt.NoOptionsMessage,mr=wt.Option,Nr=this.commonProps,ti=this.state.focusedOption,Tr=this.props,Ai=Tr.captureMenuScroll,Yi=Tr.inputValue,yi=Tr.isLoading,Ji=Tr.loadingMessage,ko=Tr.minMenuHeight,Ri=Tr.maxMenuHeight,jo=Tr.menuIsOpen,vo=Tr.menuPlacement,Cs=Tr.menuPosition,al=Tr.menuPortalTarget,fs=Tr.menuShouldBlockScroll,ps=Tr.menuShouldScrollIntoView,ys=Tr.noOptionsMessage,Xi=Tr.onMenuScrollToTop,ls=Tr.onMenuScrollToBottom;if(!jo)return null;var _a=function(M,I){var Q=M.type,se=M.data,Ve=M.isDisabled,Gt=M.isSelected,pn=M.label,ir=M.value,zr=ti===se,kr=Ve?void 0:function(){return oe.onOptionHover(se)},Hr=Ve?void 0:function(){return oe.selectOption(se)},Ei="".concat(oe.getElementId("option"),"-").concat(I),Ii={id:Ei,onClick:Hr,onMouseMove:kr,onMouseOver:kr,tabIndex:-1};return d.createElement(mr,(0,Cn.Z)({},Nr,{innerProps:Ii,data:se,isDisabled:Ve,isSelected:Gt,key:Ei,label:pn,type:Q,value:ir,isFocused:zr,innerRef:zr?oe.getFocusedOptionRef:void 0}),oe.formatOptionLabel(M.data,"menu"))},Ya;if(this.hasOptions())Ya=this.getCategorizedOptions().map(function(h){if(h.type==="group"){var M=h.data,I=h.options,Q=h.index,se="".concat(oe.getElementId("group"),"-").concat(Q),Ve="".concat(se,"-heading");return d.createElement(Ft,(0,Cn.Z)({},Nr,{key:se,data:M,options:I,Heading:Je,headingProps:{id:Ve,data:h.data},label:oe.formatGroupLabel(h.data)}),h.options.map(function(Gt){return _a(Gt,"".concat(Q,"-").concat(Gt.index))}))}else if(h.type==="option")return _a(h,"".concat(h.index))});else if(yi){var ea=Ji({inputValue:Yi});if(ea===null)return null;Ya=d.createElement(Kn,Nr,ea)}else{var ll=ys({inputValue:Yi});if(ll===null)return null;Ya=d.createElement(Dr,Nr,ll)}var vl={minMenuHeight:ko,maxMenuHeight:Ri,menuPlacement:vo,menuPosition:Cs,menuShouldScrollIntoView:ps},c=d.createElement(Xn.M,(0,Cn.Z)({},Nr,vl),function(h){var M=h.ref,I=h.placerProps,Q=I.placement,se=I.maxHeight;return d.createElement(Nt,(0,Cn.Z)({},Nr,vl,{innerRef:M,innerProps:{onMouseDown:oe.onMenuMouseDown,onMouseMove:oe.onMenuMouseMove,id:oe.getElementId("listbox")},isLoading:yi,placement:Q}),d.createElement(Wi,{captureEnabled:Ai,onTopArrive:Xi,onBottomArrive:ls,lockEnabled:fs},function(Ve){return d.createElement(sn,(0,Cn.Z)({},Nr,{innerRef:function(pn){oe.getMenuListRef(pn),Ve(pn)},isLoading:yi,maxHeight:se,focusedOption:ti}),Ya)}))});return al||Cs==="fixed"?d.createElement(Dn,(0,Cn.Z)({},Nr,{appendTo:al,controlElement:this.controlRef,menuPlacement:vo,menuPosition:Cs}),c):c}},{key:"renderFormField",value:function(){var oe=this,wt=this.props,Ft=wt.delimiter,Je=wt.isDisabled,Nt=wt.isMulti,sn=wt.name,Dn=wt.required,Kn=this.state.selectValue;if(!(!sn||Je)){if(Dn&&!this.hasValue())return d.createElement(to,{name:sn,onFocus:this.onValueInputFocus});if(Nt)if(Ft){var Dr=Kn.map(function(ti){return oe.getOptionValue(ti)}).join(Ft);return d.createElement("input",{name:sn,type:"hidden",value:Dr})}else{var mr=Kn.length>0?Kn.map(function(ti,Tr){return d.createElement("input",{key:"i-".concat(Tr),name:sn,type:"hidden",value:oe.getOptionValue(ti)})}):d.createElement("input",{name:sn,type:"hidden",value:""});return d.createElement("div",null,mr)}else{var Nr=Kn[0]?this.getOptionValue(Kn[0]):"";return d.createElement("input",{name:sn,type:"hidden",value:Nr})}}}},{key:"renderLiveRegion",value:function(){var oe=this.commonProps,wt=this.state,Ft=wt.ariaSelection,Je=wt.focusedOption,Nt=wt.focusedValue,sn=wt.isFocused,Dn=wt.selectValue,Kn=this.getFocusableOptions();return d.createElement(vr,(0,Cn.Z)({},oe,{id:this.getElementId("live-region"),ariaSelection:Ft,focusedOption:Je,focusedValue:Nt,isFocused:sn,selectValue:Dn,focusableOptions:Kn}))}},{key:"render",value:function(){var oe=this.getComponents(),wt=oe.Control,Ft=oe.IndicatorsContainer,Je=oe.SelectContainer,Nt=oe.ValueContainer,sn=this.props,Dn=sn.className,Kn=sn.id,Dr=sn.isDisabled,mr=sn.menuIsOpen,Nr=this.state.isFocused,ti=this.commonProps=this.getCommonProps();return d.createElement(Je,(0,Cn.Z)({},ti,{className:Dn,innerProps:{id:Kn,onKeyDown:this.onKeyDown},isDisabled:Dr,isFocused:Nr}),this.renderLiveRegion(),d.createElement(wt,(0,Cn.Z)({},ti,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:Dr,isFocused:Nr,menuIsOpen:mr}),d.createElement(Nt,(0,Cn.Z)({},ti,{isDisabled:Dr}),this.renderPlaceholderOrValue(),this.renderInput()),d.createElement(Ft,(0,Cn.Z)({},ti,{isDisabled:Dr}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(oe,wt){var Ft=wt.prevProps,Je=wt.clearFocusValueOnUpdate,Nt=wt.inputIsHiddenAfterUpdate,sn=wt.ariaSelection,Dn=wt.isFocused,Kn=wt.prevWasFocused,Dr=oe.options,mr=oe.value,Nr=oe.menuIsOpen,ti=oe.inputValue,Tr=oe.isMulti,Ai=(0,Xn.I)(mr),Yi={};if(Ft&&(mr!==Ft.value||Dr!==Ft.options||Nr!==Ft.menuIsOpen||ti!==Ft.inputValue)){var yi=Nr?Li(oe,Ai):[],Ji=Je?Vi(wt,Ai):null,ko=Bi(wt,yi);Yi={selectValue:Ai,focusedOption:ko,focusedValue:Ji,clearFocusValueOnUpdate:!1}}var Ri=Nt!=null&&oe!==Ft?{inputIsHidden:Nt,inputIsHiddenAfterUpdate:void 0}:{},jo=sn,vo=Dn&&Kn;return Dn&&!vo&&(jo={value:(0,Xn.D)(Tr,Ai,Ai[0]||null),options:Ai,action:"initial-input-focus"},vo=!Kn),sn?.action==="initial-input-focus"&&(jo=null),(0,mt.Z)((0,mt.Z)((0,mt.Z)({},Yi),Ri),{},{prevProps:oe,ariaSelection:jo,prevWasFocused:vo})}}]),Le}(d.Component);B.defaultProps=qr;var he=i(53563),xe=i(12788),rt=i(24390),Lt=(0,d.forwardRef)(function(Z,me){var Le=Fn(Z);return d.createElement(B,(0,Cn.Z)({ref:me},Le))}),en=function(Z){var me=Z.nonce,Le=Z.children,nt=Z.cacheKey,oe=useMemo(function(){return createCache({key:nt,nonce:me})},[nt,me]);return React.createElement(CacheProvider,{value:oe},Le)},An=Lt,_n=i(86357);function Mr(Z){return(0,Zr.Z)(1,arguments),(0,zn.Z)(Z).getTime()<Date.now()}var Ur=i(74758),Pr=i(20108),Kr=i(89793),Qr=i.n(Kr),Wr=i(85973),ci=i.n(Wr),pr=i(90748),Xr=i.n(pr),Br={};(function(){Br.d=function(Z,me){for(var Le in me)Br.o(me,Le)&&!Br.o(Z,Le)&&Object.defineProperty(Z,Le,{enumerable:!0,get:me[Le]})}})(),function(){Br.o=function(Z,me){return Object.prototype.hasOwnProperty.call(Z,me)}}();var Mn={};Br.d(Mn,{Hn:function(){return bs},xC:function(){return Bo},iq:function(){return Wo},NY:function(){return qa},OB:function(){return Ml},ug:function(){return ql},m$:function(){return mu},uT:function(){return xl},O4:function(){return Xu},jW:function(){return qu},QH:function(){return Da},Y_:function(){return Ba},W1:function(){return Vo},vq:function(){return Ts},MG:function(){return Ho},xZ:function(){return ds},tM:function(){return wc},c4:function(){return lu},x7:function(){return Ql},W$:function(){return ha},J5:function(){return Ac},l0:function(){return af},jm:function(){return Au},JQ:function(){return gu},Zc:function(){return eu},XL:function(){return Ua},Hw:function(){return Fs},rt:function(){return Uc},rU:function(){return Jl},Qj:function(){return lf},dO:function(){return Gl},dJ:function(){return Lc},Hz:function(){return rl},ZF:function(){return wl},X0:function(){return Nc},cJ:function(){return Fo},N$:function(){return xs},vG:function(){return lc},w7:function(){return ml},v4:function(){return il},tU:function(){return Aa},RM:function(){return us},oL:function(){return bl},JV:function(){return rc},ij:function(){return hu},fG:function(){return Nf},fC:function(){return Xa},m:function(){return kc},SL:function(){return pu},fz:function(){return ts},qb:function(){return Xl},t3:function(){return Nu},Bg:function(){return Ru},_Y:function(){return tc},iA:function(){return Pc},Ui:function(){return na},L8:function(){return su},I8:function(){return Ms},w6:function(){return fd},e5:function(){return Ff},ZT:function(){return ou},dU:function(){return Vc},nn:function(){return Hc},tg:function(){return kl},mD:function(){return Wl},k2:function(){return Co},UN:function(){return Ko},CJ:function(){return Rl},qX:function(){return cl},OT:function(){return yu},X7:function(){return Zc},CR:function(){return mc},jV:function(){return Cf},Q1:function(){return pa},WY:function(){return Va},YB:function(){return vc},UW:function(){return yc},to:function(){return xf},I0:function(){return jf},So:function(){return cc},L7:function(){return $s},QI:function(){return da},Vu:function(){return Oo},Wq:function(){return Dl},W6:function(){return go},VP:function(){return Lf},Xe:function(){return Lu},mZ:function(){return Ns},kY:function(){return tu},L0:function(){return Wc},E2:function(){return jl},go:function(){return fc},c1:function(){return qf},yX:function(){return mf},F5:function(){return dc},lm:function(){return $a},o1:function(){return _u},Yw:function(){return Ef},aM:function(){return Pu},Kx:function(){return Ps},ss:function(){return zc},vn:function(){return xt},Uq:function(){return Qs},j1:function(){return fu},Sh:function(){return Os},rS:function(){return Sl},Od:function(){return Tf}});var qi=Z=>{var me={};return Br.d(me,Z),me},Po=Z=>()=>Z,mo=qi({default:()=>f()});const Ko=(Z,me)=>(0,mo.default)(Z,["attributes",me,"type"],""),Co=(Z,me)=>(0,mo.default)(Z,["attributes",...me],"");var No=Z=>{var me={};return Br.d(me,Z),me},Ao=Z=>()=>Z,vt=No({Children:()=>d.Children,Fragment:()=>d.Fragment,cloneElement:()=>d.cloneElement,createContext:()=>d.createContext,createElement:()=>d.createElement,default:()=>d,useCallback:()=>d.useCallback,useContext:()=>d.useContext,useEffect:()=>d.useEffect,useLayoutEffect:()=>d.useLayoutEffect,useMemo:()=>d.useMemo,useRef:()=>d.useRef,useState:()=>d.useState}),la=Z=>{var me={};return Br.d(me,Z),me},Es=Z=>()=>Z,Qn=la({Alert:()=>j,BaseCheckbox:()=>z.C,Box:()=>F.x,Button:()=>K.z,Checkbox:()=>G.X,DatePicker:()=>Y.M,DateTimePicker:()=>ae.x,Dialog:()=>Ce.V,DialogBody:()=>J.a,DialogFooter:()=>le.c,Dots:()=>Ie,EmptyStateLayout:()=>Fe.x,Field:()=>ut.g,FieldInput:()=>ht._,Flex:()=>V.k,Icon:()=>Ot.J,IconButton:()=>Ue.h,JSONInput:()=>at.V,Loader:()=>Pt.a,NextLink:()=>_e,NumberInput:()=>lt.Y,Option:()=>kt.W,PageLink:()=>We,Pagination:()=>nn,Popover:()=>hn.J2,PreviousLink:()=>Ee,SearchForm:()=>Rn.U,Searchbar:()=>kn.w,Select:()=>$t.P,SingleSelect:()=>yn.q4,SingleSelectOption:()=>yn.ag,Table:()=>Yn.i,Tag:()=>cn.V,Tbody:()=>st.p,Td:()=>on.Td,TextInput:()=>dt.o,Textarea:()=>Dt.g,Th:()=>on.Th,Thead:()=>Ht.h,TimePicker:()=>rn.j,ToggleInput:()=>ke.s,Tooltip:()=>ct.u,Tr:()=>D.Tr,Typography:()=>L.Z,VisuallyHidden:()=>tt.T}),ms=Z=>{var me={};return Br.d(me,Z),me},ua=Z=>()=>Z,co=ms({CarretDown:()=>W.Z,Clock:()=>re.Z,Cross:()=>x.Z,EmptyDocuments:()=>Oe.Z,EmptyPermissions:()=>Ze.Z,EmptyPictures:()=>pt.Z,ExclamationMarkCircle:()=>m.Z,Eye:()=>$e.Z,EyeStriked:()=>Re.Z,Minus:()=>Ne,Plus:()=>bt.Z,Refresh:()=>Kt.Z,Search:()=>an.Z,Trash:()=>In.Z}),Zs=Z=>{var me={};return Br.d(me,Z),me},ya=Z=>()=>Z,qe=Zs({default:()=>Wn()}),Oa=Z=>{var me={};return Br.d(me,Z),me},ul=Z=>()=>Z,Mo=Oa({useIntl:()=>gr.Z});const bs=({content:Z,...me})=>{const{formatMessage:Le}=(0,Mo.useIntl)();return vt.default.createElement(Qn.EmptyStateLayout,{icon:vt.default.createElement(co.ExclamationMarkCircle,{width:"10rem"}),content:Le({id:Z.id,defaultMessage:Z.defaultMessage},Z.values),...me})};bs.defaultProps={content:{id:"anErrorOccurred",defaultMessage:"Woops! Something went wrong. Please, try again.",values:{}}},bs.propTypes={content:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string,values:qe.default.object})};var ca=Z=>{var me={};return Br.d(me,Z),me},El=Z=>()=>Z,Ds=ca({NavLink:()=>q.OL,Redirect:()=>fr.l_,useHistory:()=>fr.k6,useLocation:()=>fr.TH}),Zi=Z=>{var me={};return Br.d(me,Z),me},Xo=Z=>()=>Z,po=Zi({Link:()=>Rr.r,LinkButton:()=>Vr.Q});const go=Z=>{const me=vt.useRef(Z);return vt.useEffect(()=>{me.current=Z}),vt.useMemo(()=>(...Le)=>me.current?.(...Le),[])};/**
395
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function it(Z){return ne(Z)||ge(Z)||(0,je.Z)(Z)||He()}var Rt=i(97830),fn=Number.isNaN||function(me){return typeof me=="number"&&me!==me};function qt(Z,me){return!!(Z===me||fn(Z)&&fn(me))}function Vt(Z,me){if(Z.length!==me.length)return!1;for(var Le=0;Le<Z.length;Le++)if(!qt(Z[Le],me[Le]))return!1;return!0}function Jt(Z,me){me===void 0&&(me=Vt);var Le=null;function nt(){for(var oe=[],wt=0;wt<arguments.length;wt++)oe[wt]=arguments[wt];if(Le&&Le.lastThis===this&&me(oe,Le.lastArgs))return Le.lastResult;var Ft=Z.apply(this,oe);return Le={lastResult:Ft,lastArgs:oe,lastThis:this},Ft}return nt.clear=function(){Le=null},nt}function dn(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var Jn={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Hn=function(me){return(0,Rt.tZ)("span",(0,Cn.Z)({css:Jn},me))},Ir={guidance:function(me){var Le=me.isSearchable,nt=me.isMulti,oe=me.isDisabled,wt=me.tabSelectsValue,Ft=me.context;switch(Ft){case"menu":return"Use Up and Down to choose options".concat(oe?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(wt?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(me["aria-label"]||"Select"," is focused ").concat(Le?",type to refine list":"",", press Down to open the menu, ").concat(nt?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(me){var Le=me.action,nt=me.label,oe=nt===void 0?"":nt,wt=me.labels,Ft=me.isDisabled;switch(Le){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(oe,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(wt.length>1?"s":""," ").concat(wt.join(","),", selected.");case"select-option":return Ft?"option ".concat(oe," is disabled. Select another option."):"option ".concat(oe,", selected.");default:return""}},onFocus:function(me){var Le=me.context,nt=me.focused,oe=me.options,wt=me.label,Ft=wt===void 0?"":wt,Je=me.selectValue,Nt=me.isDisabled,sn=me.isSelected,Dn=function(Nr,ti){return Nr&&Nr.length?"".concat(Nr.indexOf(ti)+1," of ").concat(Nr.length):""};if(Le==="value"&&Je)return"value ".concat(Ft," focused, ").concat(Dn(Je,nt),".");if(Le==="menu"){var Kn=Nt?" disabled":"",Dr="".concat(sn?"selected":"focused").concat(Kn);return"option ".concat(Ft," ").concat(Dr,", ").concat(Dn(oe,nt),".")}return""},onFilter:function(me){var Le=me.inputValue,nt=me.resultsMessage;return"".concat(nt).concat(Le?" for search term "+Le:"",".")}},vr=function(me){var Le=me.ariaSelection,nt=me.focusedOption,oe=me.focusedValue,wt=me.focusableOptions,Ft=me.isFocused,Je=me.selectValue,Nt=me.selectProps,sn=me.id,Dn=Nt.ariaLiveMessages,Kn=Nt.getOptionLabel,Dr=Nt.inputValue,mr=Nt.isMulti,Nr=Nt.isOptionDisabled,ti=Nt.isSearchable,Tr=Nt.menuIsOpen,Ai=Nt.options,Yi=Nt.screenReaderStatus,yi=Nt.tabSelectsValue,Ji=Nt["aria-label"],ko=Nt["aria-live"],Ri=(0,d.useMemo)(function(){return(0,mt.Z)((0,mt.Z)({},Ir),Dn||{})},[Dn]),jo=(0,d.useMemo)(function(){var Xi="";if(Le&&Ri.onChange){var ls=Le.option,_a=Le.options,Ya=Le.removedValue,ea=Le.removedValues,ll=Le.value,vl=function(Ve){return Array.isArray(Ve)?null:Ve},c=Ya||ls||vl(ll),h=c?Kn(c):"",M=_a||ea||void 0,I=M?M.map(Kn):[],Q=(0,mt.Z)({isDisabled:c&&Nr(c,Je),label:h,labels:I},Le);Xi=Ri.onChange(Q)}return Xi},[Le,Ri,Nr,Je,Kn]),vo=(0,d.useMemo)(function(){var Xi="",ls=nt||oe,_a=!!(nt&&Je&&Je.includes(nt));if(ls&&Ri.onFocus){var Ya={focused:ls,label:Kn(ls),isDisabled:Nr(ls,Je),isSelected:_a,options:wt,context:ls===nt?"menu":"value",selectValue:Je};Xi=Ri.onFocus(Ya)}return Xi},[nt,oe,Kn,Nr,Ri,wt,Je]),Cs=(0,d.useMemo)(function(){var Xi="";if(Tr&&Ai.length&&Ri.onFilter){var ls=Yi({count:wt.length});Xi=Ri.onFilter({inputValue:Dr,resultsMessage:ls})}return Xi},[wt,Dr,Tr,Ri,Ai,Yi]),al=(0,d.useMemo)(function(){var Xi="";if(Ri.guidance){var ls=oe?"value":Tr?"menu":"input";Xi=Ri.guidance({"aria-label":Ji,context:ls,isDisabled:nt&&Nr(nt,Je),isMulti:mr,isSearchable:ti,tabSelectsValue:yi})}return Xi},[Ji,nt,oe,mr,Nr,ti,Tr,Ri,Je,yi]),fs="".concat(vo," ").concat(Cs," ").concat(al),ps=(0,Rt.tZ)(d.Fragment,null,(0,Rt.tZ)("span",{id:"aria-selection"},jo),(0,Rt.tZ)("span",{id:"aria-context"},fs)),ys=Le?.action==="initial-input-focus";return(0,Rt.tZ)(d.Fragment,null,(0,Rt.tZ)(Hn,{id:sn},ys&&ps),(0,Rt.tZ)(Hn,{"aria-live":ko,"aria-atomic":"false","aria-relevant":"additions text"},Ft&&!ys&&ps))},yr=[{base:"A",letters:"A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"},{base:"AA",letters:"\uA732"},{base:"AE",letters:"\xC6\u01FC\u01E2"},{base:"AO",letters:"\uA734"},{base:"AU",letters:"\uA736"},{base:"AV",letters:"\uA738\uA73A"},{base:"AY",letters:"\uA73C"},{base:"B",letters:"B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"},{base:"C",letters:"C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"},{base:"D",letters:"D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"},{base:"DZ",letters:"\u01F1\u01C4"},{base:"Dz",letters:"\u01F2\u01C5"},{base:"E",letters:"E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"},{base:"F",letters:"F\u24BB\uFF26\u1E1E\u0191\uA77B"},{base:"G",letters:"G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"},{base:"H",letters:"H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"},{base:"I",letters:"I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"},{base:"J",letters:"J\u24BF\uFF2A\u0134\u0248"},{base:"K",letters:"K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"},{base:"L",letters:"L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"},{base:"LJ",letters:"\u01C7"},{base:"Lj",letters:"\u01C8"},{base:"M",letters:"M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"},{base:"N",letters:"N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"},{base:"NJ",letters:"\u01CA"},{base:"Nj",letters:"\u01CB"},{base:"O",letters:"O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"},{base:"OI",letters:"\u01A2"},{base:"OO",letters:"\uA74E"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"},{base:"Q",letters:"Q\u24C6\uFF31\uA756\uA758\u024A"},{base:"R",letters:"R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"},{base:"S",letters:"S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"},{base:"T",letters:"T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"},{base:"TZ",letters:"\uA728"},{base:"U",letters:"U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"},{base:"V",letters:"V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"},{base:"VY",letters:"\uA760"},{base:"W",letters:"W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"},{base:"X",letters:"X\u24CD\uFF38\u1E8A\u1E8C"},{base:"Y",letters:"Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"},{base:"Z",letters:"Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"},{base:"a",letters:"a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"},{base:"aa",letters:"\uA733"},{base:"ae",letters:"\xE6\u01FD\u01E3"},{base:"ao",letters:"\uA735"},{base:"au",letters:"\uA737"},{base:"av",letters:"\uA739\uA73B"},{base:"ay",letters:"\uA73D"},{base:"b",letters:"b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"},{base:"c",letters:"c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"},{base:"d",letters:"d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"},{base:"dz",letters:"\u01F3\u01C6"},{base:"e",letters:"e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"},{base:"f",letters:"f\u24D5\uFF46\u1E1F\u0192\uA77C"},{base:"g",letters:"g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"},{base:"h",letters:"h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"},{base:"j",letters:"j\u24D9\uFF4A\u0135\u01F0\u0249"},{base:"k",letters:"k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"},{base:"l",letters:"l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"},{base:"lj",letters:"\u01C9"},{base:"m",letters:"m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"},{base:"n",letters:"n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"},{base:"nj",letters:"\u01CC"},{base:"o",letters:"o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"},{base:"oi",letters:"\u01A3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\uA74F"},{base:"p",letters:"p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"},{base:"q",letters:"q\u24E0\uFF51\u024B\uA757\uA759"},{base:"r",letters:"r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"},{base:"s",letters:"s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"},{base:"t",letters:"t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"},{base:"tz",letters:"\uA729"},{base:"u",letters:"u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"},{base:"v",letters:"v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"},{base:"vy",letters:"\uA761"},{base:"w",letters:"w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"},{base:"x",letters:"x\u24E7\uFF58\u1E8B\u1E8D"},{base:"y",letters:"y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"},{base:"z",letters:"z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"}],Er=new RegExp("["+yr.map(function(Z){return Z.letters}).join("")+"]","g"),Or={},we=0;we<yr.length;we++)for(var ue=yr[we],Te=0;Te<ue.letters.length;Te++)Or[ue.letters[Te]]=ue.base;var ze=function(me){return me.replace(Er,function(Le){return Or[Le]})},ft=Jt(ze),yt=function(me){return me.replace(/^\s+|\s+$/g,"")},ln=function(me){return"".concat(me.label," ").concat(me.value)},En=function(me){return function(Le,nt){if(Le.data.__isNew__)return!0;var oe=(0,mt.Z)({ignoreCase:!0,ignoreAccents:!0,stringify:ln,trim:!0,matchFrom:"any"},me),wt=oe.ignoreCase,Ft=oe.ignoreAccents,Je=oe.stringify,Nt=oe.trim,sn=oe.matchFrom,Dn=Nt?yt(nt):nt,Kn=Nt?yt(Je(Le)):Je(Le);return wt&&(Dn=Dn.toLowerCase(),Kn=Kn.toLowerCase()),Ft&&(Dn=ft(Dn),Kn=ze(Kn)),sn==="start"?Kn.substr(0,Dn.length)===Dn:Kn.indexOf(Dn)>-1}},jr=["innerRef"];function ot(Z){var me=Z.innerRef,Le=(0,Mt.Z)(Z,jr),nt=(0,Xn.r)(Le,"onExited","in","enter","exit","appear");return(0,Rt.tZ)("input",(0,Cn.Z)({ref:me},nt,{css:(0,Rt.iv)({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var zt=function(me){me.preventDefault(),me.stopPropagation()};function Ut(Z){var me=Z.isEnabled,Le=Z.onBottomArrive,nt=Z.onBottomLeave,oe=Z.onTopArrive,wt=Z.onTopLeave,Ft=(0,d.useRef)(!1),Je=(0,d.useRef)(!1),Nt=(0,d.useRef)(0),sn=(0,d.useRef)(null),Dn=(0,d.useCallback)(function(Tr,Ai){if(sn.current!==null){var Yi=sn.current,yi=Yi.scrollTop,Ji=Yi.scrollHeight,ko=Yi.clientHeight,Ri=sn.current,jo=Ai>0,vo=Ji-ko-yi,Cs=!1;vo>Ai&&Ft.current&&(nt&&nt(Tr),Ft.current=!1),jo&&Je.current&&(wt&&wt(Tr),Je.current=!1),jo&&Ai>vo?(Le&&!Ft.current&&Le(Tr),Ri.scrollTop=Ji,Cs=!0,Ft.current=!0):!jo&&-Ai>yi&&(oe&&!Je.current&&oe(Tr),Ri.scrollTop=0,Cs=!0,Je.current=!0),Cs&&zt(Tr)}},[Le,nt,oe,wt]),Kn=(0,d.useCallback)(function(Tr){Dn(Tr,Tr.deltaY)},[Dn]),Dr=(0,d.useCallback)(function(Tr){Nt.current=Tr.changedTouches[0].clientY},[]),mr=(0,d.useCallback)(function(Tr){var Ai=Nt.current-Tr.changedTouches[0].clientY;Dn(Tr,Ai)},[Dn]),Nr=(0,d.useCallback)(function(Tr){if(Tr){var Ai=Xn.s?{passive:!1}:!1;Tr.addEventListener("wheel",Kn,Ai),Tr.addEventListener("touchstart",Dr,Ai),Tr.addEventListener("touchmove",mr,Ai)}},[mr,Dr,Kn]),ti=(0,d.useCallback)(function(Tr){Tr&&(Tr.removeEventListener("wheel",Kn,!1),Tr.removeEventListener("touchstart",Dr,!1),Tr.removeEventListener("touchmove",mr,!1))},[mr,Dr,Kn]);return(0,d.useEffect)(function(){if(me){var Tr=sn.current;return Nr(Tr),function(){ti(Tr)}}},[me,Nr,ti]),function(Tr){sn.current=Tr}}var Ln=["boxSizing","height","overflow","paddingRight","position"],Gn={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function xn(Z){Z.preventDefault()}function ur(Z){Z.stopPropagation()}function Sr(){var Z=this.scrollTop,me=this.scrollHeight,Le=Z+this.offsetHeight;Z===0?this.scrollTop=1:Le===me&&(this.scrollTop=Z-1)}function Fr(){return"ontouchstart"in window||navigator.maxTouchPoints}var ni=!!(typeof window<"u"&&window.document&&window.document.createElement),di=0,Ar={capture:!1,passive:!1};function ai(Z){var me=Z.isEnabled,Le=Z.accountForScrollbars,nt=Le===void 0?!0:Le,oe=(0,d.useRef)({}),wt=(0,d.useRef)(null),Ft=(0,d.useCallback)(function(Nt){if(ni){var sn=document.body,Dn=sn&&sn.style;if(nt&&Ln.forEach(function(Nr){var ti=Dn&&Dn[Nr];oe.current[Nr]=ti}),nt&&di<1){var Kn=parseInt(oe.current.paddingRight,10)||0,Dr=document.body?document.body.clientWidth:0,mr=window.innerWidth-Dr+Kn||0;Object.keys(Gn).forEach(function(Nr){var ti=Gn[Nr];Dn&&(Dn[Nr]=ti)}),Dn&&(Dn.paddingRight="".concat(mr,"px"))}sn&&Fr()&&(sn.addEventListener("touchmove",xn,Ar),Nt&&(Nt.addEventListener("touchstart",Sr,Ar),Nt.addEventListener("touchmove",ur,Ar))),di+=1}},[nt]),Je=(0,d.useCallback)(function(Nt){if(ni){var sn=document.body,Dn=sn&&sn.style;di=Math.max(di-1,0),nt&&di<1&&Ln.forEach(function(Kn){var Dr=oe.current[Kn];Dn&&(Dn[Kn]=Dr)}),sn&&Fr()&&(sn.removeEventListener("touchmove",xn,Ar),Nt&&(Nt.removeEventListener("touchstart",Sr,Ar),Nt.removeEventListener("touchmove",ur,Ar)))}},[nt]);return(0,d.useEffect)(function(){if(me){var Nt=wt.current;return Ft(Nt),function(){Je(Nt)}}},[me,Ft,Je]),function(Nt){wt.current=Nt}}function Oi(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var $r=function(){return document.activeElement&&document.activeElement.blur()},_i={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Wi(Z){var me=Z.children,Le=Z.lockEnabled,nt=Z.captureEnabled,oe=nt===void 0?!0:nt,wt=Z.onBottomArrive,Ft=Z.onBottomLeave,Je=Z.onTopArrive,Nt=Z.onTopLeave,sn=Ut({isEnabled:oe,onBottomArrive:wt,onBottomLeave:Ft,onTopArrive:Je,onTopLeave:Nt}),Dn=ai({isEnabled:Le}),Kn=function(mr){sn(mr),Dn(mr)};return(0,Rt.tZ)(d.Fragment,null,Le&&(0,Rt.tZ)("div",{onClick:$r,css:_i}),me(Kn))}function so(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var yo={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},to=function(me){var Le=me.name,nt=me.onFocus;return(0,Rt.tZ)("input",{required:!0,name:Le,tabIndex:-1,onFocus:nt,css:yo,value:"",onChange:function(){}})},Xe=function(me){return me.label},De=function(me){return me.label},_t=function(me){return me.value},Et=function(me){return!!me.isDisabled},Xt={clearIndicator:Xn.a,container:Xn.b,control:Xn.d,dropdownIndicator:Xn.e,group:Xn.g,groupHeading:Xn.f,indicatorsContainer:Xn.i,indicatorSeparator:Xn.h,input:Xn.j,loadingIndicator:Xn.l,loadingMessage:Xn.k,menu:Xn.m,menuList:Xn.n,menuPortal:Xn.o,multiValue:Xn.p,multiValueLabel:Xn.q,multiValueRemove:Xn.t,noOptionsMessage:Xn.u,option:Xn.v,placeholder:Xn.w,singleValue:Xn.x,valueContainer:Xn.y};function Sn(Z){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Le=_objectSpread({},Z);return Object.keys(me).forEach(function(nt){var oe=nt;Z[oe]?Le[oe]=function(wt,Ft){return me[oe](Z[oe](wt,Ft),Ft)}:Le[oe]=me[oe]}),Le}var On={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},jn=4,cr=4,ii=38,li=cr*2,Yr={baseUnit:cr,controlHeight:ii,menuGutter:li},oi={borderRadius:jn,colors:On,spacing:Yr},qr={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:(0,Xn.z)(),captureMenuScroll:!(0,Xn.z)(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:En(),formatGroupLabel:Xe,getOptionLabel:De,getOptionValue:_t,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Et,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!(0,Xn.A)(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(me){var Le=me.count;return"".concat(Le," result").concat(Le!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function gi(Z,me,Le,nt){var oe=Eo(Z,me,Le),wt=hi(Z,me,Le),Ft=ho(Z,me),Je=Hi(Z,me);return{type:"option",data:me,isDisabled:oe,isSelected:wt,label:Ft,value:Je,index:nt}}function Qi(Z,me){return Z.options.map(function(Le,nt){if("options"in Le){var oe=Le.options.map(function(Ft,Je){return gi(Z,Ft,me,Je)}).filter(function(Ft){return ui(Z,Ft)});return oe.length>0?{type:"group",data:Le,options:oe,index:nt}:void 0}var wt=gi(Z,Le,me,nt);return ui(Z,wt)?wt:void 0}).filter(Xn.G)}function zi(Z){return Z.reduce(function(me,Le){return Le.type==="group"?me.push.apply(me,it(Le.options.map(function(nt){return nt.data}))):me.push(Le.data),me},[])}function Li(Z,me){return zi(Qi(Z,me))}function ui(Z,me){var Le=Z.inputValue,nt=Le===void 0?"":Le,oe=me.data,wt=me.isSelected,Ft=me.label,Je=me.value;return(!Uo(Z)||!wt)&&wo(Z,{label:Ft,value:Je,data:oe},nt)}function Vi(Z,me){var Le=Z.focusedValue,nt=Z.selectValue,oe=nt.indexOf(Le);if(oe>-1){var wt=me.indexOf(Le);if(wt>-1)return Le;if(oe<me.length)return me[oe]}return null}function Bi(Z,me){var Le=Z.focusedOption;return Le&&me.indexOf(Le)>-1?Le:me[0]}var ho=function(me,Le){return me.getOptionLabel(Le)},Hi=function(me,Le){return me.getOptionValue(Le)};function Eo(Z,me,Le){return typeof Z.isOptionDisabled=="function"?Z.isOptionDisabled(me,Le):!1}function hi(Z,me,Le){if(Le.indexOf(me)>-1)return!0;if(typeof Z.isOptionSelected=="function")return Z.isOptionSelected(me,Le);var nt=Hi(Z,me);return Le.some(function(oe){return Hi(Z,oe)===nt})}function wo(Z,me,Le){return Z.filterOption?Z.filterOption(me,Le):!0}var Uo=function(me){var Le=me.hideSelectedOptions,nt=me.isMulti;return Le===void 0?nt:Le},ie=1,B=function(Z){Yt(Le,Z);var me=Ye(Le);function Le(nt){var oe;if(Bn(this,Le),oe=me.call(this,nt),oe.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},oe.blockOptionHover=!1,oe.isComposing=!1,oe.commonProps=void 0,oe.initialTouchX=0,oe.initialTouchY=0,oe.instancePrefix="",oe.openAfterFocus=!1,oe.scrollToFocusedOptionOnUpdate=!1,oe.userIsDragging=void 0,oe.controlRef=null,oe.getControlRef=function(Je){oe.controlRef=Je},oe.focusedOptionRef=null,oe.getFocusedOptionRef=function(Je){oe.focusedOptionRef=Je},oe.menuListRef=null,oe.getMenuListRef=function(Je){oe.menuListRef=Je},oe.inputRef=null,oe.getInputRef=function(Je){oe.inputRef=Je},oe.focus=oe.focusInput,oe.blur=oe.blurInput,oe.onChange=function(Je,Nt){var sn=oe.props,Dn=sn.onChange,Kn=sn.name;Nt.name=Kn,oe.ariaOnChange(Je,Nt),Dn(Je,Nt)},oe.setValue=function(Je,Nt,sn){var Dn=oe.props,Kn=Dn.closeMenuOnSelect,Dr=Dn.isMulti,mr=Dn.inputValue;oe.onInputChange("",{action:"set-value",prevInputValue:mr}),Kn&&(oe.setState({inputIsHiddenAfterUpdate:!Dr}),oe.onMenuClose()),oe.setState({clearFocusValueOnUpdate:!0}),oe.onChange(Je,{action:Nt,option:sn})},oe.selectOption=function(Je){var Nt=oe.props,sn=Nt.blurInputOnSelect,Dn=Nt.isMulti,Kn=Nt.name,Dr=oe.state.selectValue,mr=Dn&&oe.isOptionSelected(Je,Dr),Nr=oe.isOptionDisabled(Je,Dr);if(mr){var ti=oe.getOptionValue(Je);oe.setValue((0,Xn.B)(Dr.filter(function(Tr){return oe.getOptionValue(Tr)!==ti})),"deselect-option",Je)}else if(!Nr)Dn?oe.setValue((0,Xn.B)([].concat(it(Dr),[Je])),"select-option",Je):oe.setValue((0,Xn.C)(Je),"select-option");else{oe.ariaOnChange((0,Xn.C)(Je),{action:"select-option",option:Je,name:Kn});return}sn&&oe.blurInput()},oe.removeValue=function(Je){var Nt=oe.props.isMulti,sn=oe.state.selectValue,Dn=oe.getOptionValue(Je),Kn=sn.filter(function(mr){return oe.getOptionValue(mr)!==Dn}),Dr=(0,Xn.D)(Nt,Kn,Kn[0]||null);oe.onChange(Dr,{action:"remove-value",removedValue:Je}),oe.focusInput()},oe.clearValue=function(){var Je=oe.state.selectValue;oe.onChange((0,Xn.D)(oe.props.isMulti,[],null),{action:"clear",removedValues:Je})},oe.popValue=function(){var Je=oe.props.isMulti,Nt=oe.state.selectValue,sn=Nt[Nt.length-1],Dn=Nt.slice(0,Nt.length-1),Kn=(0,Xn.D)(Je,Dn,Dn[0]||null);oe.onChange(Kn,{action:"pop-value",removedValue:sn})},oe.getValue=function(){return oe.state.selectValue},oe.cx=function(){for(var Je=arguments.length,Nt=new Array(Je),sn=0;sn<Je;sn++)Nt[sn]=arguments[sn];return Xn.E.apply(void 0,[oe.props.classNamePrefix].concat(Nt))},oe.getOptionLabel=function(Je){return ho(oe.props,Je)},oe.getOptionValue=function(Je){return Hi(oe.props,Je)},oe.getStyles=function(Je,Nt){var sn=oe.props.unstyled,Dn=Xt[Je](Nt,sn);Dn.boxSizing="border-box";var Kn=oe.props.styles[Je];return Kn?Kn(Dn,Nt):Dn},oe.getClassNames=function(Je,Nt){var sn,Dn;return(sn=(Dn=oe.props.classNames)[Je])===null||sn===void 0?void 0:sn.call(Dn,Nt)},oe.getElementId=function(Je){return"".concat(oe.instancePrefix,"-").concat(Je)},oe.getComponents=function(){return(0,Xn.F)(oe.props)},oe.buildCategorizedOptions=function(){return Qi(oe.props,oe.state.selectValue)},oe.getCategorizedOptions=function(){return oe.props.menuIsOpen?oe.buildCategorizedOptions():[]},oe.buildFocusableOptions=function(){return zi(oe.buildCategorizedOptions())},oe.getFocusableOptions=function(){return oe.props.menuIsOpen?oe.buildFocusableOptions():[]},oe.ariaOnChange=function(Je,Nt){oe.setState({ariaSelection:(0,mt.Z)({value:Je},Nt)})},oe.onMenuMouseDown=function(Je){Je.button===0&&(Je.stopPropagation(),Je.preventDefault(),oe.focusInput())},oe.onMenuMouseMove=function(Je){oe.blockOptionHover=!1},oe.onControlMouseDown=function(Je){if(!Je.defaultPrevented){var Nt=oe.props.openMenuOnClick;oe.state.isFocused?oe.props.menuIsOpen?Je.target.tagName!=="INPUT"&&Je.target.tagName!=="TEXTAREA"&&oe.onMenuClose():Nt&&oe.openMenu("first"):(Nt&&(oe.openAfterFocus=!0),oe.focusInput()),Je.target.tagName!=="INPUT"&&Je.target.tagName!=="TEXTAREA"&&Je.preventDefault()}},oe.onDropdownIndicatorMouseDown=function(Je){if(!(Je&&Je.type==="mousedown"&&Je.button!==0)&&!oe.props.isDisabled){var Nt=oe.props,sn=Nt.isMulti,Dn=Nt.menuIsOpen;oe.focusInput(),Dn?(oe.setState({inputIsHiddenAfterUpdate:!sn}),oe.onMenuClose()):oe.openMenu("first"),Je.preventDefault()}},oe.onClearIndicatorMouseDown=function(Je){Je&&Je.type==="mousedown"&&Je.button!==0||(oe.clearValue(),Je.preventDefault(),oe.openAfterFocus=!1,Je.type==="touchend"?oe.focusInput():setTimeout(function(){return oe.focusInput()}))},oe.onScroll=function(Je){typeof oe.props.closeMenuOnScroll=="boolean"?Je.target instanceof HTMLElement&&(0,Xn.H)(Je.target)&&oe.props.onMenuClose():typeof oe.props.closeMenuOnScroll=="function"&&oe.props.closeMenuOnScroll(Je)&&oe.props.onMenuClose()},oe.onCompositionStart=function(){oe.isComposing=!0},oe.onCompositionEnd=function(){oe.isComposing=!1},oe.onTouchStart=function(Je){var Nt=Je.touches,sn=Nt&&Nt.item(0);sn&&(oe.initialTouchX=sn.clientX,oe.initialTouchY=sn.clientY,oe.userIsDragging=!1)},oe.onTouchMove=function(Je){var Nt=Je.touches,sn=Nt&&Nt.item(0);if(sn){var Dn=Math.abs(sn.clientX-oe.initialTouchX),Kn=Math.abs(sn.clientY-oe.initialTouchY),Dr=5;oe.userIsDragging=Dn>Dr||Kn>Dr}},oe.onTouchEnd=function(Je){oe.userIsDragging||(oe.controlRef&&!oe.controlRef.contains(Je.target)&&oe.menuListRef&&!oe.menuListRef.contains(Je.target)&&oe.blurInput(),oe.initialTouchX=0,oe.initialTouchY=0)},oe.onControlTouchEnd=function(Je){oe.userIsDragging||oe.onControlMouseDown(Je)},oe.onClearIndicatorTouchEnd=function(Je){oe.userIsDragging||oe.onClearIndicatorMouseDown(Je)},oe.onDropdownIndicatorTouchEnd=function(Je){oe.userIsDragging||oe.onDropdownIndicatorMouseDown(Je)},oe.handleInputChange=function(Je){var Nt=oe.props.inputValue,sn=Je.currentTarget.value;oe.setState({inputIsHiddenAfterUpdate:!1}),oe.onInputChange(sn,{action:"input-change",prevInputValue:Nt}),oe.props.menuIsOpen||oe.onMenuOpen()},oe.onInputFocus=function(Je){oe.props.onFocus&&oe.props.onFocus(Je),oe.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(oe.openAfterFocus||oe.props.openMenuOnFocus)&&oe.openMenu("first"),oe.openAfterFocus=!1},oe.onInputBlur=function(Je){var Nt=oe.props.inputValue;if(oe.menuListRef&&oe.menuListRef.contains(document.activeElement)){oe.inputRef.focus();return}oe.props.onBlur&&oe.props.onBlur(Je),oe.onInputChange("",{action:"input-blur",prevInputValue:Nt}),oe.onMenuClose(),oe.setState({focusedValue:null,isFocused:!1})},oe.onOptionHover=function(Je){oe.blockOptionHover||oe.state.focusedOption===Je||oe.setState({focusedOption:Je})},oe.shouldHideSelectedOptions=function(){return Uo(oe.props)},oe.onValueInputFocus=function(Je){Je.preventDefault(),Je.stopPropagation(),oe.focus()},oe.onKeyDown=function(Je){var Nt=oe.props,sn=Nt.isMulti,Dn=Nt.backspaceRemovesValue,Kn=Nt.escapeClearsValue,Dr=Nt.inputValue,mr=Nt.isClearable,Nr=Nt.isDisabled,ti=Nt.menuIsOpen,Tr=Nt.onKeyDown,Ai=Nt.tabSelectsValue,Yi=Nt.openMenuOnFocus,yi=oe.state,Ji=yi.focusedOption,ko=yi.focusedValue,Ri=yi.selectValue;if(!Nr&&!(typeof Tr=="function"&&(Tr(Je),Je.defaultPrevented))){switch(oe.blockOptionHover=!0,Je.key){case"ArrowLeft":if(!sn||Dr)return;oe.focusValue("previous");break;case"ArrowRight":if(!sn||Dr)return;oe.focusValue("next");break;case"Delete":case"Backspace":if(Dr)return;if(ko)oe.removeValue(ko);else{if(!Dn)return;sn?oe.popValue():mr&&oe.clearValue()}break;case"Tab":if(oe.isComposing||Je.shiftKey||!ti||!Ai||!Ji||Yi&&oe.isOptionSelected(Ji,Ri))return;oe.selectOption(Ji);break;case"Enter":if(Je.keyCode===229)break;if(ti){if(!Ji||oe.isComposing)return;oe.selectOption(Ji);break}return;case"Escape":ti?(oe.setState({inputIsHiddenAfterUpdate:!1}),oe.onInputChange("",{action:"menu-close",prevInputValue:Dr}),oe.onMenuClose()):mr&&Kn&&oe.clearValue();break;case" ":if(Dr)return;if(!ti){oe.openMenu("first");break}if(!Ji)return;oe.selectOption(Ji);break;case"ArrowUp":ti?oe.focusOption("up"):oe.openMenu("last");break;case"ArrowDown":ti?oe.focusOption("down"):oe.openMenu("first");break;case"PageUp":if(!ti)return;oe.focusOption("pageup");break;case"PageDown":if(!ti)return;oe.focusOption("pagedown");break;case"Home":if(!ti)return;oe.focusOption("first");break;case"End":if(!ti)return;oe.focusOption("last");break;default:return}Je.preventDefault()}},oe.instancePrefix="react-select-"+(oe.props.instanceId||++ie),oe.state.selectValue=(0,Xn.I)(nt.value),nt.menuIsOpen&&oe.state.selectValue.length){var wt=oe.buildFocusableOptions(),Ft=wt.indexOf(oe.state.selectValue[0]);oe.state.focusedOption=wt[Ft]}return oe}return Bt(Le,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&(0,Xn.J)(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(oe){var wt=this.props,Ft=wt.isDisabled,Je=wt.menuIsOpen,Nt=this.state.isFocused;(Nt&&!Ft&&oe.isDisabled||Nt&&Je&&!oe.menuIsOpen)&&this.focusInput(),Nt&&Ft&&!oe.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!Nt&&!Ft&&oe.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&((0,Xn.J)(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(oe,wt){this.props.onInputChange(oe,wt)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(oe){var wt=this,Ft=this.state,Je=Ft.selectValue,Nt=Ft.isFocused,sn=this.buildFocusableOptions(),Dn=oe==="first"?0:sn.length-1;if(!this.props.isMulti){var Kn=sn.indexOf(Je[0]);Kn>-1&&(Dn=Kn)}this.scrollToFocusedOptionOnUpdate=!(Nt&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:sn[Dn]},function(){return wt.onMenuOpen()})}},{key:"focusValue",value:function(oe){var wt=this.state,Ft=wt.selectValue,Je=wt.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var Nt=Ft.indexOf(Je);Je||(Nt=-1);var sn=Ft.length-1,Dn=-1;if(Ft.length){switch(oe){case"previous":Nt===0?Dn=0:Nt===-1?Dn=sn:Dn=Nt-1;break;case"next":Nt>-1&&Nt<sn&&(Dn=Nt+1);break}this.setState({inputIsHidden:Dn!==-1,focusedValue:Ft[Dn]})}}}},{key:"focusOption",value:function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",wt=this.props.pageSize,Ft=this.state.focusedOption,Je=this.getFocusableOptions();if(Je.length){var Nt=0,sn=Je.indexOf(Ft);Ft||(sn=-1),oe==="up"?Nt=sn>0?sn-1:Je.length-1:oe==="down"?Nt=(sn+1)%Je.length:oe==="pageup"?(Nt=sn-wt,Nt<0&&(Nt=0)):oe==="pagedown"?(Nt=sn+wt,Nt>Je.length-1&&(Nt=Je.length-1)):oe==="last"&&(Nt=Je.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:Je[Nt],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(oi):(0,mt.Z)((0,mt.Z)({},oi),this.props.theme):oi}},{key:"getCommonProps",value:function(){var oe=this.clearValue,wt=this.cx,Ft=this.getStyles,Je=this.getClassNames,Nt=this.getValue,sn=this.selectOption,Dn=this.setValue,Kn=this.props,Dr=Kn.isMulti,mr=Kn.isRtl,Nr=Kn.options,ti=this.hasValue();return{clearValue:oe,cx:wt,getStyles:Ft,getClassNames:Je,getValue:Nt,hasValue:ti,isMulti:Dr,isRtl:mr,options:Nr,selectOption:sn,selectProps:Kn,setValue:Dn,theme:this.getTheme()}}},{key:"hasValue",value:function(){var oe=this.state.selectValue;return oe.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var oe=this.props,wt=oe.isClearable,Ft=oe.isMulti;return wt===void 0?Ft:wt}},{key:"isOptionDisabled",value:function(oe,wt){return Eo(this.props,oe,wt)}},{key:"isOptionSelected",value:function(oe,wt){return hi(this.props,oe,wt)}},{key:"filterOption",value:function(oe,wt){return wo(this.props,oe,wt)}},{key:"formatOptionLabel",value:function(oe,wt){if(typeof this.props.formatOptionLabel=="function"){var Ft=this.props.inputValue,Je=this.state.selectValue;return this.props.formatOptionLabel(oe,{context:wt,inputValue:Ft,selectValue:Je})}else return this.getOptionLabel(oe)}},{key:"formatGroupLabel",value:function(oe){return this.props.formatGroupLabel(oe)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var oe=this.props,wt=oe.isDisabled,Ft=oe.isSearchable,Je=oe.inputId,Nt=oe.inputValue,sn=oe.tabIndex,Dn=oe.form,Kn=oe.menuIsOpen,Dr=oe.required,mr=this.getComponents(),Nr=mr.Input,ti=this.state,Tr=ti.inputIsHidden,Ai=ti.ariaSelection,Yi=this.commonProps,yi=Je||this.getElementId("input"),Ji=(0,mt.Z)((0,mt.Z)((0,mt.Z)({"aria-autocomplete":"list","aria-expanded":Kn,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":Dr,role:"combobox"},Kn&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!Ft&&{"aria-readonly":!0}),this.hasValue()?Ai?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return Ft?d.createElement(Nr,(0,Cn.Z)({},Yi,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:yi,innerRef:this.getInputRef,isDisabled:wt,isHidden:Tr,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:sn,form:Dn,type:"text",value:Nt},Ji)):d.createElement(ot,(0,Cn.Z)({id:yi,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Xn.K,onFocus:this.onInputFocus,disabled:wt,tabIndex:sn,inputMode:"none",form:Dn,value:""},Ji))}},{key:"renderPlaceholderOrValue",value:function(){var oe=this,wt=this.getComponents(),Ft=wt.MultiValue,Je=wt.MultiValueContainer,Nt=wt.MultiValueLabel,sn=wt.MultiValueRemove,Dn=wt.SingleValue,Kn=wt.Placeholder,Dr=this.commonProps,mr=this.props,Nr=mr.controlShouldRenderValue,ti=mr.isDisabled,Tr=mr.isMulti,Ai=mr.inputValue,Yi=mr.placeholder,yi=this.state,Ji=yi.selectValue,ko=yi.focusedValue,Ri=yi.isFocused;if(!this.hasValue()||!Nr)return Ai?null:d.createElement(Kn,(0,Cn.Z)({},Dr,{key:"placeholder",isDisabled:ti,isFocused:Ri,innerProps:{id:this.getElementId("placeholder")}}),Yi);if(Tr)return Ji.map(function(vo,Cs){var al=vo===ko,fs="".concat(oe.getOptionLabel(vo),"-").concat(oe.getOptionValue(vo));return d.createElement(Ft,(0,Cn.Z)({},Dr,{components:{Container:Je,Label:Nt,Remove:sn},isFocused:al,isDisabled:ti,key:fs,index:Cs,removeProps:{onClick:function(){return oe.removeValue(vo)},onTouchEnd:function(){return oe.removeValue(vo)},onMouseDown:function(ys){ys.preventDefault()}},data:vo}),oe.formatOptionLabel(vo,"value"))});if(Ai)return null;var jo=Ji[0];return d.createElement(Dn,(0,Cn.Z)({},Dr,{data:jo,isDisabled:ti}),this.formatOptionLabel(jo,"value"))}},{key:"renderClearIndicator",value:function(){var oe=this.getComponents(),wt=oe.ClearIndicator,Ft=this.commonProps,Je=this.props,Nt=Je.isDisabled,sn=Je.isLoading,Dn=this.state.isFocused;if(!this.isClearable()||!wt||Nt||!this.hasValue()||sn)return null;var Kn={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return d.createElement(wt,(0,Cn.Z)({},Ft,{innerProps:Kn,isFocused:Dn}))}},{key:"renderLoadingIndicator",value:function(){var oe=this.getComponents(),wt=oe.LoadingIndicator,Ft=this.commonProps,Je=this.props,Nt=Je.isDisabled,sn=Je.isLoading,Dn=this.state.isFocused;if(!wt||!sn)return null;var Kn={"aria-hidden":"true"};return d.createElement(wt,(0,Cn.Z)({},Ft,{innerProps:Kn,isDisabled:Nt,isFocused:Dn}))}},{key:"renderIndicatorSeparator",value:function(){var oe=this.getComponents(),wt=oe.DropdownIndicator,Ft=oe.IndicatorSeparator;if(!wt||!Ft)return null;var Je=this.commonProps,Nt=this.props.isDisabled,sn=this.state.isFocused;return d.createElement(Ft,(0,Cn.Z)({},Je,{isDisabled:Nt,isFocused:sn}))}},{key:"renderDropdownIndicator",value:function(){var oe=this.getComponents(),wt=oe.DropdownIndicator;if(!wt)return null;var Ft=this.commonProps,Je=this.props.isDisabled,Nt=this.state.isFocused,sn={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return d.createElement(wt,(0,Cn.Z)({},Ft,{innerProps:sn,isDisabled:Je,isFocused:Nt}))}},{key:"renderMenu",value:function(){var oe=this,wt=this.getComponents(),Ft=wt.Group,Je=wt.GroupHeading,Nt=wt.Menu,sn=wt.MenuList,Dn=wt.MenuPortal,Kn=wt.LoadingMessage,Dr=wt.NoOptionsMessage,mr=wt.Option,Nr=this.commonProps,ti=this.state.focusedOption,Tr=this.props,Ai=Tr.captureMenuScroll,Yi=Tr.inputValue,yi=Tr.isLoading,Ji=Tr.loadingMessage,ko=Tr.minMenuHeight,Ri=Tr.maxMenuHeight,jo=Tr.menuIsOpen,vo=Tr.menuPlacement,Cs=Tr.menuPosition,al=Tr.menuPortalTarget,fs=Tr.menuShouldBlockScroll,ps=Tr.menuShouldScrollIntoView,ys=Tr.noOptionsMessage,Xi=Tr.onMenuScrollToTop,ls=Tr.onMenuScrollToBottom;if(!jo)return null;var _a=function(M,I){var Q=M.type,se=M.data,Ve=M.isDisabled,Gt=M.isSelected,pn=M.label,ir=M.value,zr=ti===se,kr=Ve?void 0:function(){return oe.onOptionHover(se)},Hr=Ve?void 0:function(){return oe.selectOption(se)},Ei="".concat(oe.getElementId("option"),"-").concat(I),Ii={id:Ei,onClick:Hr,onMouseMove:kr,onMouseOver:kr,tabIndex:-1};return d.createElement(mr,(0,Cn.Z)({},Nr,{innerProps:Ii,data:se,isDisabled:Ve,isSelected:Gt,key:Ei,label:pn,type:Q,value:ir,isFocused:zr,innerRef:zr?oe.getFocusedOptionRef:void 0}),oe.formatOptionLabel(M.data,"menu"))},Ya;if(this.hasOptions())Ya=this.getCategorizedOptions().map(function(h){if(h.type==="group"){var M=h.data,I=h.options,Q=h.index,se="".concat(oe.getElementId("group"),"-").concat(Q),Ve="".concat(se,"-heading");return d.createElement(Ft,(0,Cn.Z)({},Nr,{key:se,data:M,options:I,Heading:Je,headingProps:{id:Ve,data:h.data},label:oe.formatGroupLabel(h.data)}),h.options.map(function(Gt){return _a(Gt,"".concat(Q,"-").concat(Gt.index))}))}else if(h.type==="option")return _a(h,"".concat(h.index))});else if(yi){var ea=Ji({inputValue:Yi});if(ea===null)return null;Ya=d.createElement(Kn,Nr,ea)}else{var ll=ys({inputValue:Yi});if(ll===null)return null;Ya=d.createElement(Dr,Nr,ll)}var vl={minMenuHeight:ko,maxMenuHeight:Ri,menuPlacement:vo,menuPosition:Cs,menuShouldScrollIntoView:ps},c=d.createElement(Xn.M,(0,Cn.Z)({},Nr,vl),function(h){var M=h.ref,I=h.placerProps,Q=I.placement,se=I.maxHeight;return d.createElement(Nt,(0,Cn.Z)({},Nr,vl,{innerRef:M,innerProps:{onMouseDown:oe.onMenuMouseDown,onMouseMove:oe.onMenuMouseMove,id:oe.getElementId("listbox")},isLoading:yi,placement:Q}),d.createElement(Wi,{captureEnabled:Ai,onTopArrive:Xi,onBottomArrive:ls,lockEnabled:fs},function(Ve){return d.createElement(sn,(0,Cn.Z)({},Nr,{innerRef:function(pn){oe.getMenuListRef(pn),Ve(pn)},isLoading:yi,maxHeight:se,focusedOption:ti}),Ya)}))});return al||Cs==="fixed"?d.createElement(Dn,(0,Cn.Z)({},Nr,{appendTo:al,controlElement:this.controlRef,menuPlacement:vo,menuPosition:Cs}),c):c}},{key:"renderFormField",value:function(){var oe=this,wt=this.props,Ft=wt.delimiter,Je=wt.isDisabled,Nt=wt.isMulti,sn=wt.name,Dn=wt.required,Kn=this.state.selectValue;if(!(!sn||Je)){if(Dn&&!this.hasValue())return d.createElement(to,{name:sn,onFocus:this.onValueInputFocus});if(Nt)if(Ft){var Dr=Kn.map(function(ti){return oe.getOptionValue(ti)}).join(Ft);return d.createElement("input",{name:sn,type:"hidden",value:Dr})}else{var mr=Kn.length>0?Kn.map(function(ti,Tr){return d.createElement("input",{key:"i-".concat(Tr),name:sn,type:"hidden",value:oe.getOptionValue(ti)})}):d.createElement("input",{name:sn,type:"hidden",value:""});return d.createElement("div",null,mr)}else{var Nr=Kn[0]?this.getOptionValue(Kn[0]):"";return d.createElement("input",{name:sn,type:"hidden",value:Nr})}}}},{key:"renderLiveRegion",value:function(){var oe=this.commonProps,wt=this.state,Ft=wt.ariaSelection,Je=wt.focusedOption,Nt=wt.focusedValue,sn=wt.isFocused,Dn=wt.selectValue,Kn=this.getFocusableOptions();return d.createElement(vr,(0,Cn.Z)({},oe,{id:this.getElementId("live-region"),ariaSelection:Ft,focusedOption:Je,focusedValue:Nt,isFocused:sn,selectValue:Dn,focusableOptions:Kn}))}},{key:"render",value:function(){var oe=this.getComponents(),wt=oe.Control,Ft=oe.IndicatorsContainer,Je=oe.SelectContainer,Nt=oe.ValueContainer,sn=this.props,Dn=sn.className,Kn=sn.id,Dr=sn.isDisabled,mr=sn.menuIsOpen,Nr=this.state.isFocused,ti=this.commonProps=this.getCommonProps();return d.createElement(Je,(0,Cn.Z)({},ti,{className:Dn,innerProps:{id:Kn,onKeyDown:this.onKeyDown},isDisabled:Dr,isFocused:Nr}),this.renderLiveRegion(),d.createElement(wt,(0,Cn.Z)({},ti,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:Dr,isFocused:Nr,menuIsOpen:mr}),d.createElement(Nt,(0,Cn.Z)({},ti,{isDisabled:Dr}),this.renderPlaceholderOrValue(),this.renderInput()),d.createElement(Ft,(0,Cn.Z)({},ti,{isDisabled:Dr}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(oe,wt){var Ft=wt.prevProps,Je=wt.clearFocusValueOnUpdate,Nt=wt.inputIsHiddenAfterUpdate,sn=wt.ariaSelection,Dn=wt.isFocused,Kn=wt.prevWasFocused,Dr=oe.options,mr=oe.value,Nr=oe.menuIsOpen,ti=oe.inputValue,Tr=oe.isMulti,Ai=(0,Xn.I)(mr),Yi={};if(Ft&&(mr!==Ft.value||Dr!==Ft.options||Nr!==Ft.menuIsOpen||ti!==Ft.inputValue)){var yi=Nr?Li(oe,Ai):[],Ji=Je?Vi(wt,Ai):null,ko=Bi(wt,yi);Yi={selectValue:Ai,focusedOption:ko,focusedValue:Ji,clearFocusValueOnUpdate:!1}}var Ri=Nt!=null&&oe!==Ft?{inputIsHidden:Nt,inputIsHiddenAfterUpdate:void 0}:{},jo=sn,vo=Dn&&Kn;return Dn&&!vo&&(jo={value:(0,Xn.D)(Tr,Ai,Ai[0]||null),options:Ai,action:"initial-input-focus"},vo=!Kn),sn?.action==="initial-input-focus"&&(jo=null),(0,mt.Z)((0,mt.Z)((0,mt.Z)({},Yi),Ri),{},{prevProps:oe,ariaSelection:jo,prevWasFocused:vo})}}]),Le}(d.Component);B.defaultProps=qr;var he=i(53563),xe=i(12788),rt=i(24390),Lt=(0,d.forwardRef)(function(Z,me){var Le=Fn(Z);return d.createElement(B,(0,Cn.Z)({ref:me},Le))}),en=function(Z){var me=Z.nonce,Le=Z.children,nt=Z.cacheKey,oe=useMemo(function(){return createCache({key:nt,nonce:me})},[nt,me]);return React.createElement(CacheProvider,{value:oe},Le)},An=Lt,_n=i(86357);function Mr(Z){return(0,Zr.Z)(1,arguments),(0,zn.Z)(Z).getTime()<Date.now()}var Ur=i(74758),Pr=i(20108),Kr=i(89793),Qr=i.n(Kr),Wr=i(85973),ci=i.n(Wr),pr=i(90748),Xr=i.n(pr),Br={};(function(){Br.d=function(Z,me){for(var Le in me)Br.o(me,Le)&&!Br.o(Z,Le)&&Object.defineProperty(Z,Le,{enumerable:!0,get:me[Le]})}})(),function(){Br.o=function(Z,me){return Object.prototype.hasOwnProperty.call(Z,me)}}();var Mn={};Br.d(Mn,{Hn:function(){return bs},xC:function(){return Bo},iq:function(){return Wo},NY:function(){return qa},OB:function(){return Ml},ug:function(){return ql},m$:function(){return mu},uT:function(){return xl},O4:function(){return Xu},jW:function(){return qu},QH:function(){return Da},Y_:function(){return Ba},W1:function(){return Vo},vq:function(){return Ts},MG:function(){return Ho},xZ:function(){return ds},tM:function(){return wc},c4:function(){return lu},x7:function(){return Ql},W$:function(){return ha},J5:function(){return Ac},l0:function(){return af},jm:function(){return Au},JQ:function(){return gu},Zc:function(){return eu},XL:function(){return Ua},Hw:function(){return Fs},rt:function(){return Uc},rU:function(){return Jl},Qj:function(){return lf},dO:function(){return Yl},dJ:function(){return Lc},Hz:function(){return rl},ZF:function(){return wl},X0:function(){return Nc},cJ:function(){return Fo},N$:function(){return xs},vG:function(){return lc},w7:function(){return ml},v4:function(){return il},tU:function(){return Aa},RM:function(){return us},oL:function(){return bl},JV:function(){return rc},ij:function(){return hu},fG:function(){return Nf},fC:function(){return Xa},m:function(){return kc},SL:function(){return pu},fz:function(){return ts},qb:function(){return Xl},t3:function(){return Nu},Bg:function(){return Ru},_Y:function(){return tc},iA:function(){return Pc},Ui:function(){return na},L8:function(){return su},I8:function(){return Ms},w6:function(){return fd},e5:function(){return Ff},ZT:function(){return ou},dU:function(){return Vc},nn:function(){return Hc},tg:function(){return kl},mD:function(){return zl},k2:function(){return Co},UN:function(){return Ko},CJ:function(){return Rl},qX:function(){return cl},OT:function(){return yu},X7:function(){return Zc},CR:function(){return mc},jV:function(){return Cf},Q1:function(){return pa},WY:function(){return Va},YB:function(){return vc},UW:function(){return yc},to:function(){return xf},I0:function(){return jf},So:function(){return cc},L7:function(){return $s},QI:function(){return da},Vu:function(){return Oo},Wq:function(){return Dl},W6:function(){return go},VP:function(){return Lf},Xe:function(){return Lu},mZ:function(){return Ns},kY:function(){return tu},L0:function(){return Wc},E2:function(){return Ul},go:function(){return fc},c1:function(){return qf},yX:function(){return mf},F5:function(){return dc},lm:function(){return $a},o1:function(){return _u},Yw:function(){return Ef},aM:function(){return Pu},Kx:function(){return Ps},ss:function(){return zc},vn:function(){return xt},Uq:function(){return Qs},j1:function(){return fu},Sh:function(){return Os},rS:function(){return Sl},Od:function(){return Tf}});var qi=Z=>{var me={};return Br.d(me,Z),me},Po=Z=>()=>Z,mo=qi({default:()=>f()});const Ko=(Z,me)=>(0,mo.default)(Z,["attributes",me,"type"],""),Co=(Z,me)=>(0,mo.default)(Z,["attributes",...me],"");var No=Z=>{var me={};return Br.d(me,Z),me},Ao=Z=>()=>Z,vt=No({Children:()=>d.Children,Fragment:()=>d.Fragment,cloneElement:()=>d.cloneElement,createContext:()=>d.createContext,createElement:()=>d.createElement,default:()=>d,useCallback:()=>d.useCallback,useContext:()=>d.useContext,useEffect:()=>d.useEffect,useLayoutEffect:()=>d.useLayoutEffect,useMemo:()=>d.useMemo,useRef:()=>d.useRef,useState:()=>d.useState}),la=Z=>{var me={};return Br.d(me,Z),me},Es=Z=>()=>Z,Qn=la({Alert:()=>j,BaseCheckbox:()=>z.C,Box:()=>F.x,Button:()=>K.z,Checkbox:()=>G.X,DatePicker:()=>Y.M,DateTimePicker:()=>ae.x,Dialog:()=>Ce.V,DialogBody:()=>J.a,DialogFooter:()=>le.c,Dots:()=>Ie,EmptyStateLayout:()=>Fe.x,Field:()=>ut.g,FieldInput:()=>ht._,Flex:()=>V.k,Icon:()=>Ot.J,IconButton:()=>Ue.h,JSONInput:()=>at.V,Loader:()=>Pt.a,NextLink:()=>_e,NumberInput:()=>lt.Y,Option:()=>kt.W,PageLink:()=>We,Pagination:()=>nn,Popover:()=>hn.J2,PreviousLink:()=>Ee,SearchForm:()=>Rn.U,Searchbar:()=>kn.w,Select:()=>$t.P,SingleSelect:()=>yn.q4,SingleSelectOption:()=>yn.ag,Table:()=>Yn.i,Tag:()=>cn.V,Tbody:()=>st.p,Td:()=>on.Td,TextInput:()=>dt.o,Textarea:()=>Dt.g,Th:()=>on.Th,Thead:()=>Ht.h,TimePicker:()=>rn.j,ToggleInput:()=>ke.s,Tooltip:()=>ct.u,Tr:()=>D.Tr,Typography:()=>L.Z,VisuallyHidden:()=>tt.T}),ms=Z=>{var me={};return Br.d(me,Z),me},ua=Z=>()=>Z,co=ms({CarretDown:()=>W.Z,Clock:()=>re.Z,Cross:()=>x.Z,EmptyDocuments:()=>Oe.Z,EmptyPermissions:()=>Ze.Z,EmptyPictures:()=>pt.Z,ExclamationMarkCircle:()=>m.Z,Eye:()=>$e.Z,EyeStriked:()=>Re.Z,Minus:()=>Ne,Plus:()=>bt.Z,Refresh:()=>Kt.Z,Search:()=>an.Z,Trash:()=>In.Z}),Zs=Z=>{var me={};return Br.d(me,Z),me},ya=Z=>()=>Z,qe=Zs({default:()=>Wn()}),Oa=Z=>{var me={};return Br.d(me,Z),me},ul=Z=>()=>Z,Mo=Oa({useIntl:()=>gr.Z});const bs=({content:Z,...me})=>{const{formatMessage:Le}=(0,Mo.useIntl)();return vt.default.createElement(Qn.EmptyStateLayout,{icon:vt.default.createElement(co.ExclamationMarkCircle,{width:"10rem"}),content:Le({id:Z.id,defaultMessage:Z.defaultMessage},Z.values),...me})};bs.defaultProps={content:{id:"anErrorOccurred",defaultMessage:"Woops! Something went wrong. Please, try again.",values:{}}},bs.propTypes={content:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string,values:qe.default.object})};var ca=Z=>{var me={};return Br.d(me,Z),me},El=Z=>()=>Z,Ds=ca({NavLink:()=>q.OL,Redirect:()=>fr.l_,useHistory:()=>fr.k6,useLocation:()=>fr.TH}),Zi=Z=>{var me={};return Br.d(me,Z),me},Xo=Z=>()=>Z,po=Zi({Link:()=>Rr.r,LinkButton:()=>Vr.Q});const go=Z=>{const me=vt.useRef(Z);return vt.useEffect(()=>{me.current=Z}),vt.useMemo(()=>(...Le)=>me.current?.(...Le),[])};/**
396
396
  * @preserve
397
397
  * @typedef {Object} NotificationLink
398
398
  * @property {string | import('react-intl').MessageDescriptor} label
@@ -452,7 +452,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
452
452
  * @returns {RBACContextValue}
453
453
  */const Go=()=>vt.useContext(us),xt=Go;var Tn=Z=>{var me={};return Br.d(me,Z),me},$n=Z=>()=>Z,lr=Tn({default:()=>Ct()}),br=Z=>{var me={};return Br.d(me,Z),me},Gr=Z=>()=>Z,vi=br({default:()=>Pn()}),xi=Z=>{var me={};return Br.d(me,Z),me},Ti=Z=>()=>Z,bi=xi({default:()=>qn()}),wi=Z=>{var me={};return Br.d(me,Z),me},fi=Z=>()=>Z,ji=wi({AxiosError:()=>Tt.d7,default:()=>fe.default}),lo=Z=>{var me={};return Br.d(me,Z),me},uo=Z=>()=>Z,xr=lo({default:()=>Qe(),parse:()=>ve.parse,stringify:()=>ve.stringify}),So=Z=>{var me={};return Br.d(me,Z),me},Do=Z=>()=>Z,bo=So({default:()=>bn()});const no="jwtToken",Yo="userInfo",as="GUIDED_TOUR_CURRENT_STEP",Ks="GUIDED_TOUR_COMPLETED_STEPS",qo="GUIDED_TOUR_SKIPPED",Gs="STRAPI_THEME",Ys="STRAPI_UPLOAD_MODAL_VIEW",Ea="STRAPI_UPLOAD_LIBRARY_VIEW",Na=JSON.parse,Ta=JSON.stringify,Ms={clear(Z){return localStorage&&localStorage.getItem(Z)?localStorage.removeItem(Z):sessionStorage&&sessionStorage.getItem(Z)?sessionStorage.removeItem(Z):null},clearAppStorage(){if(localStorage){const Z=Ms.get("videos"),me=Ms.get("onboarding"),Le=Ms.get("STRAPI_UPDATE_NOTIF"),nt=localStorage.getItem("strapi-admin-language"),oe=Ms.get(as),wt=Ms.get(Ks),Ft=Na(localStorage.getItem(qo)),Je=localStorage.getItem(Gs),Nt=localStorage.getItem(Ea),sn=localStorage.getItem(Ys);localStorage.clear(),localStorage.setItem("videos",JSON.stringify(Z)),localStorage.setItem("onboarding",me),localStorage.setItem("STRAPI_UPDATE_NOTIF",Le),localStorage.setItem("strapi-admin-language",nt),localStorage.setItem(as,Ta(oe)),localStorage.setItem(Ks,Ta(wt)),localStorage.setItem(qo,Ta(Ft)),localStorage.setItem(Gs,Je),!(0,bo.default)(Nt)&&localStorage.setItem(Ea,Nt),!(0,bo.default)(sn)&&localStorage.setItem(Ys,sn)}sessionStorage&&sessionStorage.clear()},clearToken(Z=no){return Ms.clear(Z)},clearUserInfo(Z=Yo){return Ms.clear(Z)},get(Z){return localStorage&&localStorage.getItem(Z)?Na(localStorage.getItem(Z))||null:sessionStorage&&sessionStorage.getItem(Z)&&Na(sessionStorage.getItem(Z))||null},getToken(Z=no){return Ms.get(Z)},getUserInfo(Z=Yo){return Ms.get(Z)},set(Z,me,Le){return(0,lr.default)(Z)?null:Le&&localStorage?localStorage.setItem(me,Ta(Z)):sessionStorage?sessionStorage.setItem(me,Ta(Z)):null},setToken(Z="",me=!1,Le=no){return Ms.set(Z,Le,me)},setUserInfo(Z="",me=!1,Le=Yo){return Ms.set(Z,Le,me)},updateToken(Z=""){const me=localStorage&&localStorage.getItem(no);return Ms.setToken(Z,me)}},Fl=async Z=>(Z.headers={Authorization:`Bearer ${Ms.getToken()}`},Z),wa=Z=>Promise.reject(Z),Bl=Z=>Z,ba=Z=>{throw Z?.response?.status===401&&(Ms.clearAppStorage(),window.location.reload()),Z},Ro=Z=>{Z.interceptors.request.use(Fl,wa),Z.interceptors.response.use(Bl,ba)},Lr=()=>{const Z=ji.default.create({headers:{Accept:"application/json","Content-Type":"application/json"},paramsSerializer:me=>xr.default.stringify(me,{encode:!1})});return Ro(Z),Z},es=Lr(),Ws=Z=>typeof Z=="string"&&Z.charAt(0)!=="/"?`/${Z}`:Z,ta=Z=>new RegExp("^(?:[a-z+]+:)?//","i").test(Z),Ja=Z=>ta(Z)?Z:Ws(Z),kl=(Z={})=>(es.defaults.baseURL=window.strapi.backendURL,{get:(me,Le)=>es.get(Ja(me),{...Z,...Le}),put:(me,Le,nt)=>es.put(Ja(me),Le,{...Z,...nt}),post:(me,Le,nt)=>es.post(Ja(me),Le,{...Z,...nt}),del:(me,Le)=>es.delete(Ja(me),{...Z,...Le})}),ou=(Z,me)=>(0,bi.default)(Z,(Le,nt)=>{me.find(oe=>oe.action===nt.action&&oe.subject===nt.subject)&&Le.push(nt)},[]),gs=Z=>Z.map(me=>(0,vi.default)(me,(Le,nt)=>["action","subject"].includes(nt)&&!(0,lr.default)(Le))),Is=Z=>!(0,lr.default)(Z)&&Z.every(me=>!(0,lr.default)(me.conditions)),cl=async(Z,me,Le)=>{if(!me||!me.length)return!0;const nt=ou(Z,me);if(Is(nt)){let oe=!1;try{const{data:{data:wt}}=await kl().post("/admin/permissions/check",{permissions:gs(nt)},{signal:Le});oe=wt.every(Ft=>Ft===!0)}catch(wt){console.error("Error while checking permissions",wt)}return oe}return nt.length>0};var _s=Z=>{var me={};return Br.d(me,Z),me},Fa=Z=>()=>Z,Ss=_s({default:()=>P.ZP,keyframes:()=>P.F4,useTheme:()=>P.Fg});const fl=(0,Ss.default)(Qn.Flex)`
454
454
  height: 100vh;
455
- `,Gl=({"data-testid":Z,children:me})=>vt.default.createElement(fl,{justifyContent:"space-around","data-testid":Z},vt.default.createElement(Qn.Loader,null,me));Gl.defaultProps={"data-testid":"loader",children:"Loading content."},Gl.propTypes={"data-testid":qe.default.string,children:qe.default.string};const Xu=({permissions:Z,children:me})=>{const Le=new AbortController,{signal:nt}=Le,{allPermissions:oe}=xt(),wt=$a(),[Ft,Je]=(0,vt.useState)({isLoading:!0,canAccess:!1}),Nt=(0,vt.useRef)(!0);return(0,vt.useEffect)(()=>((async()=>{try{Je({isLoading:!0,canAccess:!1});const sn=await cl(oe,Z,nt);Nt.current&&Je({isLoading:!1,canAccess:sn})}catch(sn){Nt.current&&(console.error(sn),wt({type:"warning",message:{id:"notification.error"}}),Je({isLoading:!1}))}})(),()=>{Le.abort()}),[Z]),(0,vt.useEffect)(()=>()=>{Nt.current=!1},[]),Ft.isLoading?vt.default.createElement(Gl,null):Ft.canAccess?me:vt.default.createElement(Ds.Redirect,{to:"/"})};Xu.defaultProps={permissions:[]},Xu.propTypes={children:qe.default.node.isRequired,permissions:qe.default.array};const qu=({permissions:Z,children:me})=>{const{allPermissions:Le}=xt(),nt=$a(),[oe,wt]=(0,vt.useState)({isLoading:!0,canAccess:!1}),Ft=(0,vt.useRef)(!0),Je=new AbortController,{signal:Nt}=Je;return(0,vt.useEffect)(()=>((async()=>{try{wt({isLoading:!0,canAccess:!1});const sn=await cl(Le,Z,Nt);Ft.current&&wt({isLoading:!1,canAccess:sn})}catch(sn){Ft.current&&(console.error(sn),nt({type:"warning",message:{id:"notification.error"}}),wt({isLoading:!1}))}})(),()=>{Je.abort()}),[Z]),(0,vt.useEffect)(()=>()=>{Ft.current=!1},[]),oe.isLoading||!oe.canAccess?null:me};qu.defaultProps={permissions:[]},qu.propTypes={children:qe.default.node.isRequired,permissions:qe.default.array};const Xa=({children:Z,iconRightButton:me,isConfirmButtonLoading:Le,leftButtonText:nt,onConfirm:oe,onToggleDialog:wt,rightButtonText:Ft,title:Je,variantRightButton:Nt,...sn})=>{const{formatMessage:Dn}=(0,Mo.useIntl)();return vt.default.createElement(Qn.Dialog,{onClose:wt,title:Dn({id:Je.id,defaultMessage:Je.defaultMessage}),labelledBy:"confirmation",describedBy:"confirm-description",...sn},vt.default.createElement(Qn.Box,{id:"confirm-description"},Z),vt.default.createElement(Yl,{iconRightButton:me,isConfirmButtonLoading:Le,leftButtonText:nt,onConfirm:oe,onToggleDialog:wt,rightButtonText:Ft,variantRightButton:Nt}))};Xa.defaultProps={iconBody:vt.default.createElement(co.ExclamationMarkCircle,null),iconRightButton:vt.default.createElement(co.Trash,null),isConfirmButtonLoading:!1,leftButtonText:{id:"app.components.Button.cancel",defaultMessage:"Cancel"},rightButtonText:{id:"app.components.Button.confirm",defaultMessage:"Confirm"},title:{id:"app.components.ConfirmDialog.title",defaultMessage:"Confirmation"},variantRightButton:"danger-light"},Xa.propTypes={children:qe.default.node.isRequired,iconBody:qe.default.node,iconRightButton:qe.default.node,isConfirmButtonLoading:qe.default.bool,onConfirm:qe.default.func.isRequired,onToggleDialog:qe.default.func.isRequired,leftButtonText:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}),rightButtonText:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}),title:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}),variantRightButton:qe.default.string};const xl=({iconBody:Z,children:me})=>vt.default.createElement(Qn.DialogBody,{icon:Z},vt.default.createElement(Qn.Flex,{direction:"column",alignItems:"stretch",gap:2},vt.default.createElement(Qn.Flex,{justifyContent:"center"},me)));xl.defaultProps={iconBody:vt.default.createElement(co.ExclamationMarkCircle,null)},xl.propTypes={children:qe.default.node.isRequired,iconBody:qe.default.node};const Yl=({iconRightButton:Z,isConfirmButtonLoading:me,leftButtonText:Le,onConfirm:nt,onToggleDialog:oe,rightButtonText:wt,variantRightButton:Ft})=>{const{formatMessage:Je}=(0,Mo.useIntl)();return vt.default.createElement(Qn.DialogFooter,{startAction:vt.default.createElement(Qn.Button,{onClick:oe,variant:"tertiary"},Je({id:Le.id,defaultMessage:Le.defaultMessage})),endAction:vt.default.createElement(Qn.Button,{onClick:nt,variant:Ft,startIcon:Z,id:"confirm-delete",loading:me},Je({id:wt.id,defaultMessage:wt.defaultMessage}))})};Yl.propTypes={iconRightButton:qe.default.node.isRequired,isConfirmButtonLoading:qe.default.bool.isRequired,onConfirm:qe.default.func.isRequired,onToggleDialog:qe.default.func.isRequired,leftButtonText:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}).isRequired,rightButtonText:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}).isRequired,variantRightButton:qe.default.string.isRequired};const Da=({bodyText:Z,onToggleDialog:me,onConfirm:Le,title:nt,...oe})=>{const{formatMessage:wt}=(0,Mo.useIntl)();return vt.default.createElement(Xa,{onConfirm:Le,onToggleDialog:me,title:nt,...oe},vt.default.createElement(xl,null,vt.default.createElement(Qn.Typography,{variant:"omega"},wt({id:Z.id,defaultMessage:Z.defaultMessage}))))};Da.defaultProps={bodyText:{id:"components.popUpWarning.message",defaultMessage:"Are you sure you want to delete this?"},iconBody:vt.default.createElement(co.ExclamationMarkCircle,null),iconRightButton:vt.default.createElement(co.Trash,null),isConfirmButtonLoading:!1,leftButtonText:{id:"app.components.Button.cancel",defaultMessage:"Cancel"},rightButtonText:{id:"app.components.Button.confirm",defaultMessage:"Confirm"},title:{id:"app.components.ConfirmDialog.title",defaultMessage:"Confirmation"},variantRightButton:"danger-light"},Da.propTypes={bodyText:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}),iconBody:qe.default.node,iconRightButton:qe.default.node,isConfirmButtonLoading:qe.default.bool,onConfirm:qe.default.func.isRequired,onToggleDialog:qe.default.func.isRequired,leftButtonText:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}),rightButtonText:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}),title:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}),variantRightButton:qe.default.string},Da.Root=Xa,Da.Body=xl;const Cl=(0,Ss.default)(Qn.Flex)`
455
+ `,Yl=({"data-testid":Z,children:me})=>vt.default.createElement(fl,{justifyContent:"space-around","data-testid":Z},vt.default.createElement(Qn.Loader,null,me));Yl.defaultProps={"data-testid":"loader",children:"Loading content."},Yl.propTypes={"data-testid":qe.default.string,children:qe.default.string};const Xu=({permissions:Z,children:me})=>{const Le=new AbortController,{signal:nt}=Le,{allPermissions:oe}=xt(),wt=$a(),[Ft,Je]=(0,vt.useState)({isLoading:!0,canAccess:!1}),Nt=(0,vt.useRef)(!0);return(0,vt.useEffect)(()=>((async()=>{try{Je({isLoading:!0,canAccess:!1});const sn=await cl(oe,Z,nt);Nt.current&&Je({isLoading:!1,canAccess:sn})}catch(sn){Nt.current&&(console.error(sn),wt({type:"warning",message:{id:"notification.error"}}),Je({isLoading:!1}))}})(),()=>{Le.abort()}),[Z]),(0,vt.useEffect)(()=>()=>{Nt.current=!1},[]),Ft.isLoading?vt.default.createElement(Yl,null):Ft.canAccess?me:vt.default.createElement(Ds.Redirect,{to:"/"})};Xu.defaultProps={permissions:[]},Xu.propTypes={children:qe.default.node.isRequired,permissions:qe.default.array};const qu=({permissions:Z,children:me})=>{const{allPermissions:Le}=xt(),nt=$a(),[oe,wt]=(0,vt.useState)({isLoading:!0,canAccess:!1}),Ft=(0,vt.useRef)(!0),Je=new AbortController,{signal:Nt}=Je;return(0,vt.useEffect)(()=>((async()=>{try{wt({isLoading:!0,canAccess:!1});const sn=await cl(Le,Z,Nt);Ft.current&&wt({isLoading:!1,canAccess:sn})}catch(sn){Ft.current&&(console.error(sn),nt({type:"warning",message:{id:"notification.error"}}),wt({isLoading:!1}))}})(),()=>{Je.abort()}),[Z]),(0,vt.useEffect)(()=>()=>{Ft.current=!1},[]),oe.isLoading||!oe.canAccess?null:me};qu.defaultProps={permissions:[]},qu.propTypes={children:qe.default.node.isRequired,permissions:qe.default.array};const Xa=({children:Z,iconRightButton:me,isConfirmButtonLoading:Le,leftButtonText:nt,onConfirm:oe,onToggleDialog:wt,rightButtonText:Ft,title:Je,variantRightButton:Nt,...sn})=>{const{formatMessage:Dn}=(0,Mo.useIntl)();return vt.default.createElement(Qn.Dialog,{onClose:wt,title:Dn({id:Je.id,defaultMessage:Je.defaultMessage}),labelledBy:"confirmation",describedBy:"confirm-description",...sn},vt.default.createElement(Qn.Box,{id:"confirm-description"},Z),vt.default.createElement(jl,{iconRightButton:me,isConfirmButtonLoading:Le,leftButtonText:nt,onConfirm:oe,onToggleDialog:wt,rightButtonText:Ft,variantRightButton:Nt}))};Xa.defaultProps={iconBody:vt.default.createElement(co.ExclamationMarkCircle,null),isConfirmButtonLoading:!1,leftButtonText:{id:"app.components.Button.cancel",defaultMessage:"Cancel"},rightButtonText:{id:"app.components.Button.confirm",defaultMessage:"Confirm"},title:{id:"app.components.ConfirmDialog.title",defaultMessage:"Confirmation"},variantRightButton:"danger-light"},Xa.propTypes={children:qe.default.node.isRequired,iconBody:qe.default.node,iconRightButton:qe.default.node,isConfirmButtonLoading:qe.default.bool,onConfirm:qe.default.func.isRequired,onToggleDialog:qe.default.func.isRequired,leftButtonText:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}),rightButtonText:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}),title:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}),variantRightButton:qe.default.string};const xl=({iconBody:Z,children:me})=>vt.default.createElement(Qn.DialogBody,{icon:Z},vt.default.createElement(Qn.Flex,{direction:"column",alignItems:"stretch",gap:2},vt.default.createElement(Qn.Flex,{justifyContent:"center"},me)));xl.defaultProps={iconBody:vt.default.createElement(co.ExclamationMarkCircle,null)},xl.propTypes={children:qe.default.node.isRequired,iconBody:qe.default.node};const jl=({iconRightButton:Z,isConfirmButtonLoading:me,leftButtonText:Le,onConfirm:nt,onToggleDialog:oe,rightButtonText:wt,variantRightButton:Ft})=>{const{formatMessage:Je}=(0,Mo.useIntl)();return vt.default.createElement(Qn.DialogFooter,{startAction:vt.default.createElement(Qn.Button,{onClick:oe,variant:"tertiary"},Je({id:Le.id,defaultMessage:Le.defaultMessage})),endAction:vt.default.createElement(Qn.Button,{onClick:nt,variant:Ft,startIcon:Z,id:"confirm-delete",loading:me},Je({id:wt.id,defaultMessage:wt.defaultMessage}))})};jl.defaultProps={iconRightButton:vt.default.createElement(co.Trash,null)},jl.propTypes={iconRightButton:qe.default.node,isConfirmButtonLoading:qe.default.bool.isRequired,onConfirm:qe.default.func.isRequired,onToggleDialog:qe.default.func.isRequired,leftButtonText:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}).isRequired,rightButtonText:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}).isRequired,variantRightButton:qe.default.string.isRequired};const Da=({bodyText:Z,onToggleDialog:me,onConfirm:Le,title:nt,...oe})=>{const{formatMessage:wt}=(0,Mo.useIntl)();return vt.default.createElement(Xa,{onConfirm:Le,onToggleDialog:me,title:nt,...oe},vt.default.createElement(xl,null,vt.default.createElement(Qn.Typography,{variant:"omega"},wt({id:Z.id,defaultMessage:Z.defaultMessage}))))};Da.defaultProps={bodyText:{id:"components.popUpWarning.message",defaultMessage:"Are you sure you want to delete this?"},iconBody:vt.default.createElement(co.ExclamationMarkCircle,null),iconRightButton:vt.default.createElement(co.Trash,null),isConfirmButtonLoading:!1,leftButtonText:{id:"app.components.Button.cancel",defaultMessage:"Cancel"},rightButtonText:{id:"app.components.Button.confirm",defaultMessage:"Confirm"},title:{id:"app.components.ConfirmDialog.title",defaultMessage:"Confirmation"},variantRightButton:"danger-light"},Da.propTypes={bodyText:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}),iconBody:qe.default.node,iconRightButton:qe.default.node,isConfirmButtonLoading:qe.default.bool,onConfirm:qe.default.func.isRequired,onToggleDialog:qe.default.func.isRequired,leftButtonText:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}),rightButtonText:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}),title:qe.default.shape({id:qe.default.string,defaultMessage:qe.default.string}),variantRightButton:qe.default.string},Da.Root=Xa,Da.Body=xl;const Cl=(0,Ss.default)(Qn.Flex)`
456
456
  margin-right: ${({theme:Z})=>Z.spaces[6]};
457
457
 
458
458
  svg {
@@ -548,7 +548,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
548
548
  position: absolute;
549
549
  width: 1px;
550
550
  }
551
- `,wu=({label:Z,onChange:me,options:Le,type:nt,value:oe})=>{const{formatMessage:wt}=(0,Mo.useIntl)();return nt==="boolean"?vt.default.createElement(Qn.Select,{"aria-label":Z,onChange:me,value:oe},vt.default.createElement(Qn.Option,{value:"true"},"true"),vt.default.createElement(Qn.Option,{value:"false"},"false")):nt==="date"?vt.default.createElement(Qn.DatePicker,{clearLabel:wt({id:"clearLabel",defaultMessage:"Clear"}),ariaLabel:Z,name:"datepicker",onChange:Ft=>me((0,sf.default)(Ft,{representation:"date"})),onClear:()=>me(null),selectedDate:oe?new Date(oe):void 0,selectedDateLabel:Ft=>`Date picker, current is ${Ft}`}):nt==="datetime"?vt.default.createElement(Qn.DateTimePicker,{clearLabel:wt({id:"clearLabel",defaultMessage:"Clear"}),ariaLabel:Z,name:"datetimepicker",onChange:Ft=>me(Ft?Ft.toISOString():null),onClear:()=>me(null),value:oe?new Date(oe):void 0,selectedDateLabel:Ft=>`Date picker, current is ${Ft}`,selectButtonTitle:wt({id:"selectButtonTitle",defaultMessage:"Select"})}):nt==="enumeration"?vt.default.createElement(Qn.Select,{"aria-label":Z,onChange:me,value:oe},Le.map(Ft=>vt.default.createElement(Qn.Option,{key:Ft,value:Ft},Ft))):["float","integer","biginteger","decimal"].includes(nt)?vt.default.createElement(Qn.NumberInput,{"aria-label":Z,name:"filter-value",onValueChange:me,value:oe||0}):nt==="time"?vt.default.createElement(Qn.TimePicker,{"aria-label":Z,onClear:()=>me(""),onChange:me,value:oe,clearLabel:"Clear the selected time picker value"}):vt.default.createElement(Qn.Field,null,vt.default.createElement(Qn.FieldInput,{"aria-label":wt({id:"app.utils.filter-value",defaultMessage:"Filter value"}),onChange:({target:{value:Ft}})=>me(Ft),value:oe,size:"M"}))};wu.defaultProps={label:"",options:[],value:""},wu.propTypes={label:qe.default.string,onChange:qe.default.func.isRequired,options:qe.default.arrayOf(qe.default.string),type:qe.default.string.isRequired,value:qe.default.any};const Ic=({fieldSchema:{type:Z,mainField:me}})=>{switch(me?.schema?.type??Z){case"email":case"text":case"enumeration":case"string":return[{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$eq",defaultMessage:"is"},value:"$eq"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$eqi",defaultMessage:"is (case insensitive)"},value:"$eqi"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$ne",defaultMessage:"is not"},value:"$ne"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$nei",defaultMessage:"is not (case insensitive)"},value:"$nei"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$null",defaultMessage:"is null"},value:"$null"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notNull",defaultMessage:"is not null"},value:"$notNull"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$contains",defaultMessage:"contains"},value:"$contains"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$containsi",defaultMessage:"contains (case insensitive)"},value:"$containsi"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notContains",defaultMessage:"not contains"},value:"$notContains"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notContainsi",defaultMessage:"not contains (case insensitive)"},value:"$notContainsi"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$startsWith",defaultMessage:"starts with"},value:"$startsWith"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$startsWithi",defaultMessage:"starts with (case insensitive)"},value:"$startsWithi"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$endsWith",defaultMessage:"ends with"},value:"$endsWith"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$endsWithi",defaultMessage:"ends with (case insensitive)"},value:"$endsWithi"}];case"float":case"integer":case"biginteger":case"decimal":return[{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$eq",defaultMessage:"is"},value:"$eq"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$ne",defaultMessage:"is not"},value:"$ne"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$null",defaultMessage:"is null"},value:"$null"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notNull",defaultMessage:"is not null"},value:"$notNull"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$gt",defaultMessage:"is greater than"},value:"$gt"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$gte",defaultMessage:"is greater than or equal to"},value:"$gte"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$lt",defaultMessage:"is less than"},value:"$lt"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$lte",defaultMessage:"is less than or equal to"},value:"$lte"}];case"time":case"date":return[{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$eq",defaultMessage:"is"},value:"$eq"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$ne",defaultMessage:"is not"},value:"$ne"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$null",defaultMessage:"is null"},value:"$null"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notNull",defaultMessage:"is not null"},value:"$notNull"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$contains",defaultMessage:"contains (sensitive)"},value:"$contains"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notContains",defaultMessage:"not contains (sensitive)"},value:"$notContains"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$gt",defaultMessage:"is greater than"},value:"$gt"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$gte",defaultMessage:"is greater than or equal to"},value:"$gte"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$lt",defaultMessage:"is less than"},value:"$lt"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$lte",defaultMessage:"is less than or equal to"},value:"$lte"}];case"datetime":return[{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$eq",defaultMessage:"is"},value:"$eq"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$ne",defaultMessage:"is not"},value:"$ne"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$null",defaultMessage:"is null"},value:"$null"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notNull",defaultMessage:"is not null"},value:"$notNull"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$gt",defaultMessage:"is greater than"},value:"$gt"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$gte",defaultMessage:"is greater than or equal to"},value:"$gte"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$lt",defaultMessage:"is less than"},value:"$lt"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$lte",defaultMessage:"is less than or equal to"},value:"$lte"}];default:return[{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$eq",defaultMessage:"is"},value:"$eq"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$eqi",defaultMessage:"is (case insensitive)"},value:"$eqi"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$ne",defaultMessage:"is not"},value:"$ne"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$null",defaultMessage:"is null"},value:"$null"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notNull",defaultMessage:"is not null"},value:"$notNull"}]}};var _c=Z=>{var me={};return Br.d(me,Z),me},Qf=Z=>()=>Z,cu=_c({Form:()=>_r.l0,useFormikContext:()=>_r.u6});const af=Z=>{const me=(0,vt.useRef)(null),{isSubmitting:Le,isValidating:nt,errors:oe,touched:wt}=(0,cu.useFormikContext)();return(0,vt.useEffect)(()=>{if(Le&&!nt){const Ft=me.current.querySelectorAll("[data-strapi-field-error]");if(Ft.length>0){const Je=Ft[0].getAttribute("id"),Nt=me.current.querySelector(`[aria-describedby="${Je}"]`);Nt&&Nt.focus()}}if(!Le&&!nt&&Object.keys(oe).length){const Ft=document.getElementById("global-form-error");Ft&&Ft.focus()}},[oe,Le,nt,wt]),vt.default.createElement(cu.Form,{ref:me,...Z,noValidate:!0})},Jf=({description:Z,fieldSchema:me,type:Le})=>{const{formatMessage:nt}=(0,Mo.useIntl)(),oe=()=>Z?.id?nt({id:Z.id,defaultMessage:Z.defaultMessage},{...Z.values}):"";return{hint:(()=>{const{maximum:wt,minimum:Ft}=Du(me),Je=ja({type:Le,minimum:Ft,maximum:wt}),Nt=typeof Ft=="number",sn=typeof wt=="number",Dn=sn&&Nt,Kn=sn||Nt;return!Z?.id&&!Kn?"":nt({id:"content-manager.form.Input.hint.text",defaultMessage:"{min, select, undefined {} other {min. {min}}}{divider}{max, select, undefined {} other {max. {max}}}{unit}{br}{description}"},{min:Ft,max:wt,description:oe(),unit:Je?.message&&Kn?nt(Je.message,Je.values):null,divider:Dn?nt({id:"content-manager.form.Input.hint.minMaxDivider",defaultMessage:" / "}):null,br:Kn?vt.default.createElement("br",null):null})})()}},ja=({type:Z,minimum:me,maximum:Le})=>{if(["biginteger","integer","number"].includes(Z))return{};const nt=Math.max(me||0,Le||0);return{message:{id:"content-manager.form.Input.hint.character.unit",defaultMessage:"{maxValue, plural, one { character} other { characters}}"},values:{maxValue:nt}}},Du=Z=>{if(!Z)return{maximum:void 0,minimum:void 0};const{minLength:me,maxLength:Le,max:nt,min:oe}=Z;let wt,Ft;const Je=parseInt(oe,10),Nt=parseInt(me,10);Number.isNaN(Je)?Number.isNaN(Nt)||(wt=Nt):wt=Je;const sn=parseInt(nt,10),Dn=parseInt(Le,10);return Number.isNaN(sn)?Number.isNaN(Dn)||(Ft=Dn):Ft=sn,{maximum:Ft,minimum:wt}},Pu=()=>{const{search:Z}=(0,Ds.useLocation)();return(0,vt.useMemo)(()=>new URLSearchParams(Z),[Z])},jl=Z=>{const me=Pu(),[Le,nt]=(0,vt.useState)(null);return(0,vt.useEffect)(()=>{me.has("field")&&me.get("field")===Z&&Le&&("input"in Le?(Le.input.current.focus(),Le.input.current.scrollIntoView({block:"center"})):(Le.focus(),Le.scrollIntoView({block:"center"})))},[me,Z,Le]),nt},pa=Z=>`${Z/16}rem`,Au=({autoComplete:Z,customInputs:me,description:Le,disabled:nt,intlLabel:oe,labelAction:wt,error:Ft,name:Je,onChange:Nt,options:sn,placeholder:Dn,required:Kn,step:Dr,type:mr,value:Nr,isNullable:ti,attribute:Tr,...Ai})=>{const{formatMessage:Yi}=(0,Mo.useIntl)(),{hint:yi}=Jf({description:Le,fieldSchema:Tr,type:Tr?.type||mr}),[Ji,ko]=(0,vt.useState)(!1),Ri=jl(Je),jo=me?me[mr]:null,vo=Nr??void 0,Cs=vo??"";function al(Xi){if(!Xi)return null;const ls={...Xi.values};return Yi(typeof Xi=="string"?{id:Xi,defaultMessage:Xi}:{id:Xi.id,defaultMessage:Xi?.defaultMessage??Xi.id},ls)}const fs=al(Ft);if(jo)return vt.default.createElement(jo,{...Ai,ref:Ri,attribute:Tr,description:Le,hint:yi,disabled:nt,intlLabel:oe,labelAction:wt,error:fs,name:Je,onChange:Nt,options:sn,required:Kn,placeholder:Dn,type:mr,value:vo});const ps=oe.id?Yi({id:oe.id,defaultMessage:oe.defaultMessage},{...oe.values}):Je,ys=Dn?Yi({id:Dn.id,defaultMessage:Dn.defaultMessage},{...Dn.values}):"";switch(mr){case"json":return vt.default.createElement(Qn.JSONInput,{ref:Ri,label:ps,labelAction:wt,value:vo,error:fs,disabled:nt,hint:yi,required:Kn,onChange:Xi=>{const ls=!Tr.required&&!Xi.length?null:Xi;Nt({target:{name:Je,value:ls}})},minHeight:pa(252),maxHeight:pa(504)});case"bool":return vt.default.createElement(Qn.ToggleInput,{ref:Ri,checked:Nr===null?null:Nr||!1,disabled:nt,hint:yi,label:ps,error:fs,labelAction:wt,name:Je,offLabel:Yi({id:"app.components.ToggleCheckbox.off-label",defaultMessage:"False"}),onLabel:Yi({id:"app.components.ToggleCheckbox.on-label",defaultMessage:"True"}),onChange:Xi=>{Nt({target:{name:Je,value:Xi.target.checked}})},required:Kn,onClear:()=>{Nt({target:{name:Je,value:null}})},clearLabel:ti&&Yi({id:"app.components.ToggleCheckbox.clear-label",defaultMessage:"Clear"})});case"checkbox":return vt.default.createElement(Qn.Checkbox,{ref:Ri,disabled:nt,error:fs,hint:yi,id:Je,name:Je,onValueChange:Xi=>{Nt({target:{name:Je,value:Xi}})},required:Kn,value:Boolean(vo)},ps);case"datetime":return vt.default.createElement(Qn.DateTimePicker,{ref:Ri,clearLabel:Yi({id:"clearLabel",defaultMessage:"Clear"}),disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:Xi=>{const ls=Xi?Xi.toISOString():null;Nt({target:{name:Je,value:ls,type:mr}})},onClear:()=>Nt({target:{name:Je,value:null,type:mr}}),placeholder:ys,required:Kn,value:vo?new Date(vo):void 0});case"date":return vt.default.createElement(Qn.DatePicker,{ref:Ri,clearLabel:Yi({id:"clearLabel",defaultMessage:"Clear"}),disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:Xi=>{Nt({target:{name:Je,value:Xi?(0,sf.default)(Xi,{representation:"date"}):null,type:mr}})},onClear:()=>Nt({target:{name:Je,value:null,type:mr}}),placeholder:ys,required:Kn,selectedDate:vo?new Date(vo):void 0,selectedDateLabel:Xi=>`Date picker, current is ${Xi}`});case"number":return vt.default.createElement(Qn.NumberInput,{ref:Ri,disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onValueChange:Xi=>Nt({target:{name:Je,value:Xi,type:mr}}),placeholder:ys,required:Kn,step:Dr,value:vo});case"email":return vt.default.createElement(Qn.TextInput,{ref:Ri,autoComplete:Z,disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:Nt,placeholder:ys,required:Kn,type:"email",value:Cs});case"timestamp":case"text":case"string":return vt.default.createElement(Qn.TextInput,{ref:Ri,autoComplete:Z,disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:Nt,placeholder:ys,required:Kn,type:"text",value:Cs});case"password":return vt.default.createElement(Qn.TextInput,{ref:Ri,autoComplete:Z,disabled:nt,error:fs,endAction:vt.default.createElement("button",{"aria-label":Yi({id:"Auth.form.password.show-password",defaultMessage:"Show password"}),onClick:()=>{ko(Xi=>!Xi)},style:{border:"none",padding:0,background:"transparent"},type:"button"},Ji?vt.default.createElement(Qn.Icon,{as:co.Eye,color:"neutral500"}):vt.default.createElement(Qn.Icon,{as:co.EyeStriked,color:"neutral500"})),label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:Nt,placeholder:ys,required:Kn,type:Ji?"text":"password",value:Cs});case"select":return vt.default.createElement(Qn.SingleSelect,{ref:Ri,disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:Xi=>Nt({target:{name:Je,value:Xi,type:"select"}}),placeholder:ys,required:Kn,value:vo},sn.map(({metadatas:{intlLabel:Xi,disabled:ls,hidden:_a},key:Ya,value:ea})=>vt.default.createElement(Qn.SingleSelectOption,{key:Ya,value:ea,disabled:ls,hidden:_a},Yi(Xi))));case"textarea":return vt.default.createElement(Qn.Textarea,{ref:Ri,disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:Xi=>Nt({target:{name:Je,value:Xi.target.value,type:mr}}),required:Kn,placeholder:ys,type:mr,value:Cs});case"time":{let Xi=vo;if(vo&&vo.split(":").length>2){const[ls,_a]=vo.split(":");Xi=`${ls}:${_a}`}return vt.default.createElement(Qn.TimePicker,{ref:Ri,clearLabel:Yi({id:"clearLabel",defaultMessage:"Clear"}),disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:ls=>{Nt({target:{name:Je,value:`${ls}`,type:mr}})},onClear:()=>{Nt({target:{name:Je,value:null,type:mr}})},placeholder:ys,required:Kn,value:Xi})}default:return vt.default.createElement(Qn.TextInput,{disabled:!0,error:Ft,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,placeholder:"Not supported",required:Kn,type:"text",value:""})}};Au.defaultProps={autoComplete:void 0,customInputs:null,description:null,disabled:!1,error:"",isNullable:void 0,labelAction:void 0,placeholder:null,required:!1,options:[],step:1,value:void 0,attribute:null},Au.propTypes={autoComplete:qe.default.string,customInputs:qe.default.object,description:qe.default.shape({id:qe.default.string.isRequired,defaultMessage:qe.default.string.isRequired,values:qe.default.object}),attribute:qe.default.object,disabled:qe.default.bool,error:qe.default.oneOfType([qe.default.string,qe.default.shape({id:qe.default.string.isRequired,defaultMessage:qe.default.string})]),intlLabel:qe.default.shape({id:qe.default.string.isRequired,defaultMessage:qe.default.string.isRequired,values:qe.default.object}).isRequired,isNullable:qe.default.bool,labelAction:qe.default.element,name:qe.default.string.isRequired,onChange:qe.default.func.isRequired,options:qe.default.arrayOf(qe.default.shape({metadatas:qe.default.shape({intlLabel:qe.default.shape({id:qe.default.string.isRequired,defaultMessage:qe.default.string.isRequired}).isRequired,disabled:qe.default.bool,hidden:qe.default.bool}).isRequired,key:qe.default.oneOfType([qe.default.string,qe.default.number]).isRequired,value:qe.default.oneOfType([qe.default.string,qe.default.number]).isRequired}).isRequired),placeholder:qe.default.shape({id:qe.default.string.isRequired,defaultMessage:qe.default.string.isRequired,values:qe.default.object}),required:qe.default.bool,step:qe.default.number,type:qe.default.string.isRequired,value:qe.default.any};/**
551
+ `,wu=({label:Z,onChange:me,options:Le,type:nt,value:oe})=>{const{formatMessage:wt}=(0,Mo.useIntl)();return nt==="boolean"?vt.default.createElement(Qn.Select,{"aria-label":Z,onChange:me,value:oe},vt.default.createElement(Qn.Option,{value:"true"},"true"),vt.default.createElement(Qn.Option,{value:"false"},"false")):nt==="date"?vt.default.createElement(Qn.DatePicker,{clearLabel:wt({id:"clearLabel",defaultMessage:"Clear"}),ariaLabel:Z,name:"datepicker",onChange:Ft=>me((0,sf.default)(Ft,{representation:"date"})),onClear:()=>me(null),selectedDate:oe?new Date(oe):void 0,selectedDateLabel:Ft=>`Date picker, current is ${Ft}`}):nt==="datetime"?vt.default.createElement(Qn.DateTimePicker,{clearLabel:wt({id:"clearLabel",defaultMessage:"Clear"}),ariaLabel:Z,name:"datetimepicker",onChange:Ft=>me(Ft?Ft.toISOString():null),onClear:()=>me(null),value:oe?new Date(oe):void 0,selectedDateLabel:Ft=>`Date picker, current is ${Ft}`,selectButtonTitle:wt({id:"selectButtonTitle",defaultMessage:"Select"})}):nt==="enumeration"?vt.default.createElement(Qn.Select,{"aria-label":Z,onChange:me,value:oe},Le.map(Ft=>vt.default.createElement(Qn.Option,{key:Ft,value:Ft},Ft))):["float","integer","biginteger","decimal"].includes(nt)?vt.default.createElement(Qn.NumberInput,{"aria-label":Z,name:"filter-value",onValueChange:me,value:oe||0}):nt==="time"?vt.default.createElement(Qn.TimePicker,{"aria-label":Z,onClear:()=>me(""),onChange:me,value:oe,clearLabel:"Clear the selected time picker value"}):vt.default.createElement(Qn.Field,null,vt.default.createElement(Qn.FieldInput,{"aria-label":wt({id:"app.utils.filter-value",defaultMessage:"Filter value"}),onChange:({target:{value:Ft}})=>me(Ft),value:oe,size:"M"}))};wu.defaultProps={label:"",options:[],value:""},wu.propTypes={label:qe.default.string,onChange:qe.default.func.isRequired,options:qe.default.arrayOf(qe.default.string),type:qe.default.string.isRequired,value:qe.default.any};const Ic=({fieldSchema:{type:Z,mainField:me}})=>{switch(me?.schema?.type??Z){case"email":case"text":case"enumeration":case"string":return[{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$eq",defaultMessage:"is"},value:"$eq"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$eqi",defaultMessage:"is (case insensitive)"},value:"$eqi"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$ne",defaultMessage:"is not"},value:"$ne"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$nei",defaultMessage:"is not (case insensitive)"},value:"$nei"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$null",defaultMessage:"is null"},value:"$null"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notNull",defaultMessage:"is not null"},value:"$notNull"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$contains",defaultMessage:"contains"},value:"$contains"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$containsi",defaultMessage:"contains (case insensitive)"},value:"$containsi"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notContains",defaultMessage:"not contains"},value:"$notContains"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notContainsi",defaultMessage:"not contains (case insensitive)"},value:"$notContainsi"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$startsWith",defaultMessage:"starts with"},value:"$startsWith"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$startsWithi",defaultMessage:"starts with (case insensitive)"},value:"$startsWithi"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$endsWith",defaultMessage:"ends with"},value:"$endsWith"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$endsWithi",defaultMessage:"ends with (case insensitive)"},value:"$endsWithi"}];case"float":case"integer":case"biginteger":case"decimal":return[{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$eq",defaultMessage:"is"},value:"$eq"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$ne",defaultMessage:"is not"},value:"$ne"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$null",defaultMessage:"is null"},value:"$null"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notNull",defaultMessage:"is not null"},value:"$notNull"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$gt",defaultMessage:"is greater than"},value:"$gt"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$gte",defaultMessage:"is greater than or equal to"},value:"$gte"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$lt",defaultMessage:"is less than"},value:"$lt"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$lte",defaultMessage:"is less than or equal to"},value:"$lte"}];case"time":case"date":return[{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$eq",defaultMessage:"is"},value:"$eq"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$ne",defaultMessage:"is not"},value:"$ne"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$null",defaultMessage:"is null"},value:"$null"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notNull",defaultMessage:"is not null"},value:"$notNull"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$contains",defaultMessage:"contains (sensitive)"},value:"$contains"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notContains",defaultMessage:"not contains (sensitive)"},value:"$notContains"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$gt",defaultMessage:"is greater than"},value:"$gt"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$gte",defaultMessage:"is greater than or equal to"},value:"$gte"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$lt",defaultMessage:"is less than"},value:"$lt"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$lte",defaultMessage:"is less than or equal to"},value:"$lte"}];case"datetime":return[{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$eq",defaultMessage:"is"},value:"$eq"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$ne",defaultMessage:"is not"},value:"$ne"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$null",defaultMessage:"is null"},value:"$null"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notNull",defaultMessage:"is not null"},value:"$notNull"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$gt",defaultMessage:"is greater than"},value:"$gt"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$gte",defaultMessage:"is greater than or equal to"},value:"$gte"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$lt",defaultMessage:"is less than"},value:"$lt"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$lte",defaultMessage:"is less than or equal to"},value:"$lte"}];default:return[{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$eq",defaultMessage:"is"},value:"$eq"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$eqi",defaultMessage:"is (case insensitive)"},value:"$eqi"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$ne",defaultMessage:"is not"},value:"$ne"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$null",defaultMessage:"is null"},value:"$null"},{intlLabel:{id:"components.FilterOptions.FILTER_TYPES.$notNull",defaultMessage:"is not null"},value:"$notNull"}]}};var _c=Z=>{var me={};return Br.d(me,Z),me},Qf=Z=>()=>Z,cu=_c({Form:()=>_r.l0,useFormikContext:()=>_r.u6});const af=Z=>{const me=(0,vt.useRef)(null),{isSubmitting:Le,isValidating:nt,errors:oe,touched:wt}=(0,cu.useFormikContext)();return(0,vt.useEffect)(()=>{if(Le&&!nt){const Ft=me.current.querySelectorAll("[data-strapi-field-error]");if(Ft.length>0){const Je=Ft[0].getAttribute("id"),Nt=me.current.querySelector(`[aria-describedby="${Je}"]`);Nt&&Nt.focus()}}if(!Le&&!nt&&Object.keys(oe).length){const Ft=document.getElementById("global-form-error");Ft&&Ft.focus()}},[oe,Le,nt,wt]),vt.default.createElement(cu.Form,{ref:me,...Z,noValidate:!0})},Jf=({description:Z,fieldSchema:me,type:Le})=>{const{formatMessage:nt}=(0,Mo.useIntl)(),oe=()=>Z?.id?nt({id:Z.id,defaultMessage:Z.defaultMessage},{...Z.values}):"";return{hint:(()=>{const{maximum:wt,minimum:Ft}=Du(me),Je=ja({type:Le,minimum:Ft,maximum:wt}),Nt=typeof Ft=="number",sn=typeof wt=="number",Dn=sn&&Nt,Kn=sn||Nt;return!Z?.id&&!Kn?"":nt({id:"content-manager.form.Input.hint.text",defaultMessage:"{min, select, undefined {} other {min. {min}}}{divider}{max, select, undefined {} other {max. {max}}}{unit}{br}{description}"},{min:Ft,max:wt,description:oe(),unit:Je?.message&&Kn?nt(Je.message,Je.values):null,divider:Dn?nt({id:"content-manager.form.Input.hint.minMaxDivider",defaultMessage:" / "}):null,br:Kn?vt.default.createElement("br",null):null})})()}},ja=({type:Z,minimum:me,maximum:Le})=>{if(["biginteger","integer","number"].includes(Z))return{};const nt=Math.max(me||0,Le||0);return{message:{id:"content-manager.form.Input.hint.character.unit",defaultMessage:"{maxValue, plural, one { character} other { characters}}"},values:{maxValue:nt}}},Du=Z=>{if(!Z)return{maximum:void 0,minimum:void 0};const{minLength:me,maxLength:Le,max:nt,min:oe}=Z;let wt,Ft;const Je=parseInt(oe,10),Nt=parseInt(me,10);Number.isNaN(Je)?Number.isNaN(Nt)||(wt=Nt):wt=Je;const sn=parseInt(nt,10),Dn=parseInt(Le,10);return Number.isNaN(sn)?Number.isNaN(Dn)||(Ft=Dn):Ft=sn,{maximum:Ft,minimum:wt}},Pu=()=>{const{search:Z}=(0,Ds.useLocation)();return(0,vt.useMemo)(()=>new URLSearchParams(Z),[Z])},Ul=Z=>{const me=Pu(),[Le,nt]=(0,vt.useState)(null);return(0,vt.useEffect)(()=>{me.has("field")&&me.get("field")===Z&&Le&&("input"in Le?(Le.input.current.focus(),Le.input.current.scrollIntoView({block:"center"})):(Le.focus(),Le.scrollIntoView({block:"center"})))},[me,Z,Le]),nt},pa=Z=>`${Z/16}rem`,Au=({autoComplete:Z,customInputs:me,description:Le,disabled:nt,intlLabel:oe,labelAction:wt,error:Ft,name:Je,onChange:Nt,options:sn,placeholder:Dn,required:Kn,step:Dr,type:mr,value:Nr,isNullable:ti,attribute:Tr,...Ai})=>{const{formatMessage:Yi}=(0,Mo.useIntl)(),{hint:yi}=Jf({description:Le,fieldSchema:Tr,type:Tr?.type||mr}),[Ji,ko]=(0,vt.useState)(!1),Ri=Ul(Je),jo=me?me[mr]:null,vo=Nr??void 0,Cs=vo??"";function al(Xi){if(!Xi)return null;const ls={...Xi.values};return Yi(typeof Xi=="string"?{id:Xi,defaultMessage:Xi}:{id:Xi.id,defaultMessage:Xi?.defaultMessage??Xi.id},ls)}const fs=al(Ft);if(jo)return vt.default.createElement(jo,{...Ai,ref:Ri,attribute:Tr,description:Le,hint:yi,disabled:nt,intlLabel:oe,labelAction:wt,error:fs,name:Je,onChange:Nt,options:sn,required:Kn,placeholder:Dn,type:mr,value:vo});const ps=oe.id?Yi({id:oe.id,defaultMessage:oe.defaultMessage},{...oe.values}):Je,ys=Dn?Yi({id:Dn.id,defaultMessage:Dn.defaultMessage},{...Dn.values}):"";switch(mr){case"json":return vt.default.createElement(Qn.JSONInput,{ref:Ri,label:ps,labelAction:wt,value:vo,error:fs,disabled:nt,hint:yi,required:Kn,onChange:Xi=>{const ls=!Tr.required&&!Xi.length?null:Xi;Nt({target:{name:Je,value:ls}})},minHeight:pa(252),maxHeight:pa(504)});case"bool":return vt.default.createElement(Qn.ToggleInput,{ref:Ri,checked:Nr===null?null:Nr||!1,disabled:nt,hint:yi,label:ps,error:fs,labelAction:wt,name:Je,offLabel:Yi({id:"app.components.ToggleCheckbox.off-label",defaultMessage:"False"}),onLabel:Yi({id:"app.components.ToggleCheckbox.on-label",defaultMessage:"True"}),onChange:Xi=>{Nt({target:{name:Je,value:Xi.target.checked}})},required:Kn,onClear:()=>{Nt({target:{name:Je,value:null}})},clearLabel:ti&&Yi({id:"app.components.ToggleCheckbox.clear-label",defaultMessage:"Clear"})});case"checkbox":return vt.default.createElement(Qn.Checkbox,{ref:Ri,disabled:nt,error:fs,hint:yi,id:Je,name:Je,onValueChange:Xi=>{Nt({target:{name:Je,value:Xi}})},required:Kn,value:Boolean(vo)},ps);case"datetime":return vt.default.createElement(Qn.DateTimePicker,{ref:Ri,clearLabel:Yi({id:"clearLabel",defaultMessage:"Clear"}),disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:Xi=>{const ls=Xi?Xi.toISOString():null;Nt({target:{name:Je,value:ls,type:mr}})},onClear:()=>Nt({target:{name:Je,value:null,type:mr}}),placeholder:ys,required:Kn,value:vo?new Date(vo):void 0});case"date":return vt.default.createElement(Qn.DatePicker,{ref:Ri,clearLabel:Yi({id:"clearLabel",defaultMessage:"Clear"}),disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:Xi=>{Nt({target:{name:Je,value:Xi?(0,sf.default)(Xi,{representation:"date"}):null,type:mr}})},onClear:()=>Nt({target:{name:Je,value:null,type:mr}}),placeholder:ys,required:Kn,selectedDate:vo?new Date(vo):void 0,selectedDateLabel:Xi=>`Date picker, current is ${Xi}`});case"number":return vt.default.createElement(Qn.NumberInput,{ref:Ri,disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onValueChange:Xi=>Nt({target:{name:Je,value:Xi,type:mr}}),placeholder:ys,required:Kn,step:Dr,value:vo});case"email":return vt.default.createElement(Qn.TextInput,{ref:Ri,autoComplete:Z,disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:Nt,placeholder:ys,required:Kn,type:"email",value:Cs});case"timestamp":case"text":case"string":return vt.default.createElement(Qn.TextInput,{ref:Ri,autoComplete:Z,disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:Nt,placeholder:ys,required:Kn,type:"text",value:Cs});case"password":return vt.default.createElement(Qn.TextInput,{ref:Ri,autoComplete:Z,disabled:nt,error:fs,endAction:vt.default.createElement("button",{"aria-label":Yi({id:"Auth.form.password.show-password",defaultMessage:"Show password"}),onClick:()=>{ko(Xi=>!Xi)},style:{border:"none",padding:0,background:"transparent"},type:"button"},Ji?vt.default.createElement(Qn.Icon,{as:co.Eye,color:"neutral500"}):vt.default.createElement(Qn.Icon,{as:co.EyeStriked,color:"neutral500"})),label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:Nt,placeholder:ys,required:Kn,type:Ji?"text":"password",value:Cs});case"select":return vt.default.createElement(Qn.SingleSelect,{ref:Ri,disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:Xi=>Nt({target:{name:Je,value:Xi,type:"select"}}),placeholder:ys,required:Kn,value:vo},sn.map(({metadatas:{intlLabel:Xi,disabled:ls,hidden:_a},key:Ya,value:ea})=>vt.default.createElement(Qn.SingleSelectOption,{key:Ya,value:ea,disabled:ls,hidden:_a},Yi(Xi))));case"textarea":return vt.default.createElement(Qn.Textarea,{ref:Ri,disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:Xi=>Nt({target:{name:Je,value:Xi.target.value,type:mr}}),required:Kn,placeholder:ys,type:mr,value:Cs});case"time":{let Xi=vo;if(vo&&vo.split(":").length>2){const[ls,_a]=vo.split(":");Xi=`${ls}:${_a}`}return vt.default.createElement(Qn.TimePicker,{ref:Ri,clearLabel:Yi({id:"clearLabel",defaultMessage:"Clear"}),disabled:nt,error:fs,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,onChange:ls=>{Nt({target:{name:Je,value:`${ls}`,type:mr}})},onClear:()=>{Nt({target:{name:Je,value:null,type:mr}})},placeholder:ys,required:Kn,value:Xi})}default:return vt.default.createElement(Qn.TextInput,{disabled:!0,error:Ft,label:ps,labelAction:wt,id:Je,hint:yi,name:Je,placeholder:"Not supported",required:Kn,type:"text",value:""})}};Au.defaultProps={autoComplete:void 0,customInputs:null,description:null,disabled:!1,error:"",isNullable:void 0,labelAction:void 0,placeholder:null,required:!1,options:[],step:1,value:void 0,attribute:null},Au.propTypes={autoComplete:qe.default.string,customInputs:qe.default.object,description:qe.default.shape({id:qe.default.string.isRequired,defaultMessage:qe.default.string.isRequired,values:qe.default.object}),attribute:qe.default.object,disabled:qe.default.bool,error:qe.default.oneOfType([qe.default.string,qe.default.shape({id:qe.default.string.isRequired,defaultMessage:qe.default.string})]),intlLabel:qe.default.shape({id:qe.default.string.isRequired,defaultMessage:qe.default.string.isRequired,values:qe.default.object}).isRequired,isNullable:qe.default.bool,labelAction:qe.default.element,name:qe.default.string.isRequired,onChange:qe.default.func.isRequired,options:qe.default.arrayOf(qe.default.shape({metadatas:qe.default.shape({intlLabel:qe.default.shape({id:qe.default.string.isRequired,defaultMessage:qe.default.string.isRequired}).isRequired,disabled:qe.default.bool,hidden:qe.default.bool}).isRequired,key:qe.default.oneOfType([qe.default.string,qe.default.number]).isRequired,value:qe.default.oneOfType([qe.default.string,qe.default.number]).isRequired}).isRequired),placeholder:qe.default.shape({id:qe.default.string.isRequired,defaultMessage:qe.default.string.isRequired,values:qe.default.object}),required:qe.default.bool,step:qe.default.number,type:qe.default.string.isRequired,value:qe.default.any};/**
552
552
  * @preserve
553
553
  * @typedef {Object} MenuItem
554
554
  * @property {string} to
@@ -733,7 +733,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
733
733
  * @preserve
734
734
  * @returns {OverlayBlockerContextValue}
735
735
  */const _u=()=>vt.useContext(lc),uc="apiError.";function vu(Z,me){const Le=`${uc}${Z}`;return typeof me=="function"?me(Le):Le}function gf(Z,{name:me,intlMessagePrefixCallback:Le}){const{message:nt,path:oe}=Z;return{id:vu(nt,Le),defaultMessage:nt,name:Z?.name??me,values:{path:oe?.join(".")}}}function yu(Z,me){const{error:Le}=Z.response.data;return Le?.details?.errors?{name:Le.name,message:Le?.message||null,errors:Le.details.errors.map(nt=>gf(nt,{name:Le.name,intlMessagePrefixCallback:me}))}:gf(Le,{intlMessagePrefixCallback:me})}function cc(Z){const{formatMessage:me}=(0,Mo.useIntl)();return{formatAPIError(Le){try{return yf(Le,{intlMessagePrefixCallback:Z,formatMessage:me})}catch{if(Le instanceof ji.AxiosError)return vf(Le,{intlMessagePrefixCallback:Z,formatMessage:me});throw new Error("formatAPIError: Unknown error:",Le)}}}}function vf(Z,{intlMessagePrefixCallback:me,formatMessage:Le}){const{code:nt,message:oe}=Z;return Le({id:vu(oe,me),defaultMessage:oe,values:{code:nt}})}function yf(Z,{formatMessage:me,intlMessagePrefixCallback:Le}){if(!me)throw new Error("The formatMessage callback is a mandatory argument.");const nt=yu(Z,Le);return nt.message?nt.message:nt?.errors?nt.errors.map(({id:oe,defaultMessage:wt,values:Ft})=>me({id:oe,defaultMessage:wt},Ft)).join(`
736
- `):me(nt)}const Lf=()=>({copy:(0,vt.useCallback)(async Z=>{try{if(typeof Z!="string"&&typeof Z!="number")throw new Error(`Cannot copy typeof ${typeof Z} to clipboard, must be a string`);if(Z==="")throw new Error("Cannot copy empty string to clipboard.");const me=Z.toString();return await navigator.clipboard.writeText(me),!0}catch{return!1}},[])}),Pl=new Map;function Lu(Z,me){const Le=Z+(me?Object.entries(me).sort((oe,wt)=>oe[0]<wt[0]?-1:1).join():"");if(Pl.has(Le))return Pl.get(Le);const nt=new Intl.Collator(Z,me);return Pl.set(Le,nt),nt}const tu=()=>{const Z=(0,vt.useRef)(null);return Z.current===null&&(Z.current=new AbortController),(0,vt.useEffect)(()=>()=>{Z.current.abort()},[]),(0,vt.useMemo)(()=>kl({signal:Z.current.signal}),[])};function Wc(Z,me){let Le=Lu(Z,{usage:"search",...me});return{startsWith(nt,oe){return oe.length===0?!0:(nt=nt.normalize("NFC"),oe=oe.normalize("NFC"),Le.compare(nt.slice(0,oe.length),oe)===0)},endsWith(nt,oe){return oe.length===0?!0:(nt=nt.normalize("NFC"),oe=oe.normalize("NFC"),Le.compare(nt.slice(-oe.length),oe)===0)},includes(nt,oe){if(oe.length===0)return!0;nt=nt.normalize("NFC"),oe=oe.normalize("NFC");let wt=0,Ft=oe.length;for(;wt+Ft<=nt.length;wt++){let Je=nt.slice(wt,wt+Ft);if(Le.compare(oe,Je)===0)return!0}return!1}}}const fc=(Z="main",me=[])=>{(0,vt.useEffect)(()=>{const Le=document.querySelector(Z);Le?(Le.focus(),window.scrollTo({top:0})):console.warn(`[useFocusWhenNavigate] The page does not contain the selector "${Z}" and can't be focused.`)},me)},dc=Z=>{(0,vt.useEffect)(()=>(Z&&document.body.classList.add("lock-body-scroll"),()=>{document.body.classList.remove("lock-body-scroll")}),[Z])},Ef=(Z,me)=>{const[Le,nt]=(0,vt.useState)(()=>{const oe=window.localStorage.getItem(Z);if(oe!==null)try{return JSON.parse(oe)}catch{return oe}return me});return(0,vt.useEffect)(()=>{window.localStorage.setItem(Z,JSON.stringify(Le))},[Z,Le]),[Le,nt]};var zo=Z=>{var me={};return Br.d(me,Z),me},$f=Z=>()=>Z,Al=zo({useQueries:()=>Pr.useQueries});const zc=(Z,me)=>{const[Le,nt]=(0,vt.useState)(!1),oe=(0,vt.useMemo)(()=>Object.keys(Z).map(mr=>({name:mr,hasPermission:!1})),[Z]),{allPermissions:wt}=xt(),{post:Ft}=tu(),Je=me||wt,Nt=Object.entries(Z),sn=(0,Al.useQueries)(Nt.map(([mr,Nr])=>({queryKey:["useRBAC",mr,Nr,Je],async queryFn(){if(!Nr||!Nr.length)return{name:mr,hasPermission:!0};const ti=Je.filter(Tr=>Nr.find(Ai=>Ai.action===Tr.action&&Ai.subject===Tr.subject)!==void 0);if(ti.length>0&&ti.every(Tr=>Array.isArray(Tr.conditions)&&Tr.conditions.length>0))try{const{data:{data:Tr}}=await Ft("/admin/permissions/check",{permissions:ti.map(({action:Ai,subject:Yi})=>({action:Ai,subject:Yi}))});return{name:mr,hasPermission:Array.isArray(Tr)&&Tr.every(Ai=>Ai===!0)}}catch{return{name:mr,hasPermission:!1}}return{name:mr,hasPermission:ti.length>0}}}))),Dn=(0,vt.useCallback)(()=>{nt(!0)},[]),Kn=Le||sn.some(mr=>mr.isLoading),Dr=sn.map(mr=>mr.data);return{allowedActions:(Dr.some(mr=>mr===void 0)?oe:Dr).reduce((mr,{name:Nr,hasPermission:ti})=>(mr[`can${bf(Nr)}`]=ti,mr),{}),isLoading:Kn,setIsLoading:Dn}},bf=Z=>Z.charAt(0).toUpperCase()+Z.slice(1),Qs=(Z,me)=>{const[Le,nt]=(0,vt.useState)(me);return[Le,{selectOne:oe=>{const wt=Le.findIndex(Ft=>Z.every(Je=>Ft[Je]===oe[Je]));wt>-1?nt(Ft=>[...Ft.slice(0,wt),...Ft.slice(wt+1)]):nt(Ft=>[...Ft,oe])},selectAll:oe=>{Le.length>0?nt([]):nt(oe)},selectOnly:oe=>{Le.indexOf(oe)>-1?nt([]):nt([oe])},selectMultiple:oe=>{nt(wt=>[...wt,...oe.filter(Ft=>wt.findIndex(Je=>Z.every(Nt=>Je[Nt]===Ft[Nt]))===-1)])},deselectMultiple:oe=>{nt(wt=>[...wt.filter(Ft=>oe.findIndex(Je=>Z.every(Nt=>Ft[Nt]===Je[Nt]))===-1)])},setSelections:nt}]},Ul=(0,Ss.default)(Qn.IconButton)(({theme:Z})=>`
736
+ `):me(nt)}const Lf=()=>({copy:(0,vt.useCallback)(async Z=>{try{if(typeof Z!="string"&&typeof Z!="number")throw new Error(`Cannot copy typeof ${typeof Z} to clipboard, must be a string`);if(Z==="")throw new Error("Cannot copy empty string to clipboard.");const me=Z.toString();return await navigator.clipboard.writeText(me),!0}catch{return!1}},[])}),Pl=new Map;function Lu(Z,me){const Le=Z+(me?Object.entries(me).sort((oe,wt)=>oe[0]<wt[0]?-1:1).join():"");if(Pl.has(Le))return Pl.get(Le);const nt=new Intl.Collator(Z,me);return Pl.set(Le,nt),nt}const tu=()=>{const Z=(0,vt.useRef)(null);return Z.current===null&&(Z.current=new AbortController),(0,vt.useEffect)(()=>()=>{Z.current.abort()},[]),(0,vt.useMemo)(()=>kl({signal:Z.current.signal}),[])};function Wc(Z,me){let Le=Lu(Z,{usage:"search",...me});return{startsWith(nt,oe){return oe.length===0?!0:(nt=nt.normalize("NFC"),oe=oe.normalize("NFC"),Le.compare(nt.slice(0,oe.length),oe)===0)},endsWith(nt,oe){return oe.length===0?!0:(nt=nt.normalize("NFC"),oe=oe.normalize("NFC"),Le.compare(nt.slice(-oe.length),oe)===0)},includes(nt,oe){if(oe.length===0)return!0;nt=nt.normalize("NFC"),oe=oe.normalize("NFC");let wt=0,Ft=oe.length;for(;wt+Ft<=nt.length;wt++){let Je=nt.slice(wt,wt+Ft);if(Le.compare(oe,Je)===0)return!0}return!1}}}const fc=(Z="main",me=[])=>{(0,vt.useEffect)(()=>{const Le=document.querySelector(Z);Le?(Le.focus(),window.scrollTo({top:0})):console.warn(`[useFocusWhenNavigate] The page does not contain the selector "${Z}" and can't be focused.`)},me)},dc=Z=>{(0,vt.useEffect)(()=>(Z&&document.body.classList.add("lock-body-scroll"),()=>{document.body.classList.remove("lock-body-scroll")}),[Z])},Ef=(Z,me)=>{const[Le,nt]=(0,vt.useState)(()=>{const oe=window.localStorage.getItem(Z);if(oe!==null)try{return JSON.parse(oe)}catch{return oe}return me});return(0,vt.useEffect)(()=>{window.localStorage.setItem(Z,JSON.stringify(Le))},[Z,Le]),[Le,nt]};var zo=Z=>{var me={};return Br.d(me,Z),me},$f=Z=>()=>Z,Al=zo({useQueries:()=>Pr.useQueries});const zc=(Z,me)=>{const[Le,nt]=(0,vt.useState)(!1),oe=(0,vt.useMemo)(()=>Object.keys(Z).map(mr=>({name:mr,hasPermission:!1})),[Z]),{allPermissions:wt}=xt(),{post:Ft}=tu(),Je=me||wt,Nt=Object.entries(Z),sn=(0,Al.useQueries)(Nt.map(([mr,Nr])=>({queryKey:["useRBAC",mr,Nr,Je],async queryFn(){if(!Nr||!Nr.length)return{name:mr,hasPermission:!0};const ti=Je.filter(Tr=>Nr.find(Ai=>Ai.action===Tr.action&&Ai.subject===Tr.subject)!==void 0);if(ti.length>0&&ti.every(Tr=>Array.isArray(Tr.conditions)&&Tr.conditions.length>0))try{const{data:{data:Tr}}=await Ft("/admin/permissions/check",{permissions:ti.map(({action:Ai,subject:Yi})=>({action:Ai,subject:Yi}))});return{name:mr,hasPermission:Array.isArray(Tr)&&Tr.every(Ai=>Ai===!0)}}catch{return{name:mr,hasPermission:!1}}return{name:mr,hasPermission:ti.length>0}}}))),Dn=(0,vt.useCallback)(()=>{nt(!0)},[]),Kn=Le||sn.some(mr=>mr.isLoading),Dr=sn.map(mr=>mr.data);return{allowedActions:(Dr.some(mr=>mr===void 0)?oe:Dr).reduce((mr,{name:Nr,hasPermission:ti})=>(mr[`can${bf(Nr)}`]=ti,mr),{}),isLoading:Kn,setIsLoading:Dn}},bf=Z=>Z.charAt(0).toUpperCase()+Z.slice(1),Qs=(Z,me)=>{const[Le,nt]=(0,vt.useState)(me);return[Le,{selectOne:oe=>{const wt=Le.findIndex(Ft=>Z.every(Je=>Ft[Je]===oe[Je]));wt>-1?nt(Ft=>[...Ft.slice(0,wt),...Ft.slice(wt+1)]):nt(Ft=>[...Ft,oe])},selectAll:oe=>{Le.length>0?nt([]):nt(oe)},selectOnly:oe=>{Le.indexOf(oe)>-1?nt([]):nt([oe])},selectMultiple:oe=>{nt(wt=>[...wt,...oe.filter(Ft=>wt.findIndex(Je=>Z.every(Nt=>Je[Nt]===Ft[Nt]))===-1)])},deselectMultiple:oe=>{nt(wt=>[...wt.filter(Ft=>oe.findIndex(Je=>Z.every(Nt=>Ft[Nt]===Je[Nt]))===-1)])},setSelections:nt}]},Wl=(0,Ss.default)(Qn.IconButton)(({theme:Z})=>`
737
737
  border-radius: ${pa(30)};
738
738
  width: ${pa(20)};
739
739
  height: ${pa(20)};
@@ -746,7 +746,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
746
746
  fill: ${Z.colors.primary600}
747
747
  }
748
748
  }
749
- `),Nf=Z=>vt.default.createElement(Ul,{icon:vt.default.createElement(co.Minus,null),...Z}),$u=["createdBy","updatedBy","publishedAt","id","_id"],fd=(Z,me,Le,nt=$u)=>{const oe=(wt,Ft)=>Object.keys(wt).reduce((Je,Nt)=>{const sn=Ko(Ft,Nt),Dn=(0,mo.default)(wt,Nt),Kn=Co(Ft,[Nt,"component"]),Dr=Co(Ft,[Nt,"repeatable"]);let mr=(0,mo.default)(Ft,["options","timestamps"]);return Array.isArray(mr)||(mr=[]),[...nt,...mr].indexOf(Nt)!==-1?(delete Je[Nt],Je):Dn?sn==="dynamiczone"?(Je[Nt]=Dn.map(Nr=>oe(Nr,Le[Nr.__component])),Je):(sn==="component"&&(Dr?Je[Nt]=Dn.map(Nr=>oe(Nr,Le[Kn])):Je[Nt]=oe(Dn,Le[Kn])),Je):Je},Object.assign({},wt));return oe(Z,me)},Vc=(Z,me,Le)=>{const nt=(oe,wt)=>Object.keys(oe).reduce((Ft,Je)=>{const Nt=Ko(wt,Je),sn=(0,mo.default)(oe,Je),Dn=Co(wt,[Je,"component"]),Kn=Co(wt,[Je,"repeatable"]);if(Nt==="json"&&sn!==void 0)return Ft[Je]=JSON.stringify(sn,null,2),Ft;if(!sn)return Ft[Je]=sn,Ft;if(Nt==="dynamiczone")return Ft[Je]=sn.map(Dr=>nt(Dr,Le[Dr.__component])),Ft;if(Nt==="component"){let Dr;return Kn?Dr=sn.map((mr,Nr)=>{const ti={...mr,__temp_key__:Nr};return nt(ti,Le[Dn])}):Dr=nt(sn,Le[Dn]),Ft[Je]=Dr,Ft}return Ft[Je]=sn,Ft},{});return nt(Z,me)},xf=(Z,me)=>Z.then(function(Le){return[null,Le]}).catch(function(Le){return me&&Object.assign(Le,me),[Le,void 0]});var Di=Z=>{var me={};return Br.d(me,Z),me},dd=Z=>()=>Z,cs=Di({default:()=>Qr()}),Ra=Z=>{var me={};return Br.d(me,Z),me},hc=Z=>()=>Z,pc=Ra({default:()=>ci()});function Ff(Z,me){function Le(nt,oe){return(0,bi.default)(nt,function(wt,Ft,Je){(0,cs.default)(Ft,oe[Je])||(wt[Je]=(0,pc.default)(Ft)&&(0,pc.default)(oe[Je])?Le(Ft,oe[Je]):Ft)})}return Le(Z,me)}function Hc(Z,{getTrad:me}){const Le=yu(Z,me);return Le?.errors?Le.errors.reduce((nt,oe)=>(nt[oe.values.path]={id:oe.id,defaultMessage:oe.defaultMessage},nt),{}):Le.defaultMessage}const Wl=Z=>Z&&Z[0]==="."?Z.substr(1):Z,Eu=(Z,me)=>!Z||!me?{}:{[Z]:me[Z]},Rl=Z=>(Z?.inner||[]).reduce((me,Le)=>(me[Le.path.split("[").join(".").split("]").join("")]={id:Le.message,defaultMessage:Le.message,values:Eu(Le?.type,Le?.params)},me),{}),mc=Z=>Z&&Z.startsWith("/")?`${window.strapi.backendURL}${Z}`:Z,Cf=(Z,me)=>Object.keys(Z).reduce((Le,nt)=>(Le[`${me}.${nt}`]=Z[nt],Le),{});var Il=Z=>{var me={};return Br.d(me,Z),me},Bf=Z=>()=>Z,ed=Il({default:()=>Xr()});const Mf="[@strapi/helper-plugin]:",gc=Z=>{const me=Z;let Le=!1;if(typeof me!="function")throw new TypeError(`${Mf} once requires a function parameter`);return(...nt)=>{Le||(me(...nt),Le=!0)}};function Js(Z){return Z.json?Z.json():Z}function ma(Z,me=!0){return Z.status>=200&&Z.status<300||Z.status===0?Z:(Z.status===401&&Ms.getToken()&&me&&(Ms.clearAppStorage(),window.location.reload()),Js(Z).then(Le=>{const nt=new Error(Z.statusText);throw nt.response=Z,nt.response.payload=Le,nt}).catch(()=>{const Le=new Error(Z.statusText);throw Le.response=Z,Le}))}function Sf(Z){return Object.keys(Z).map(me=>`${encodeURIComponent(me)}=${encodeURIComponent(Z[me])}`).join("&")}function Of(Z){return new Promise(me=>{fetch(`${window.strapi.backendURL}/_health`,{method:"HEAD",mode:"no-cors",headers:{"Content-Type":"application/json","Keep-Alive":!1}}).then(Le=>{if(Le.status>=400)throw new Error("not available");me(Z)}).catch(()=>{setTimeout(()=>Of(Z).then(me),100)})})}const kf=gc(console.warn);function Va(...Z){let[me,Le={},nt,oe=!0,...wt]=Z,Ft;kf("The `request` function is deprecated and will be removed in the next major version. Please use `useFetchClient` instead.");try{[{noAuth:Ft}]=wt}catch{Ft=!1}Le.headers||(Le.headers=Object.assign({"Content-Type":"application/json"},Le.headers));const Je=Ms.getToken();if(Je&&!Ft&&(Le.headers=Object.assign({Authorization:`Bearer ${Je}`},Le.headers)),me=(0,ed.default)(me,"/")?`${window.strapi.backendURL}${me}`:me,Le&&Le.params){const Nt=Sf(Le.params);me=`${me}?${Nt}`}return Le&&Le.body&&oe&&(Le.body=JSON.stringify(Le.body)),fetch(me,Le).then(ma).then(Js).then(Nt=>nt?Of(Nt):Nt)}const vc=(Z,me)=>`${Z}${Math.floor(me*255).toString(16).padStart(2,0)}`,yc={onClick:Z=>Z.stopPropagation(),role:"button","aria-hidden":!0},Zc=({fn:Z,condition:me=!0})=>{if(me)return{style:{cursor:"pointer"},onClick:Z}},Nu=()=>vt.default.createElement("div",{...yc}),jf={email:"components.Input.error.validation.email",json:"components.Input.error.validation.json",lowercase:"components.Input.error.validation.lowercase",max:"components.Input.error.validation.max",maxLength:"components.Input.error.validation.maxLength",min:"components.Input.error.validation.min",minLength:"components.Input.error.validation.minLength",regex:"components.Input.error.validation.regex",required:"components.Input.error.validation.required",unique:"components.Input.error.validation.unique",integer:"component.Input.error.validation.integer"};function Tf(Z){return Z}var wf=Mn.Hn,Ec=Mn.xC,Uf=Mn.iq,zl=Mn.NY,Kc=Mn.OB,Wf=Mn.ug,Fu=Mn.m$,td=Mn.uT,nd=Mn.O4,Gc=Mn.jW,nu=Mn.QH,ce=Mn.Y_,et=Mn.W1,Wt=Mn.vq,mn=Mn.MG,gn=Mn.xZ,nr=Mn.tM,dr=Mn.c4,ri=Mn.x7,Ki=Mn.W$,$i=Mn.J5,Lo=Mn.l0,xo=Mn.jm,hr=Mn.JQ,ns=Mn.Zc,ra=Mn.XL,ga=Mn.Hw,ws=Mn.rt,is=Mn.rU,Ia=Mn.Qj,bu=Mn.dO,Qo=Mn.dJ,Jo=Mn.Hz,Df=Mn.ZF,bc=Mn.X0,Yc=Mn.cJ,Xs=Mn.N$,_l=Mn.vG,qs=Mn.w7,Bu=Mn.v4,Pf=Mn.tU,Ha=Mn.RM,Af=Mn.oL,Ll=Mn.JV,zf=Mn.ij,ku=Mn.fG,ju=Mn.fC,xu=Mn.m,Rf=Mn.SL,Uu=Mn.fz,Za=Mn.qb,xc=Mn.t3,Ka=Mn.Bg,$o=Mn._Y,Bs=Mn.iA,ks=Mn.Ui,zs=Mn.L8,Ga=Mn.I8,Wu=Mn.w6,Vs=Mn.e5,Qc=Mn.ZT,zu=Mn.dU,Vu=Mn.nn,Vf=Mn.tg,gl=Mn.mD,Ma=Mn.k2,Hu=Mn.UN,sr=Mn.CJ,pi=Mn.qX,Mi=Mn.OT,Gi=Mn.X7,ao=Mn.CR,Io=Mn.jV,os=Mn.Q1,Vl=Mn.WY,Cu=Mn.YB,Cc=Mn.UW,Jc=Mn.to,Xc=Mn.I0,va=Mn.So,Hl=Mn.L7,Zl=Mn.QI,ol=Mn.Vu,hd=Mn.Wq,Zu=Mn.W6,If=Mn.VP,rd=Mn.Xe,Ku=Mn.mZ,pd=Mn.kY,Hf=Mn.L0,Mc=Mn.E2,id=Mn.go,Sc=Mn.c1,od=Mn.yX,md=Mn.F5,Zf=Mn.lm,Kf=Mn.o1,kd=Mn.Yw,Od=Mn.aM,Td=Mn.Kx,wd=Mn.ss,Mu=Mn.vn,qc=Mn.Uq,Oc=Mn.j1,sl=Mn.Sh,Rs=Mn.rS,sd=Mn.Od},44046:function(_,b,i){"use strict";i.d(b,{J:function(){return Fe}});var l=i(32735),f=i(30126),d=i(60216),g=i.n(d),E=i(52522),m=i(84474),C=i(77981),x=i(55454),P=i(8471),T=i(45140),O=i(49758),w=i(92626),R=i(74512),F=i(98084),V=i(96669);const L=ut=>{const{id:ht}=(0,F.n)();return(0,R.jsx)(T.l,{position:"start",children:(0,R.jsx)(V.C,{"aria-labelledby":`${ht}-title`,...ut})})};var $=i(14763),U=i(74030),N=i(11682),k=i(30659),j=i(84642),z=i(50162),K=i(94997),G=i(63318),Y=i(67879);const ae=P.ZP.span`
749
+ `),Nf=Z=>vt.default.createElement(Wl,{icon:vt.default.createElement(co.Minus,null),...Z}),$u=["createdBy","updatedBy","publishedAt","id","_id"],fd=(Z,me,Le,nt=$u)=>{const oe=(wt,Ft)=>Object.keys(wt).reduce((Je,Nt)=>{const sn=Ko(Ft,Nt),Dn=(0,mo.default)(wt,Nt),Kn=Co(Ft,[Nt,"component"]),Dr=Co(Ft,[Nt,"repeatable"]);let mr=(0,mo.default)(Ft,["options","timestamps"]);return Array.isArray(mr)||(mr=[]),[...nt,...mr].indexOf(Nt)!==-1?(delete Je[Nt],Je):Dn?sn==="dynamiczone"?(Je[Nt]=Dn.map(Nr=>oe(Nr,Le[Nr.__component])),Je):(sn==="component"&&(Dr?Je[Nt]=Dn.map(Nr=>oe(Nr,Le[Kn])):Je[Nt]=oe(Dn,Le[Kn])),Je):Je},Object.assign({},wt));return oe(Z,me)},Vc=(Z,me,Le)=>{const nt=(oe,wt)=>Object.keys(oe).reduce((Ft,Je)=>{const Nt=Ko(wt,Je),sn=(0,mo.default)(oe,Je),Dn=Co(wt,[Je,"component"]),Kn=Co(wt,[Je,"repeatable"]);if(Nt==="json"&&sn!==void 0)return Ft[Je]=JSON.stringify(sn,null,2),Ft;if(!sn)return Ft[Je]=sn,Ft;if(Nt==="dynamiczone")return Ft[Je]=sn.map(Dr=>nt(Dr,Le[Dr.__component])),Ft;if(Nt==="component"){let Dr;return Kn?Dr=sn.map((mr,Nr)=>{const ti={...mr,__temp_key__:Nr};return nt(ti,Le[Dn])}):Dr=nt(sn,Le[Dn]),Ft[Je]=Dr,Ft}return Ft[Je]=sn,Ft},{});return nt(Z,me)},xf=(Z,me)=>Z.then(function(Le){return[null,Le]}).catch(function(Le){return me&&Object.assign(Le,me),[Le,void 0]});var Di=Z=>{var me={};return Br.d(me,Z),me},dd=Z=>()=>Z,cs=Di({default:()=>Qr()}),Ra=Z=>{var me={};return Br.d(me,Z),me},hc=Z=>()=>Z,pc=Ra({default:()=>ci()});function Ff(Z,me){function Le(nt,oe){return(0,bi.default)(nt,function(wt,Ft,Je){(0,cs.default)(Ft,oe[Je])||(wt[Je]=(0,pc.default)(Ft)&&(0,pc.default)(oe[Je])?Le(Ft,oe[Je]):Ft)})}return Le(Z,me)}function Hc(Z,{getTrad:me}){const Le=yu(Z,me);return Le?.errors?Le.errors.reduce((nt,oe)=>(nt[oe.values.path]={id:oe.id,defaultMessage:oe.defaultMessage},nt),{}):Le.defaultMessage}const zl=Z=>Z&&Z[0]==="."?Z.substr(1):Z,Eu=(Z,me)=>!Z||!me?{}:{[Z]:me[Z]},Rl=Z=>(Z?.inner||[]).reduce((me,Le)=>(me[Le.path.split("[").join(".").split("]").join("")]={id:Le.message,defaultMessage:Le.message,values:Eu(Le?.type,Le?.params)},me),{}),mc=Z=>Z&&Z.startsWith("/")?`${window.strapi.backendURL}${Z}`:Z,Cf=(Z,me)=>Object.keys(Z).reduce((Le,nt)=>(Le[`${me}.${nt}`]=Z[nt],Le),{});var Il=Z=>{var me={};return Br.d(me,Z),me},Bf=Z=>()=>Z,ed=Il({default:()=>Xr()});const Mf="[@strapi/helper-plugin]:",gc=Z=>{const me=Z;let Le=!1;if(typeof me!="function")throw new TypeError(`${Mf} once requires a function parameter`);return(...nt)=>{Le||(me(...nt),Le=!0)}};function Js(Z){return Z.json?Z.json():Z}function ma(Z,me=!0){return Z.status>=200&&Z.status<300||Z.status===0?Z:(Z.status===401&&Ms.getToken()&&me&&(Ms.clearAppStorage(),window.location.reload()),Js(Z).then(Le=>{const nt=new Error(Z.statusText);throw nt.response=Z,nt.response.payload=Le,nt}).catch(()=>{const Le=new Error(Z.statusText);throw Le.response=Z,Le}))}function Sf(Z){return Object.keys(Z).map(me=>`${encodeURIComponent(me)}=${encodeURIComponent(Z[me])}`).join("&")}function Of(Z){return new Promise(me=>{fetch(`${window.strapi.backendURL}/_health`,{method:"HEAD",mode:"no-cors",headers:{"Content-Type":"application/json","Keep-Alive":!1}}).then(Le=>{if(Le.status>=400)throw new Error("not available");me(Z)}).catch(()=>{setTimeout(()=>Of(Z).then(me),100)})})}const kf=gc(console.warn);function Va(...Z){let[me,Le={},nt,oe=!0,...wt]=Z,Ft;kf("The `request` function is deprecated and will be removed in the next major version. Please use `useFetchClient` instead.");try{[{noAuth:Ft}]=wt}catch{Ft=!1}Le.headers||(Le.headers=Object.assign({"Content-Type":"application/json"},Le.headers));const Je=Ms.getToken();if(Je&&!Ft&&(Le.headers=Object.assign({Authorization:`Bearer ${Je}`},Le.headers)),me=(0,ed.default)(me,"/")?`${window.strapi.backendURL}${me}`:me,Le&&Le.params){const Nt=Sf(Le.params);me=`${me}?${Nt}`}return Le&&Le.body&&oe&&(Le.body=JSON.stringify(Le.body)),fetch(me,Le).then(ma).then(Js).then(Nt=>nt?Of(Nt):Nt)}const vc=(Z,me)=>`${Z}${Math.floor(me*255).toString(16).padStart(2,0)}`,yc={onClick:Z=>Z.stopPropagation(),role:"button","aria-hidden":!0},Zc=({fn:Z,condition:me=!0})=>{if(me)return{style:{cursor:"pointer"},onClick:Z}},Nu=()=>vt.default.createElement("div",{...yc}),jf={email:"components.Input.error.validation.email",json:"components.Input.error.validation.json",lowercase:"components.Input.error.validation.lowercase",max:"components.Input.error.validation.max",maxLength:"components.Input.error.validation.maxLength",min:"components.Input.error.validation.min",minLength:"components.Input.error.validation.minLength",regex:"components.Input.error.validation.regex",required:"components.Input.error.validation.required",unique:"components.Input.error.validation.unique",integer:"component.Input.error.validation.integer"};function Tf(Z){return Z}var wf=Mn.Hn,Ec=Mn.xC,Uf=Mn.iq,Vl=Mn.NY,Kc=Mn.OB,Wf=Mn.ug,Fu=Mn.m$,td=Mn.uT,nd=Mn.O4,Gc=Mn.jW,nu=Mn.QH,ce=Mn.Y_,et=Mn.W1,Wt=Mn.vq,mn=Mn.MG,gn=Mn.xZ,nr=Mn.tM,dr=Mn.c4,ri=Mn.x7,Ki=Mn.W$,$i=Mn.J5,Lo=Mn.l0,xo=Mn.jm,hr=Mn.JQ,ns=Mn.Zc,ra=Mn.XL,ga=Mn.Hw,ws=Mn.rt,is=Mn.rU,Ia=Mn.Qj,bu=Mn.dO,Qo=Mn.dJ,Jo=Mn.Hz,Df=Mn.ZF,bc=Mn.X0,Yc=Mn.cJ,Xs=Mn.N$,_l=Mn.vG,qs=Mn.w7,Bu=Mn.v4,Pf=Mn.tU,Ha=Mn.RM,Af=Mn.oL,Ll=Mn.JV,zf=Mn.ij,ku=Mn.fG,ju=Mn.fC,xu=Mn.m,Rf=Mn.SL,Uu=Mn.fz,Za=Mn.qb,xc=Mn.t3,Ka=Mn.Bg,$o=Mn._Y,Bs=Mn.iA,ks=Mn.Ui,zs=Mn.L8,Ga=Mn.I8,Wu=Mn.w6,Vs=Mn.e5,Qc=Mn.ZT,zu=Mn.dU,Vu=Mn.nn,Vf=Mn.tg,gl=Mn.mD,Ma=Mn.k2,Hu=Mn.UN,sr=Mn.CJ,pi=Mn.qX,Mi=Mn.OT,Gi=Mn.X7,ao=Mn.CR,Io=Mn.jV,os=Mn.Q1,Hl=Mn.WY,Cu=Mn.YB,Cc=Mn.UW,Jc=Mn.to,Xc=Mn.I0,va=Mn.So,Zl=Mn.L7,Kl=Mn.QI,ol=Mn.Vu,hd=Mn.Wq,Zu=Mn.W6,If=Mn.VP,rd=Mn.Xe,Ku=Mn.mZ,pd=Mn.kY,Hf=Mn.L0,Mc=Mn.E2,id=Mn.go,Sc=Mn.c1,od=Mn.yX,md=Mn.F5,Zf=Mn.lm,Kf=Mn.o1,kd=Mn.Yw,Od=Mn.aM,Td=Mn.Kx,wd=Mn.ss,Mu=Mn.vn,qc=Mn.Uq,Oc=Mn.j1,sl=Mn.Sh,Rs=Mn.rS,sd=Mn.Od},44046:function(_,b,i){"use strict";i.d(b,{J:function(){return Fe}});var l=i(32735),f=i(30126),d=i(60216),g=i.n(d),E=i(52522),m=i(84474),C=i(77981),x=i(55454),P=i(8471),T=i(45140),O=i(49758),w=i(92626),R=i(74512),F=i(98084),V=i(96669);const L=ut=>{const{id:ht}=(0,F.n)();return(0,R.jsx)(T.l,{position:"start",children:(0,R.jsx)(V.C,{"aria-labelledby":`${ht}-title`,...ut})})};var $=i(14763),U=i(74030),N=i(11682),k=i(30659),j=i(84642),z=i(50162),K=i(94997),G=i(63318),Y=i(67879);const ae=P.ZP.span`
750
750
  text-transform: uppercase;
751
751
  `,Ce=(0,P.ZP)(T.l)`
752
752
  opacity: 0;
@@ -1063,7 +1063,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1063
1063
  }
1064
1064
  `,mt=({asset:ne})=>ne.mime.includes(k.h3.Video)?d.createElement(_r,{height:"100%"},d.createElement(Zr.F,{url:(0,J.eM)(ne,!0),mime:ne.mime,alt:ne.alternativeText||ne.name})):ne.mime.includes(k.h3.Audio)?d.createElement(Xn,null,d.createElement(Cr.N,{url:(0,J.eM)(ne,!0),alt:ne.alternativeText||ne.name})):ne.mime.includes(k.h3.Image)?d.createElement(Ae.x,{as:"img",maxHeight:"100%",maxWidth:"100%",src:(0,J.eM)(ne,!0),alt:ne.alternativeText||ne.name}):d.createElement(Jr,{width:"100%",height:"100%",justifyContent:"center",hasRadius:!0},ne.ext.includes("pdf")?d.createElement(bn.Z,{"aria-label":ne.alternativeText||ne.name,width:"24px",height:"32px"}):d.createElement(zn.Z,{"aria-label":ne.alternativeText||ne.name,width:"24px",height:"32px"}));mt.propTypes={asset:k.pw.isRequired};var Ke=i(22765),Mt=i(94997),tn=i(37944);const Fn=({asset:ne,onDeleteAsset:ge,onAddAsset:je,onEditAsset:He})=>{const{formatMessage:it}=(0,U.Z)();return d.createElement(Ke.b,null,je&&d.createElement(Pe.h,{label:it({id:(0,ht.Z)("control-card.add"),defaultMessage:"Add"}),icon:d.createElement(Ie.Z,null),onClick:()=>je(ne)}),d.createElement(tn.u,{url:(0,l.CR)(ne.url)}),ge&&d.createElement(Pe.h,{label:it({id:"global.delete",defaultMessage:"Delete"}),icon:d.createElement(Mt.Z,null),onClick:()=>ge(ne)}),He&&d.createElement(Pe.h,{label:it({id:(0,ht.Z)("control-card.edit"),defaultMessage:"edit"}),icon:d.createElement(Fe.Z,null),onClick:He}))};Fn.defaultProps={onAddAsset:void 0,onDeleteAsset:void 0,onEditAsset:void 0},Fn.propTypes={asset:k.pw.isRequired,onAddAsset:E().func,onEditAsset:E().func,onDeleteAsset:E().func};var Cn=i(18129),Bn=i(9047),Ge=i(69393);const At=(0,N.ZP)(P.Z)`
1065
1065
  align-items: center;
1066
- `,Bt=({disabled:ne,onClick:ge,onDropAsset:je})=>{const{formatMessage:He}=(0,U.Z)(),[it,Rt]=(0,d.useState)(!1),fn=dn=>{dn.preventDefault(),Rt(!0)},qt=dn=>{dn.currentTarget.contains(dn.relatedTarget)||Rt(!1)},Vt=dn=>{dn.preventDefault()},Jt=dn=>{if(dn.preventDefault(),dn?.dataTransfer?.files){const Jn=dn.dataTransfer.files,Hn=[];for(let Ir=0;Ir<Jn.length;Ir++){const vr=Jn.item(Ir),yr=(0,Ge.j)(vr,k._S.Computer);Hn.push(yr)}je(Hn)}Rt(!1)};return d.createElement(m.k,{borderStyle:it?"dashed":void 0,borderWidth:it?"1px":void 0,borderColor:it?"primary600":void 0,direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",as:"button",type:"button",disabled:ne,onClick:ge,onDragEnter:fn,onDragLeave:qt,onDragOver:Vt,onDrop:Jt,style:{cursor:ne?"not-allowed":"pointer"}},d.createElement(Cn.J,{as:Bn.Z,"aria-hidden":!0,width:"30px",height:"24px",color:ne?"neutral400":"primary600",marginBottom:3}),d.createElement(At,{variant:"pi",fontWeight:"bold",textColor:"neutral600",style:{textAlign:"center"},as:"span"},He({id:(0,ht.Z)("mediaLibraryInput.placeholder"),defaultMessage:"Click to add an asset or drag and drop one in this area"})))};Bt.defaultProps={disabled:!1,onDropAsset:void 0},Bt.propTypes={disabled:E().bool,onClick:E().func.isRequired,onDropAsset:E().func};const Zt=(0,d.forwardRef)(({assets:ne,disabled:ge,error:je,hint:He,label:it,labelAction:Rt,onAddAsset:fn,onDeleteAsset:qt,onDeleteAssetFromMediaLibrary:Vt,onDropAsset:Jt,onEditAsset:dn,onNext:Jn,onPrevious:Hn,required:Ir,selectedAssetIndex:vr,trackedLocation:yr},Er)=>{const{formatMessage:Or}=(0,U.Z)(),[we,ue]=(0,d.useState)(!1),Te=ne[vr];return d.createElement(d.Fragment,null,d.createElement(Qe.F,{ref:Er,label:it,labelAction:Rt,secondaryLabel:Te?.name,selectedSlide:vr,previousLabel:Or({id:(0,ht.Z)("mediaLibraryInput.actions.previousSlide"),defaultMessage:"Previous slide"}),nextLabel:Or({id:(0,ht.Z)("mediaLibraryInput.actions.nextSlide"),defaultMessage:"Next slide"}),onNext:Jn,onPrevious:Hn,hint:He,error:je,required:Ir,actions:Te?d.createElement(Fn,{asset:Te,onDeleteAsset:ge?void 0:qt,onAddAsset:ge?void 0:fn,onEditAsset:dn?()=>ue(!0):void 0}):void 0},ne.length===0?d.createElement(jt.q,{label:Or({id:(0,ht.Z)("mediaLibraryInput.slideCount"),defaultMessage:"{n} of {m} slides"},{n:1,m:1})},d.createElement(Bt,{disabled:ge,onClick:fn,onDropAsset:Jt})):ne.map((ze,ft)=>d.createElement(jt.q,{key:ze.id,label:Or({id:(0,ht.Z)("mediaLibraryInput.slideCount"),defaultMessage:"{n} of {m} slides"},{n:ft+1,m:ne.length})},d.createElement(mt,{asset:ze})))),we&&d.createElement(Se.s,{onClose:ze=>{ue(!1),ze===null&&Vt(),ze&&dn(ze)},asset:Te,canUpdate:!0,canCopyLink:!0,canDownload:!0,trackedLocation:yr}))});Zt.defaultProps={disabled:!1,error:void 0,hint:void 0,labelAction:void 0,onDropAsset:void 0,required:!1,trackedLocation:void 0},Zt.propTypes={assets:E().arrayOf(k.pw).isRequired,disabled:E().bool,error:E().string,hint:E().string,label:E().string.isRequired,labelAction:E().node,onAddAsset:E().func.isRequired,onDeleteAsset:E().func.isRequired,onDeleteAssetFromMediaLibrary:E().func.isRequired,onDropAsset:E().func,onEditAsset:E().func.isRequired,onNext:E().func.isRequired,onPrevious:E().func.isRequired,required:E().bool,selectedAssetIndex:E().number.isRequired,trackedLocation:E().string};const Yt={AssetSelect:"SelectAsset",AssetUpload:"UploadAsset",FolderCreate:"FolderCreate"},vn=(0,d.forwardRef)(({attribute:{allowedTypes:ne},intlLabel:ge,description:je,disabled:He,error:it,labelAction:Rt,multiple:fn,name:qt,onChange:Vt,value:Jt,required:dn},Jn)=>{const Hn=ne||["files","images","videos","audios"],[Ir,vr]=(0,d.useState)([]),[yr,Er]=(0,d.useState)(void 0),[Or,we]=(0,d.useState)(0),[ue,Te]=(0,d.useState)(),[ze,ft]=(0,d.useState)(null),{formatMessage:yt}=(0,U.Z)(),ln=(0,l.lm)();(0,d.useEffect)(()=>{yr===void 0&&vr([])},[yr]);const En=Array.isArray(Jt)?Jt:[Jt],jr=Ar=>{Vt({target:{name:qt,value:fn?Ar:Ar[0]}}),Er(void 0)},ot=()=>{let Ar;if(fn){const ai=En.filter((Oi,$r)=>$r!==Or);Ar=ai.length>0?ai:null}else Ar=null;Vt({target:{name:qt,value:Ar}}),we(0)},zt=Ar=>{let ai;if(fn){const Oi=En.filter($r=>$r.id!==Ar.id);ai=Oi.length>0?Oi:null}else ai=null;Vt({target:{name:qt,value:ai}}),we(0)},Ut=Ar=>{const ai=En.map(Oi=>Oi.id===Ar.id?Ar:Oi);Vt({target:{name:qt,value:fn?ai:ai[0]}})},Ln=(Ar,ai)=>{const Oi=te(Hn,Ar);Oi.length>0?ai(Oi):ln({type:"warning",timeout:4e3,message:{id:(0,ht.Z)("input.notification.not-supported"),defaultMessage:"You can't upload this type of file.",values:{fileTypes:Hn.join(",")}}})},Gn=Ar=>{Ln(Ar,ai=>{Te(ai),Er(Yt.AssetUpload)})};let xn=ge.id?yt(ge):"";fn&&En.length>0&&(xn=`${xn} (${Or+1} / ${En.length})`);const ur=()=>{we(Ar=>Ar<En.length-1?Ar+1:0)},Sr=()=>{we(Ar=>Ar>0?Ar-1:En.length-1)},Fr=Ar=>{vr(ai=>[...ai,...Ar])},ni=je?yt({id:je.id,defaultMessage:je.defaultMessage},{...je.values}):"";let di=En;if(Ir.length>0){const Ar=te(Hn,Ir);di=fn?[...Ar,...En]:[Ar[0]]}return d.createElement(d.Fragment,null,d.createElement(Zt,{ref:Jn,assets:En,disabled:He,label:xn,labelAction:Rt,onDeleteAsset:zt,onDeleteAssetFromMediaLibrary:ot,onAddAsset:()=>Er(Yt.AssetSelect),onDropAsset:Gn,onEditAsset:Ut,onNext:ur,onPrevious:Sr,error:it,hint:ni,required:dn,selectedAssetIndex:Or,trackedLocation:"content-manager"}),yr===Yt.AssetSelect&&d.createElement(qn,{allowedTypes:Hn,initiallySelectedAssets:di,folderId:ze,onClose:()=>{Er(void 0),ft(null)},onValidate:jr,multiple:fn,onAddAsset:()=>Er(Yt.AssetUpload),onAddFolder:()=>Er(Yt.FolderCreate),onChangeFolder:Ar=>ft(Ar),trackedLocation:"content-manager"}),yr===Yt.AssetUpload&&d.createElement(Tt.x,{onClose:()=>Er(Yt.AssetSelect),initialAssetsToAdd:ue,addUploadedFiles:Fr,trackedLocation:"content-manager",folderId:ze,validateAssetsTypes:Ln}),yr===Yt.FolderCreate&&d.createElement(tt.f,{onClose:()=>Er(Yt.AssetSelect),parentFolderId:ze}))});vn.defaultProps={attribute:{allowedTypes:["videos","files","images","audios"]},disabled:!1,description:void 0,error:void 0,intlLabel:void 0,labelAction:void 0,multiple:!1,required:!1,value:[]},vn.propTypes={attribute:E().shape({allowedTypes:E().arrayOf(E().string)}),disabled:E().bool,description:E().shape({id:E().string,defaultMessage:E().string,values:E().shape({})}),error:E().string,intlLabel:E().shape({id:E().string,defaultMessage:E().string}),labelAction:E().node,multiple:E().bool,onChange:E().func.isRequired,name:E().string.isRequired,required:E().bool,value:E().oneOfType([E().arrayOf(k.pw),k.pw])};var Un=i(39126),Nn=()=>d.createElement(Un.Z,null),Vn=i(59898);const Ye=f.s1.u2;var de={register(ne){ne.addMenuLink({to:`/plugins/${Vn.Z}`,icon:Nn,intlLabel:{id:`${Vn.Z}.plugin.name`,defaultMessage:"Media Library"},permissions:k._I.main,async Component(){return await i.e(3650).then(i.bind(i,34026))}}),ne.addFields({type:"media",Component:vn}),ne.addComponents([{name:"media-library",Component:ve}]),ne.registerPlugin({id:Vn.Z,name:Ye})},bootstrap(ne){ne.addSettingsLink("global",{id:"media-library-settings",intlLabel:{id:(0,ht.Z)("plugin.name"),defaultMessage:"Media Library"},to:"/settings/media-library",async Component(){return await i.e(695).then(i.bind(i,73078))},permissions:k._I.settings})},async registerTrads({locales:ne}){const ge=await Promise.all(ne.map(je=>i(22526)(`./${je}.json`).then(({default:He})=>({data:(0,l.jV)(He,Vn.Z),locale:je})).catch(()=>({data:{},locale:je}))));return Promise.resolve(ge)}}},59898:function(_,b,i){"use strict";var l=i(7410);const f=l.u2.replace(/^@strapi\/plugin-/i,"");b.Z=f},1890:function(_,b){"use strict";const i=[{name:"createdAt",fieldSchema:{type:"date"},metadatas:{label:"createdAt"}},{name:"updatedAt",fieldSchema:{type:"date"},metadatas:{label:"updatedAt"}},{name:"mime",fieldSchema:{type:"enumeration",options:[{label:"audio",value:"audio"},{label:"file",value:"file"},{label:"image",value:"image"},{label:"video",value:"video"}]},metadatas:{label:"type"}}];b.Z=i},58233:function(_,b,i){"use strict";var l=i(87175),f=i.n(l);function d(g,E=0){const{value:m,unit:C}=f()(g*1e3,{precision:E});return C?`${m}${C.toUpperCase()}`:"0B"}b.Z=d},94187:function(_,b,i){"use strict";var l=i(59898);const f=d=>`${l.Z}.${d}`;b.Z=f},84474:function(_,b,i){"use strict";i.d(b,{ih:function(){return l},rV:function(){return g},eM:function(){return C},d3:function(){return x},td:function(){return P.Z},LU:function(){return w},bw:function(){return V},M4:function(){return k},om:function(){return K},Km:function(){return U},OB:function(){return R.Z},Pl:function(){return G.Z}});const l=({url:Y,params:ae})=>{if(Y===void 0||typeof ae!="object")return Y;const Ce=new URL(Y,window.strapi.backendURL);return Object.entries(ae).forEach(([J,le])=>{le!==void 0&&Ce.searchParams.append(J,le)}),Ce.toString()},f=Y=>{const ae=Y?.filters?.$and;return ae?!!ae.find(J=>Object.keys(J).includes("mime")):!1};var g=Y=>f(Y),E=i(30126),C=(Y,ae=!0)=>{if(Y.isLocal)return Y.url;const Ce=ae&&Y?.formats?.thumbnail?.url||Y.url;return(0,E.CR)(Ce)};function x(Y,ae){let Ce;function J(le){return le.value===ae?(Ce=le,!0):Array.isArray(le.children)&&le.children.some(J)}return Y.some(J),Ce}var P=i(58233),T=i(86357);const O=Y=>String(Y).padStart(2,"0"),w=Y=>{const ae=(0,T.Z)({start:0,end:Y*1e3});return`${O(ae.hours)}:${O(ae.minutes)}:${O(ae.seconds)}`};var R=i(94187),V=Y=>{let ae=[{id:null,label:{id:(0,R.Z)("plugin.name"),defaultMessage:"Media Library"}}];return Y?.parent?.parent&&ae.push([]),Y?.parent&&ae.push({id:Y.parent.id,label:Y.parent.name,path:Y.parent.path}),Y&&ae.push({id:Y.id,label:Y.name,path:Y.path}),ae},L=i(33348),U=(Y,ae,{folder:Ce,folderPath:J}={})=>{const{_q:le,...be}=ae,te=(0,L.stringify)({...be,folder:Ce,folderPath:J},{encode:!1});return`${Y}${te?`?${te}`:""}`},k=(Y,{pathname:ae,query:Ce})=>{let J=[{id:null,label:{id:(0,R.Z)("plugin.name"),defaultMessage:"Media Library"},href:Y?U(ae,Ce):void 0}];return Y?.parent?.parent&&J.push([]),Y?.parent&&J.push({id:Y.parent.id,label:Y.parent.name,href:U(ae,Ce,{folder:Y.parent.id,folderPath:Y.parent.path})}),Y&&J.push({id:Y.id,label:Y.name}),J},j=i(79940),K=(Y,ae)=>{const Ce=[],J=(0,j.Z)(Y),le=J.find(te=>te.value===ae);if(!le)return[];let{parent:be}=le;for(;be!==void 0;){let te=J.find(({value:q})=>q===be);Ce.push({id:te.value,label:te.label}),be=te.parent}return Ce.reverse()},G=i(40257)},69393:function(_,b,i){"use strict";i.d(b,{j:function(){return f}});var l=i(8436);const f=(d,g)=>({size:d.size/1e3,createdAt:new Date(d.lastModified).toISOString(),name:d.name,source:g,type:(0,l.Z)(d.type),url:URL.createObjectURL(d),ext:d.name.split(".").pop(),mime:d.type,rawFile:d,isLocal:!0})},40257:function(_,b){"use strict";const i=l=>l?l.map(f=>f.substring(0,f.length-1)):[];b.Z=i},8436:function(_,b,i){"use strict";i.d(b,{Z:function(){return f}});var l=i(52522);const f=d=>d.includes(l.h3.Image)?l.h3.Image:d.includes(l.h3.Video)?l.h3.Video:d.includes(l.h3.Audio)?l.h3.Audio:l.h3.Document},98374:function(_,b,i){"use strict";_.exports=i(86693).default},5715:function(_,b,i){"use strict";i.d(b,{_:function(){return l}});const l={accessMain:[{action:"plugin::i18n.locale.read",subject:null}],create:[{action:"plugin::i18n.locale.create",subject:null}],delete:[{action:"plugin::i18n.locale.delete",subject:null}],update:[{action:"plugin::i18n.locale.update",subject:null}],read:[{action:"plugin::i18n.locale.read",subject:null}]}},33003:function(_,b,i){"use strict";i.d(b,{HC:function(){return g},I4:function(){return f},OT:function(){return E},xz:function(){return d}});var l=i(64198);const f=`${l.Z}/locales/resolve-locales`,d=`${l.Z}/locales/add`,g=`${l.Z}/locales/delete`,E=`${l.Z}/locales/update`},37731:function(_,b,i){"use strict";var l=i(32735),f=i(30126),d=i(15062),g=i(33003);const E=()=>{const m=(0,d.I0)(),C=(0,f.lm)(),x=(0,d.v9)(O=>O.i18n_locales.locales),P=(0,d.v9)(O=>O.i18n_locales.isLoading),{get:T}=(0,f.kY)();return(0,l.useEffect)(()=>{T("/i18n/locales").then(({data:O})=>m({type:g.I4,locales:O})).catch(O=>{"code"in O&&O?.code==="ERR_CANCELED"||C({type:"warning",message:{id:"notification.error"}})})},[m,T,C]),{locales:x,isLoading:P}};b.Z=E},98751:function(_,b,i){"use strict";i.d(b,{default:function(){return jr}});var l=i(30126),f=i(33795),d=i.n(f),g=i(24346),E=i(24834),m=i(32735),C=i(8365),x=i(31014),P=i(47209),T=i(96433),O=i(84642),w=i(22128),R=i(91779),F=i(42567),V=i(60216),L=i.n(V),$=i(67879),U=i(8471),N=i(60677);const k=(0,U.ZP)(C.Z)`
1066
+ `,Bt=({disabled:ne,onClick:ge,onDropAsset:je})=>{const{formatMessage:He}=(0,U.Z)(),[it,Rt]=(0,d.useState)(!1),fn=dn=>{dn.preventDefault(),Rt(!0)},qt=dn=>{dn.currentTarget.contains(dn.relatedTarget)||Rt(!1)},Vt=dn=>{dn.preventDefault()},Jt=dn=>{if(dn.preventDefault(),dn?.dataTransfer?.files){const Jn=dn.dataTransfer.files,Hn=[];for(let Ir=0;Ir<Jn.length;Ir++){const vr=Jn.item(Ir),yr=(0,Ge.j)(vr,k._S.Computer);Hn.push(yr)}je(Hn)}Rt(!1)};return d.createElement(m.k,{borderStyle:it?"dashed":void 0,borderWidth:it?"1px":void 0,borderColor:it?"primary600":void 0,direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",as:"button",type:"button",disabled:ne,onClick:ge,onDragEnter:fn,onDragLeave:qt,onDragOver:Vt,onDrop:Jt,style:{cursor:ne?"not-allowed":"pointer"}},d.createElement(Cn.J,{as:Bn.Z,"aria-hidden":!0,width:"30px",height:"24px",color:ne?"neutral400":"primary600",marginBottom:3}),d.createElement(At,{variant:"pi",fontWeight:"bold",textColor:"neutral600",style:{textAlign:"center"},as:"span"},He({id:(0,ht.Z)("mediaLibraryInput.placeholder"),defaultMessage:"Click to add an asset or drag and drop one in this area"})))};Bt.defaultProps={disabled:!1,onDropAsset:void 0},Bt.propTypes={disabled:E().bool,onClick:E().func.isRequired,onDropAsset:E().func};const Zt=(0,d.forwardRef)(({assets:ne,disabled:ge,error:je,hint:He,label:it,labelAction:Rt,onAddAsset:fn,onDeleteAsset:qt,onDeleteAssetFromMediaLibrary:Vt,onDropAsset:Jt,onEditAsset:dn,onNext:Jn,onPrevious:Hn,required:Ir,selectedAssetIndex:vr,trackedLocation:yr},Er)=>{const{formatMessage:Or}=(0,U.Z)(),[we,ue]=(0,d.useState)(!1),Te=ne[vr];return d.createElement(d.Fragment,null,d.createElement(Qe.F,{ref:Er,label:it,labelAction:Rt,secondaryLabel:Te?.name,selectedSlide:vr,previousLabel:Or({id:(0,ht.Z)("mediaLibraryInput.actions.previousSlide"),defaultMessage:"Previous slide"}),nextLabel:Or({id:(0,ht.Z)("mediaLibraryInput.actions.nextSlide"),defaultMessage:"Next slide"}),onNext:Jn,onPrevious:Hn,hint:He,error:je,required:Ir,actions:Te?d.createElement(Fn,{asset:Te,onDeleteAsset:ge?void 0:qt,onAddAsset:ge?void 0:fn,onEditAsset:dn?()=>ue(!0):void 0}):void 0},ne.length===0?d.createElement(jt.q,{label:Or({id:(0,ht.Z)("mediaLibraryInput.slideCount"),defaultMessage:"{n} of {m} slides"},{n:1,m:1})},d.createElement(Bt,{disabled:ge,onClick:fn,onDropAsset:Jt})):ne.map((ze,ft)=>d.createElement(jt.q,{key:ze.id,label:Or({id:(0,ht.Z)("mediaLibraryInput.slideCount"),defaultMessage:"{n} of {m} slides"},{n:ft+1,m:ne.length})},d.createElement(mt,{asset:ze})))),we&&d.createElement(Se.s,{onClose:ze=>{ue(!1),ze===null&&Vt(),ze&&dn(ze)},asset:Te,canUpdate:!0,canCopyLink:!0,canDownload:!0,trackedLocation:yr}))});Zt.defaultProps={disabled:!1,error:void 0,hint:void 0,labelAction:void 0,onDropAsset:void 0,required:!1,trackedLocation:void 0},Zt.propTypes={assets:E().arrayOf(k.pw).isRequired,disabled:E().bool,error:E().string,hint:E().string,label:E().string.isRequired,labelAction:E().node,onAddAsset:E().func.isRequired,onDeleteAsset:E().func.isRequired,onDeleteAssetFromMediaLibrary:E().func.isRequired,onDropAsset:E().func,onEditAsset:E().func.isRequired,onNext:E().func.isRequired,onPrevious:E().func.isRequired,required:E().bool,selectedAssetIndex:E().number.isRequired,trackedLocation:E().string};const Yt={AssetSelect:"SelectAsset",AssetUpload:"UploadAsset",FolderCreate:"FolderCreate"},vn=(0,d.forwardRef)(({attribute:{allowedTypes:ne},intlLabel:ge,description:je,disabled:He,error:it,labelAction:Rt,multiple:fn,name:qt,onChange:Vt,value:Jt,required:dn},Jn)=>{const Hn=ne||["files","images","videos","audios"],[Ir,vr]=(0,d.useState)([]),[yr,Er]=(0,d.useState)(void 0),[Or,we]=(0,d.useState)(0),[ue,Te]=(0,d.useState)(),[ze,ft]=(0,d.useState)(null),{formatMessage:yt}=(0,U.Z)(),ln=(0,l.lm)();(0,d.useEffect)(()=>{yr===void 0&&vr([])},[yr]);const En=Array.isArray(Jt)?Jt:[Jt],jr=Ar=>{Vt({target:{name:qt,value:fn?Ar:Ar[0]}}),Er(void 0)},ot=()=>{let Ar;if(fn){const ai=En.filter((Oi,$r)=>$r!==Or);Ar=ai.length>0?ai:null}else Ar=null;Vt({target:{name:qt,value:Ar}}),we(0)},zt=Ar=>{let ai;if(fn){const Oi=En.filter($r=>$r.id!==Ar.id);ai=Oi.length>0?Oi:null}else ai=null;Vt({target:{name:qt,value:ai}}),we(0)},Ut=Ar=>{const ai=En.map(Oi=>Oi.id===Ar.id?Ar:Oi);Vt({target:{name:qt,value:fn?ai:ai[0]}})},Ln=(Ar,ai)=>{const Oi=te(Hn,Ar);Oi.length>0?ai(Oi):ln({type:"warning",timeout:4e3,message:{id:(0,ht.Z)("input.notification.not-supported"),defaultMessage:"You can't upload this type of file.",values:{fileTypes:Hn.join(",")}}})},Gn=Ar=>{Ln(Ar,ai=>{Te(ai),Er(Yt.AssetUpload)})};let xn=ge.id?yt(ge):"";fn&&En.length>0&&(xn=`${xn} (${Or+1} / ${En.length})`);const ur=()=>{we(Ar=>Ar<En.length-1?Ar+1:0)},Sr=()=>{we(Ar=>Ar>0?Ar-1:En.length-1)},Fr=Ar=>{vr(ai=>[...ai,...Ar])},ni=je?yt({id:je.id,defaultMessage:je.defaultMessage},{...je.values}):"";let di=En;if(Ir.length>0){const Ar=te(Hn,Ir);di=fn?[...Ar,...En]:[Ar[0]]}return d.createElement(d.Fragment,null,d.createElement(Zt,{ref:Jn,assets:En,disabled:He,label:xn,labelAction:Rt,onDeleteAsset:zt,onDeleteAssetFromMediaLibrary:ot,onAddAsset:()=>Er(Yt.AssetSelect),onDropAsset:Gn,onEditAsset:Ut,onNext:ur,onPrevious:Sr,error:it,hint:ni,required:dn,selectedAssetIndex:Or,trackedLocation:"content-manager"}),yr===Yt.AssetSelect&&d.createElement(qn,{allowedTypes:Hn,initiallySelectedAssets:di,folderId:ze,onClose:()=>{Er(void 0),ft(null)},onValidate:jr,multiple:fn,onAddAsset:()=>Er(Yt.AssetUpload),onAddFolder:()=>Er(Yt.FolderCreate),onChangeFolder:Ar=>ft(Ar),trackedLocation:"content-manager"}),yr===Yt.AssetUpload&&d.createElement(Tt.x,{onClose:()=>Er(Yt.AssetSelect),initialAssetsToAdd:ue,addUploadedFiles:Fr,trackedLocation:"content-manager",folderId:ze,validateAssetsTypes:Ln}),yr===Yt.FolderCreate&&d.createElement(tt.f,{onClose:()=>Er(Yt.AssetSelect),parentFolderId:ze}))});vn.defaultProps={attribute:{allowedTypes:["videos","files","images","audios"]},disabled:!1,description:void 0,error:void 0,intlLabel:void 0,labelAction:void 0,multiple:!1,required:!1,value:[]},vn.propTypes={attribute:E().shape({allowedTypes:E().arrayOf(E().string)}),disabled:E().bool,description:E().shape({id:E().string,defaultMessage:E().string,values:E().shape({})}),error:E().string,intlLabel:E().shape({id:E().string,defaultMessage:E().string}),labelAction:E().node,multiple:E().bool,onChange:E().func.isRequired,name:E().string.isRequired,required:E().bool,value:E().oneOfType([E().arrayOf(k.pw),k.pw])};var Un=i(39126),Nn=()=>d.createElement(Un.Z,null),Vn=i(59898);const Ye=f.s1.u2;var de={register(ne){ne.addMenuLink({to:`/plugins/${Vn.Z}`,icon:Nn,intlLabel:{id:`${Vn.Z}.plugin.name`,defaultMessage:"Media Library"},permissions:k._I.main,async Component(){return await i.e(3650).then(i.bind(i,34026))}}),ne.addFields({type:"media",Component:vn}),ne.addComponents([{name:"media-library",Component:ve}]),ne.registerPlugin({id:Vn.Z,name:Ye})},bootstrap(ne){ne.addSettingsLink("global",{id:"media-library-settings",intlLabel:{id:(0,ht.Z)("plugin.name"),defaultMessage:"Media Library"},to:"/settings/media-library",async Component(){return await i.e(695).then(i.bind(i,73078))},permissions:k._I.settings})},async registerTrads({locales:ne}){const ge=await Promise.all(ne.map(je=>i(22526)(`./${je}.json`).then(({default:He})=>({data:(0,l.jV)(He,Vn.Z),locale:je})).catch(()=>({data:{},locale:je}))));return Promise.resolve(ge)}}},59898:function(_,b,i){"use strict";var l=i(7410);const f=l.u2.replace(/^@strapi\/plugin-/i,"");b.Z=f},1890:function(_,b){"use strict";const i=[{name:"createdAt",fieldSchema:{type:"date"},metadatas:{label:"createdAt"}},{name:"updatedAt",fieldSchema:{type:"date"},metadatas:{label:"updatedAt"}},{name:"mime",fieldSchema:{type:"enumeration",options:[{label:"audio",value:"audio"},{label:"file",value:"file"},{label:"image",value:"image"},{label:"video",value:"video"}]},metadatas:{label:"type"}}];b.Z=i},58233:function(_,b,i){"use strict";var l=i(87175),f=i.n(l);function d(g,E=0){const{value:m,unit:C}=f()(g*1e3,{precision:E});return C?`${m}${C.toUpperCase()}`:"0B"}b.Z=d},94187:function(_,b,i){"use strict";var l=i(59898);const f=d=>`${l.Z}.${d}`;b.Z=f},84474:function(_,b,i){"use strict";i.d(b,{ih:function(){return l},rV:function(){return g},eM:function(){return C},d3:function(){return x},td:function(){return P.Z},LU:function(){return w},bw:function(){return V},M4:function(){return k},om:function(){return K},Km:function(){return U},OB:function(){return R.Z},Pl:function(){return G.Z}});const l=({url:Y,params:ae})=>{if(Y===void 0||typeof ae!="object")return Y;const Ce=new URL(Y,window.strapi.backendURL??window.location.origin);return Object.entries(ae).forEach(([J,le])=>{le!==void 0&&Ce.searchParams.append(J,le)}),Ce.toString()},f=Y=>{const ae=Y?.filters?.$and;return ae?!!ae.find(J=>Object.keys(J).includes("mime")):!1};var g=Y=>f(Y),E=i(30126),C=(Y,ae=!0)=>{if(Y.isLocal)return Y.url;const Ce=ae&&Y?.formats?.thumbnail?.url||Y.url;return(0,E.CR)(Ce)};function x(Y,ae){let Ce;function J(le){return le.value===ae?(Ce=le,!0):Array.isArray(le.children)&&le.children.some(J)}return Y.some(J),Ce}var P=i(58233),T=i(86357);const O=Y=>String(Y).padStart(2,"0"),w=Y=>{const ae=(0,T.Z)({start:0,end:Y*1e3});return`${O(ae.hours)}:${O(ae.minutes)}:${O(ae.seconds)}`};var R=i(94187),V=Y=>{let ae=[{id:null,label:{id:(0,R.Z)("plugin.name"),defaultMessage:"Media Library"}}];return Y?.parent?.parent&&ae.push([]),Y?.parent&&ae.push({id:Y.parent.id,label:Y.parent.name,path:Y.parent.path}),Y&&ae.push({id:Y.id,label:Y.name,path:Y.path}),ae},L=i(33348),U=(Y,ae,{folder:Ce,folderPath:J}={})=>{const{_q:le,...be}=ae,te=(0,L.stringify)({...be,folder:Ce,folderPath:J},{encode:!1});return`${Y}${te?`?${te}`:""}`},k=(Y,{pathname:ae,query:Ce})=>{let J=[{id:null,label:{id:(0,R.Z)("plugin.name"),defaultMessage:"Media Library"},href:Y?U(ae,Ce):void 0}];return Y?.parent?.parent&&J.push([]),Y?.parent&&J.push({id:Y.parent.id,label:Y.parent.name,href:U(ae,Ce,{folder:Y.parent.id,folderPath:Y.parent.path})}),Y&&J.push({id:Y.id,label:Y.name}),J},j=i(79940),K=(Y,ae)=>{const Ce=[],J=(0,j.Z)(Y),le=J.find(te=>te.value===ae);if(!le)return[];let{parent:be}=le;for(;be!==void 0;){let te=J.find(({value:q})=>q===be);Ce.push({id:te.value,label:te.label}),be=te.parent}return Ce.reverse()},G=i(40257)},69393:function(_,b,i){"use strict";i.d(b,{j:function(){return f}});var l=i(8436);const f=(d,g)=>({size:d.size/1e3,createdAt:new Date(d.lastModified).toISOString(),name:d.name,source:g,type:(0,l.Z)(d.type),url:URL.createObjectURL(d),ext:d.name.split(".").pop(),mime:d.type,rawFile:d,isLocal:!0})},40257:function(_,b){"use strict";const i=l=>l?l.map(f=>f.substring(0,f.length-1)):[];b.Z=i},8436:function(_,b,i){"use strict";i.d(b,{Z:function(){return f}});var l=i(52522);const f=d=>d.includes(l.h3.Image)?l.h3.Image:d.includes(l.h3.Video)?l.h3.Video:d.includes(l.h3.Audio)?l.h3.Audio:l.h3.Document},98374:function(_,b,i){"use strict";_.exports=i(86693).default},5715:function(_,b,i){"use strict";i.d(b,{_:function(){return l}});const l={accessMain:[{action:"plugin::i18n.locale.read",subject:null}],create:[{action:"plugin::i18n.locale.create",subject:null}],delete:[{action:"plugin::i18n.locale.delete",subject:null}],update:[{action:"plugin::i18n.locale.update",subject:null}],read:[{action:"plugin::i18n.locale.read",subject:null}]}},33003:function(_,b,i){"use strict";i.d(b,{HC:function(){return g},I4:function(){return f},OT:function(){return E},xz:function(){return d}});var l=i(64198);const f=`${l.Z}/locales/resolve-locales`,d=`${l.Z}/locales/add`,g=`${l.Z}/locales/delete`,E=`${l.Z}/locales/update`},37731:function(_,b,i){"use strict";var l=i(32735),f=i(30126),d=i(15062),g=i(33003);const E=()=>{const m=(0,d.I0)(),C=(0,f.lm)(),x=(0,d.v9)(O=>O.i18n_locales.locales),P=(0,d.v9)(O=>O.i18n_locales.isLoading),{get:T}=(0,f.kY)();return(0,l.useEffect)(()=>{T("/i18n/locales").then(({data:O})=>m({type:g.I4,locales:O})).catch(O=>{"code"in O&&O?.code==="ERR_CANCELED"||C({type:"warning",message:{id:"notification.error"}})})},[m,T,C]),{locales:x,isLoading:P}};b.Z=E},98751:function(_,b,i){"use strict";i.d(b,{default:function(){return jr}});var l=i(30126),f=i(33795),d=i.n(f),g=i(24346),E=i(24834),m=i(32735),C=i(8365),x=i(31014),P=i(47209),T=i(96433),O=i(84642),w=i(22128),R=i(91779),F=i(42567),V=i(60216),L=i.n(V),$=i(67879),U=i(8471),N=i(60677);const k=(0,U.ZP)(C.Z)`
1067
1067
  text-align: center;
1068
1068
  `,j=({description:ot,isCreating:zt,intlLabel:Ut,name:Ln,onChange:Gn,value:xn})=>{const{formatMessage:ur}=(0,$.Z)(),[Sr,Fr]=(0,m.useState)(!1),ni=$r=>zt||$r?Gn({target:{name:Ln,value:$r,type:"checkbox"}}):$r?null:Fr(!0),di=()=>{Gn({target:{name:Ln,value:!1,type:"checkbox"}}),Fr(!1)},Ar=()=>Fr($r=>!$r),ai=Ut.id?ur({id:Ut.id,defaultMessage:Ut.defaultMessage},{...Ut.values}):Ln,Oi=ot?ur({id:ot.id,defaultMessage:ot.defaultMessage},{...ot.values}):"";return m.createElement(m.Fragment,null,m.createElement(x.X,{hint:Oi,id:Ln,name:Ln,onValueChange:ni,value:xn,type:"checkbox"},ai),Sr&&m.createElement(P.V,{onClose:Ar,title:"Confirmation",isOpen:Sr},m.createElement(T.a,{icon:m.createElement(F.Z,null)},m.createElement(O.k,{direction:"column",alignItems:"stretch",gap:2},m.createElement(O.k,{justifyContent:"center"},m.createElement(k,{id:"confirm-description"},ur({id:(0,N.O)("CheckboxConfirmation.Modal.content"),defaultMessage:"Disabling localization will engender the deletion of all your content but the one associated to your default locale (if existing)."}))),m.createElement(O.k,{justifyContent:"center"},m.createElement(C.Z,{fontWeight:"semiBold",id:"confirm-description"},ur({id:(0,N.O)("CheckboxConfirmation.Modal.body"),defaultMessage:"Do you want to disable it?"}))))),m.createElement(w.c,{startAction:m.createElement(R.z,{onClick:Ar,variant:"tertiary"},ur({id:"components.popUpWarning.button.cancel",defaultMessage:"No, cancel"})),endAction:m.createElement(R.z,{variant:"danger-light",onClick:di},ur({id:(0,N.O)("CheckboxConfirmation.Modal.button-confirm"),defaultMessage:"Yes, disable"}))})))};j.defaultProps={description:null,isCreating:!1},j.propTypes={description:L().shape({id:L().string.isRequired,defaultMessage:L().string.isRequired,values:L().object}),intlLabel:L().shape({id:L().string.isRequired,defaultMessage:L().string.isRequired,values:L().object}).isRequired,isCreating:L().bool,name:L().string.isRequired,onChange:L().func.isRequired,value:L().bool.isRequired};var z=j,K=i(23973),G=i.n(K),Y=i(15062),ae=i(53038),J=ot=>ot.rbacProvider.collectionTypesRelatedPermissions,be=ot=>{const Ut=(0,Y.v9)(J)[ot],Ln=Ut["plugin::content-manager.explorer.read"]||[];return{createPermissions:Ut["plugin::content-manager.explorer.create"]||[],readPermissions:Ln}},q=ot=>ot.i18n_locales.locales,ee=i(77981),Se=i(2775),tt=i(16773),Ae=i(40260),pe=i(33348),Pe=i(94958),Ee=(ot,zt,Ut)=>{const Ln=(Gn,xn)=>Object.keys(Gn).reduce((ur,Sr)=>{const Fr=(0,l.UN)(xn,Sr),ni=d()(Gn,Sr),di=(0,l.k2)(xn,[Sr,"component"]),Ar=(0,l.k2)(xn,[Sr,"repeatable"]);return Fr==="dynamiczone"?(ur[Sr]=ni.map(ai=>Ln(ai,Ut[ai.__component])),ur):Fr==="component"?(Ar?ur[Sr]=ni&&ni.map(ai=>Ln(ai,Ut[di])):ur[Sr]=ni&&Ln(ni,Ut[di]),ur):(Fr!=="password"&&Fr!=="relation"&&(ur[Sr]=ni),ur)},{});return Ln(ot,zt)},We=(ot,{contentType:zt,components:Ut},Ln)=>{const Gn=Ee(ot,zt,Ut);Gn.localizations=Ln;const xn=["createdBy","updatedBy","publishedAt","id","updatedAt","createdAt"],ur=(0,l.w6)(Gn,zt,Ut,xn);return(0,l.dU)(ur,zt,Ut)},Fe=(ot,zt,Ut,Ln)=>ot.filter(({code:Gn})=>Gn!==zt&&(Ut||[]).findIndex(({locale:xn})=>xn===Gn)!==-1).filter(({code:Gn})=>Ln.some(({properties:xn})=>d()(xn,"locales",[]).includes(Gn))).map(Gn=>({label:Gn.name,value:Ut.find(xn=>Gn.code===xn.locale).id}));const ut=(0,U.ZP)(C.Z)`
1069
1069
  svg {
@@ -1127,9 +1127,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1127
1127
  fill: ${({theme:ot})=>ot.colors.neutral500};
1128
1128
  }
1129
1129
  }
1130
- `,Mt=({title:ot,icon:zt})=>{const{formatMessage:Ut}=(0,$.Z)();return m.createElement(gr.u,{description:Ut(ot)},m.createElement(Ke,{"aria-label":Ut(ot),type:"button"},zt))};Mt.propTypes={icon:L().element.isRequired,title:L().shape({id:L().string.isRequired,defaultMessage:L().string.isRequired}).isRequired};var tn=Mt;const Fn=(ot,zt)=>({queryInfos:{...ot.queryInfos,defaultParams:{...ot.queryInfos.defaultParams,locale:zt},paramsToKeep:["plugins.i18n.locale"]}}),Cn=ot=>ot?.fieldSchema?.type==="relation"&&ot?.targetModelPluginOptions?.i18n?.localized,Bn=(ot,zt)=>ot.map(Ut=>Ut.reduce((Gn,xn)=>{const ur=xn?.fieldSchema?.type??null,Sr=xn?.fieldSchema?.pluginOptions?.i18n?.localized??["uid","relation"].includes(ur),Fr={title:{id:Sr?(0,N.O)("Field.localized"):(0,N.O)("Field.not-localized"),defaultMessage:Sr?"This value is unique for the selected locale":"This value is common to all locales"},icon:Sr?m.createElement(Jr.Z,{"aria-hidden":!0}):m.createElement(mt,{"aria-hidden":!0})},ni=m.createElement(tn,{...Fr});return Cn(xn)?(Gn.push({...xn,labelAction:ni,...Fn(xn,zt)}),Gn):(Gn.push({...xn,labelAction:ni}),Gn)},[])),Ge=(ot,zt)=>Object.keys(ot).reduce((Ut,Ln)=>{const Gn=ot[Ln],xn=At(Gn.layouts.edit,zt);return Ut[Ln]={...Gn,layouts:{...Gn.layouts,edit:xn}},Ut},{}),At=(ot,zt)=>ot.map(Ut=>Ut.reduce((Gn,xn)=>Cn(xn)?(Gn.push({...xn,...Fn(xn,zt)}),Gn):(Gn.push(xn),Gn),[])),Bt=ot=>["contentType",...ot];var Yt=({layout:ot,query:zt})=>{if(!d()(ot,Bt(["pluginOptions","i18n","localized"]),!1))return{layout:ot,query:zt};const Ln=d()(zt,["plugins","i18n","locale"],null);if(!Ln)return{layout:ot,query:zt};const Gn=Bt(["layouts","edit"]),xn=d()(ot,Gn),ur=Bn(xn,Ln),Sr={...ot.contentType.layouts,edit:ur},Fr=Ge(ot.components,Ln);return{query:zt,layout:{...ot,contentType:{...ot.contentType,layouts:Sr},components:Fr}}},vn=i(97889),Un=i(3040),tr=i.n(Un),Nn=i(33003);const Vn={isLoading:!0,locales:[]},Ye=(0,vn.ZP)((ot=Vn,zt={})=>{switch(zt.type){case Nn.I4:{ot.isLoading=!1,ot.locales=zt.locales;break}case Nn.xz:{zt.newLocale.isDefault&&ot.locales.forEach(Ut=>{Ut.isDefault=!1}),ot.locales.push(zt.newLocale);break}case Nn.HC:{const Ut=ot.locales.filter(Ln=>Ln.id!==zt.id);tr()(ot,"locales",Ut);break}case Nn.OT:{zt.editedLocale.isDefault&&ot.locales.forEach(Ln=>{Ln.isDefault=!1});const Ut=ot.locales.findIndex(Ln=>Ln.id===zt.editedLocale.id);tr()(ot.locales,Ut,zt.editedLocale);break}default:return ot}return ot});var ne={[`${pt.Z}_locales`]:Ye},ge=i(99381),je=i.n(ge),He=i(86349),it=i.n(He),fn=()=>({getState:ot,dispatch:zt})=>Ut=>Ln=>{if(Ln.type!=="ContentManager/CrudReducer/INIT_FORM"||!Ln.rawQuery)return Ut(Ln);const Gn=Ln.rawQuery.substring(1),xn=(0,pe.parse)(Gn),ur=d()(xn,"plugins.i18n.relatedEntityId",null),Sr=d()(xn,"plugins.i18n.locale",null),Fr=Ln.isSingleType;if(!ur&&!Fr)return Ut(Ln);const ni=ot(),di=ni["content-manager_editViewCrudReducer"],Ar=ni["content-manager_editViewLayoutManager"],{contentTypeDataStructure:ai}=di,{currentLayout:Oi}=Ar;return(async()=>{zt({type:"ContentManager/CrudReducer/GET_DATA"});const _i=je()(ai);try{const{data:Wi}=await(0,l.tg)().post(`/${pt.Z}/content-manager/actions/get-non-localized-fields`,{model:Oi.contentType.uid,id:ur,locale:Sr}),{nonLocalizedFields:so,localizations:yo}=Wi,to=it()(_i,so),Xe=["createdBy","updatedBy","publishedAt","id","_id","updatedAt","createdAt"],De=(0,l.w6)(to,Oi.contentType,Oi.components,Xe);De.localizations=yo,Ln.data=(0,l.dU)(De,Oi.contentType,Oi.components)}catch{}return Ut(Ln)})()},Vt=()=>({getState:ot})=>zt=>Ut=>{const Ln=()=>{try{const Gn=ot();if(d()(Gn,["content-type-builder_dataManagerProvider","modifiedData","contentType","schema","pluginOptions","i18n","localized"],!1)){const ur=Ut.options?{...Ut.options.pluginOptions,i18n:{localized:!0}}:{i18n:{localized:!0}};return zt({...Ut,options:{pluginOptions:ur}})}return zt(Ut)}catch{return zt(Ut)}};return Ut.type==="ContentTypeBuilder/FormModal/SET_ATTRIBUTE_DATA_SCHEMA"&&Ut.forTarget==="contentType"&&!["relation","component"].includes(Ut.attributeType)&&!Ut.isEditing||Ut.type==="ContentTypeBuilder/FormModal/SET_CUSTOM_FIELD_DATA_SCHEMA"&&Ut.forTarget==="contentType"&&!Ut.isEditing||(Ut.type==="ContentTypeBuilder/FormModal/RESET_PROPS_AND_SET_FORM_FOR_ADDING_AN_EXISTING_COMPO"||Ut.type==="ContentTypeBuilder/FormModal/RESET_PROPS_AND_SAVE_CURRENT_DATA")&&Ut.forTarget==="contentType"?Ln():zt(Ut)},dn=()=>()=>ot=>zt=>{if(zt.type==="ContentTypeBuilder/FormModal/SET_DATA_TO_EDIT"&&zt.modalType==="contentType"){const Ut={localized:!1},Ln=zt.data.pluginOptions?{...zt.data.pluginOptions,i18n:Ut}:{i18n:Ut},Gn={...zt.data,pluginOptions:Ln};if(zt.actionType==="create")return ot({...zt,data:Gn});if(!zt.data.pluginOptions?.i18n?.localized)return ot({...zt,data:Gn})}return ot(zt)};const Jn=ot=>zt=>d()(zt,"properties.locales",[]).indexOf(ot)!==-1;var Ir=()=>()=>ot=>zt=>{if(zt.type!=="ContentManager/RBACManager/SET_PERMISSIONS")return ot(zt);const Ut=d()(zt,"__meta__.containerName",null);if(!["editView","listView"].includes(Ut))return ot(zt);const Ln=d()(zt,"__meta__.plugins.i18n.locale",null);if(!Ln)return ot(zt);const Gn=zt.permissions,xn=Object.keys(Gn).reduce((ur,Sr)=>{const ni=Gn[Sr].filter(Jn(Ln));return ni.length&&(ur[Sr]=ni),ur},{});return ot({...zt,permissions:xn})},yr=[fn,dn,Vt,Ir],Or=["biginteger","boolean","component","date","datetime","decimal","dynamiczone","email","enumeration","float","integer","json","media","number","password","richtext","string","text","time"],we=i(9086),ue=i.n(we);const Te=["pluginOptions","i18n","localized"],ze=ot=>Object.keys(ot).reduce((zt,Ut)=>{const Ln=ot[Ut];if(Or.includes(Ln.type)){const Gn={localized:!0},xn=Ln.pluginOptions?{...Ln.pluginOptions,i18n:Gn}:{i18n:Gn};return zt[Ut]={...Ln,pluginOptions:xn},zt}return zt[Ut]=Ln,zt},{}),ft=ot=>Object.keys(ot).reduce((zt,Ut)=>(zt[Ut]=ue()(ot[Ut],"pluginOptions.i18n"),zt),{});var ln=(ot,zt)=>{if(!G()(ot,Te))return ot;const Ut=d()(ot,Te,!1),Ln=d()(zt,["schema",...Te],!1);if(Ut&&Ln)return ot;if(Ut){const Gn=ze(ot.attributes);return{...ot,attributes:Gn}}if(!Ut){const Gn=ue()(ot.pluginOptions,"i18n"),xn=ft(ot.attributes);return{...ot,pluginOptions:Gn,attributes:xn}}return ot};const En=E.s1.u2;var jr={register(ot){ot.addMiddlewares(yr),ot.addReducers(ne),ot.registerPlugin({id:pt.Z,initializer:Re,isReady:!1,name:En})},bootstrap(ot){ot.registerHook("Admin/CM/pages/App/mutate-collection-types-links",zn),ot.registerHook("Admin/CM/pages/App/mutate-single-types-links",Zr),ot.registerHook("Admin/CM/pages/ListView/inject-column-in-table",Qt),ot.registerHook("Admin/CM/pages/EditView/mutate-edit-view-layout",Yt),ot.addSettingsLink("global",{intlLabel:{id:(0,N.O)("plugin.name"),defaultMessage:"Internationalization"},id:"internationalization",to:"/settings/internationalization",async Component(){return await i.e(3552).then(i.bind(i,72713))},permissions:Wn._.accessMain}),ot.injectContentManagerComponent("editView","informations",{name:"i18n-locale-filter-edit-view",Component:cn}),ot.injectContentManagerComponent("listView","actions",{name:"i18n-locale-filter",Component:rr}),ot.injectContentManagerComponent("listView","deleteModalAdditionalInfos",{name:"i18n-delete-bullets-in-modal",Component:rn}),ot.injectContentManagerComponent("listView","publishModalAdditionalInfos",{name:"i18n-publish-bullets-in-modal",Component:D}),ot.injectContentManagerComponent("listView","unpublishModalAdditionalInfos",{name:"i18n-unpublish-bullets-in-modal",Component:Oe});const zt=ot.getPlugin("content-type-builder");if(zt){const Ut=zt.apis.forms;Ut.addContentTypeSchemaMutation(ln),Ut.components.add({id:"checkboxConfirmation",component:z}),Ut.extendContentType({validator:()=>({i18n:g.Ry().shape({localized:g.Xg()})}),form:{advanced(){return[{name:"pluginOptions.i18n.localized",description:{id:(0,N.O)("plugin.schema.i18n.localized.description-content-type"),defaultMessage:"Allows translating an entry into different languages"},type:"checkboxConfirmation",intlLabel:{id:(0,N.O)("plugin.schema.i18n.localized.label-content-type"),defaultMessage:"Localization"}}]}}}),Ut.extendFields(Or,{validator:Ln=>({i18n:g.Ry().shape({localized:g.Xg().test({name:"ensure-unique-localization",message:(0,N.O)("plugin.schema.i18n.ensure-unique-localization"),test(Gn){return Gn===void 0||Gn?!0:!(d()(Ln,["3","modifiedData","unique"],null)&&!Gn)}})})}),form:{advanced({contentTypeSchema:Ln,forTarget:Gn,type:xn,step:ur}){return Gn!=="contentType"?[]:d()(Ln,["schema","pluginOptions","i18n","localized"],!1)?xn==="component"&&ur==="1"?[]:[{name:"pluginOptions.i18n.localized",description:{id:(0,N.O)("plugin.schema.i18n.localized.description-field"),defaultMessage:"The field can have different values in each locale"},type:"checkbox",intlLabel:{id:(0,N.O)("plugin.schema.i18n.localized.label-field"),defaultMessage:"Enable localization for this field"}}]:[]}}})}},async registerTrads({locales:ot}){const zt=await Promise.all(ot.map(Ut=>i(48736)(`./${Ut}.json`).then(({default:Ln})=>({data:(0,l.jV)(Ln,pt.Z),locale:Ut})).catch(()=>({data:{},locale:Ut}))));return Promise.resolve(zt)}}},64198:function(_,b,i){"use strict";var l=i(24834);const f=l.u2.replace(/^@strapi\/plugin-/i,"");b.Z=f},50006:function(_,b,i){"use strict";var l=i(64198);const f=d=>`${l.Z}.${d}`;b.Z=f},60677:function(_,b,i){"use strict";i.d(b,{O:function(){return l.Z}});var l=i(50006)},61215:function(_,b,i){"use strict";_.exports=i(98751).default},19108:function(_,b,i){"use strict";i.d(b,{_:function(){return l}});const l={accessRoles:[{action:"plugin::users-permissions.roles.create",subject:null},{action:"plugin::users-permissions.roles.read",subject:null}],createRole:[{action:"plugin::users-permissions.roles.create",subject:null}],deleteRole:[{action:"plugin::users-permissions.roles.delete",subject:null}],readRoles:[{action:"plugin::users-permissions.roles.read",subject:null}],updateRole:[{action:"plugin::users-permissions.roles.update",subject:null}],readAdvancedSettings:[{action:"plugin::users-permissions.advanced-settings.read",subject:null}],updateAdvancedSettings:[{action:"plugin::users-permissions.advanced-settings.update",subject:null}],readEmailTemplates:[{action:"plugin::users-permissions.email-templates.read",subject:null}],updateEmailTemplates:[{action:"plugin::users-permissions.email-templates.update",subject:null}],readProviders:[{action:"plugin::users-permissions.providers.read",subject:null}],updateProviders:[{action:"plugin::users-permissions.providers.update",subject:null}]}},62502:function(_,b,i){"use strict";var l=i(30126),f=i(46524),d=i(19108),g=i(48395);const E=f.s1.u2;b.default={register(m){m.createSettingSection({id:"users-permissions",intlLabel:{id:(0,g.Z)("Settings.section-label"),defaultMessage:"Users & Permissions plugin"}},[{intlLabel:{id:"global.roles",defaultMessage:"Roles"},id:"roles",to:"/settings/users-permissions/roles",async Component(){return await Promise.all([i.e(3911),i.e(8853)]).then(i.bind(i,34254))},permissions:d._.accessRoles},{intlLabel:{id:(0,g.Z)("HeaderNav.link.providers"),defaultMessage:"Providers"},id:"providers",to:"/settings/users-permissions/providers",async Component(){return await i.e(2282).then(i.bind(i,30866))},permissions:d._.readProviders},{intlLabel:{id:(0,g.Z)("HeaderNav.link.emailTemplates"),defaultMessage:"Email templates"},id:"email-templates",to:"/settings/users-permissions/email-templates",async Component(){return await i.e(8418).then(i.bind(i,61780))},permissions:d._.readEmailTemplates},{intlLabel:{id:(0,g.Z)("HeaderNav.link.advancedSettings"),defaultMessage:"Advanced Settings"},id:"advanced-settings",to:"/settings/users-permissions/advanced-settings",async Component(){return await i.e(9460).then(i.bind(i,63669))},permissions:d._.readAdvancedSettings}]),m.registerPlugin({id:"users-permissions",name:E})},bootstrap(){},async registerTrads({locales:m}){const C=await Promise.all(m.map(x=>i(35538)(`./${x}.json`).then(({default:P})=>({data:(0,l.jV)(P,"users-permissions"),locale:x})).catch(()=>({data:{},locale:x}))));return Promise.resolve(C)}}},48395:function(_,b,i){"use strict";i.d(b,{Z:function(){return E}});var l=i(46524),d=l.u2.replace(/^@strapi\/plugin-/i,""),E=m=>`${d}.${m}`},35901:function(_,b,i){"use strict";_.exports=i(62502).default},46729:function(_){"use strict";_.exports=b=>{if(typeof b!="string")throw new TypeError("Expected a string");return b.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},39507:function(_){"use strict";_.exports=function b(i,l){if(i===l)return!0;if(i&&l&&typeof i=="object"&&typeof l=="object"){if(i.constructor!==l.constructor)return!1;var f,d,g;if(Array.isArray(i)){if(f=i.length,f!=l.length)return!1;for(d=f;d--!==0;)if(!b(i[d],l[d]))return!1;return!0}if(i.constructor===RegExp)return i.source===l.source&&i.flags===l.flags;if(i.valueOf!==Object.prototype.valueOf)return i.valueOf()===l.valueOf();if(i.toString!==Object.prototype.toString)return i.toString()===l.toString();if(g=Object.keys(i),f=g.length,f!==Object.keys(l).length)return!1;for(d=f;d--!==0;)if(!Object.prototype.hasOwnProperty.call(l,g[d]))return!1;for(d=f;d--!==0;){var E=g[d];if(!b(i[E],l[E]))return!1}return!0}return i!==i&&l!==l}},92802:function(_,b,i){"use strict";i.d(b,{gN:function(){return yc},F2:function(){return Fu},l0:function(){return Zc},J9:function(){return Il},Hy:function(){return Ff},U$:function(){return vc},TA:function(){return Cf},u6:function(){return Wl}});var l=i(32735),f=i(8266),d=i.n(f),g=function(et){return E(et)&&!m(et)};function E(ce){return!!ce&&typeof ce=="object"}function m(ce){var et=Object.prototype.toString.call(ce);return et==="[object RegExp]"||et==="[object Date]"||P(ce)}var C=typeof Symbol=="function"&&Symbol.for,x=C?Symbol.for("react.element"):60103;function P(ce){return ce.$$typeof===x}function T(ce){return Array.isArray(ce)?[]:{}}function O(ce,et){return et.clone!==!1&&et.isMergeableObject(ce)?F(T(ce),ce,et):ce}function w(ce,et,Wt){return ce.concat(et).map(function(mn){return O(mn,Wt)})}function R(ce,et,Wt){var mn={};return Wt.isMergeableObject(ce)&&Object.keys(ce).forEach(function(gn){mn[gn]=O(ce[gn],Wt)}),Object.keys(et).forEach(function(gn){!Wt.isMergeableObject(et[gn])||!ce[gn]?mn[gn]=O(et[gn],Wt):mn[gn]=F(ce[gn],et[gn],Wt)}),mn}function F(ce,et,Wt){Wt=Wt||{},Wt.arrayMerge=Wt.arrayMerge||w,Wt.isMergeableObject=Wt.isMergeableObject||g;var mn=Array.isArray(et),gn=Array.isArray(ce),nr=mn===gn;return nr?mn?Wt.arrayMerge(ce,et,Wt):R(ce,et,Wt):O(et,Wt)}F.all=function(et,Wt){if(!Array.isArray(et))throw new Error("first argument should be an array");return et.reduce(function(mn,gn){return F(mn,gn,Wt)},{})};var V=F,L=V,$=typeof global=="object"&&global&&global.Object===Object&&global,U=$,N=typeof self=="object"&&self&&self.Object===Object&&self,k=U||N||Function("return this")(),j=k,z=j.Symbol,K=z,G=Object.prototype,Y=G.hasOwnProperty,ae=G.toString,Ce=K?K.toStringTag:void 0;function J(ce){var et=Y.call(ce,Ce),Wt=ce[Ce];try{ce[Ce]=void 0;var mn=!0}catch{}var gn=ae.call(ce);return mn&&(et?ce[Ce]=Wt:delete ce[Ce]),gn}var le=J,be=Object.prototype,te=be.toString;function q(ce){return te.call(ce)}var ee=q,Se="[object Null]",tt="[object Undefined]",Ae=K?K.toStringTag:void 0;function pe(ce){return ce==null?ce===void 0?tt:Se:Ae&&Ae in Object(ce)?le(ce):ee(ce)}var Pe=pe;function ye(ce,et){return function(Wt){return ce(et(Wt))}}var Ee=ye,_e=Ee(Object.getPrototypeOf,Object),We=_e;function Ie(ce){return ce!=null&&typeof ce=="object"}var Fe=Ie,ut="[object Object]",ht=Function.prototype,Ot=Object.prototype,Ue=ht.toString,at=Ot.hasOwnProperty,Pt=Ue.call(Object);function lt(ce){if(!Fe(ce)||Pe(ce)!=ut)return!1;var et=We(ce);if(et===null)return!0;var Wt=at.call(et,"constructor")&&et.constructor;return typeof Wt=="function"&&Wt instanceof Wt&&Ue.call(Wt)==Pt}var kt=lt;function nn(){this.__data__=[],this.size=0}var hn=nn;function Rn(ce,et){return ce===et||ce!==ce&&et!==et}var kn=Rn;function $t(ce,et){for(var Wt=ce.length;Wt--;)if(kn(ce[Wt][0],et))return Wt;return-1}var yn=$t,Yn=Array.prototype,cn=Yn.splice;function st(ce){var et=this.__data__,Wt=yn(et,ce);if(Wt<0)return!1;var mn=et.length-1;return Wt==mn?et.pop():cn.call(et,Wt,1),--this.size,!0}var on=st;function dt(ce){var et=this.__data__,Wt=yn(et,ce);return Wt<0?void 0:et[Wt][1]}var Dt=dt;function Ht(ce){return yn(this.__data__,ce)>-1}var rn=Ht;function ke(ce,et){var Wt=this.__data__,mn=yn(Wt,ce);return mn<0?(++this.size,Wt.push([ce,et])):Wt[mn][1]=et,this}var ct=ke;function D(ce){var et=-1,Wt=ce==null?0:ce.length;for(this.clear();++et<Wt;){var mn=ce[et];this.set(mn[0],mn[1])}}D.prototype.clear=hn,D.prototype.delete=on,D.prototype.get=Dt,D.prototype.has=rn,D.prototype.set=ct;var W=D;function re(){this.__data__=new W,this.size=0}var Oe=re;function Ze(ce){var et=this.__data__,Wt=et.delete(ce);return this.size=et.size,Wt}var pt=Ze;function $e(ce){return this.__data__.get(ce)}var Re=$e;function Be(ce){return this.__data__.has(ce)}var Ne=Be;function bt(ce){var et=typeof ce;return ce!=null&&(et=="object"||et=="function")}var Kt=bt,an="[object AsyncFunction]",In="[object Function]",rr="[object GeneratorFunction]",Wn="[object Proxy]";function gr(ce){if(!Kt(ce))return!1;var et=Pe(ce);return et==In||et==rr||et==an||et==Wn}var fr=gr,Rr=j["__core-js_shared__"],Vr=Rr,ei=function(){var ce=/[^.]+$/.exec(Vr&&Vr.keys&&Vr.keys.IE_PROTO||"");return ce?"Symbol(src)_1."+ce:""}();function Ct(ce){return!!ei&&ei in ce}var St=Ct,Pn=Function.prototype,Qt=Pn.toString;function qn(ce){if(ce!=null){try{return Qt.call(ce)}catch{}try{return ce+""}catch{}}return""}var Tt=qn,fe=/[\\^$.*+?()[\]{}|]/g,ve=/^\[object .+?Constructor\]$/,Qe=Function.prototype,jt=Object.prototype,bn=Qe.toString,zn=jt.hasOwnProperty,Cr=RegExp("^"+bn.call(zn).replace(fe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zr(ce){if(!Kt(ce)||St(ce))return!1;var et=fr(ce)?Cr:ve;return et.test(Tt(ce))}var Jr=Zr;function _r(ce,et){return ce?.[et]}var Xn=_r;function mt(ce,et){var Wt=Xn(ce,et);return Jr(Wt)?Wt:void 0}var Ke=mt,Mt=Ke(j,"Map"),tn=Mt,Fn=Ke(Object,"create"),Cn=Fn;function Bn(){this.__data__=Cn?Cn(null):{},this.size=0}var Ge=Bn;function At(ce){var et=this.has(ce)&&delete this.__data__[ce];return this.size-=et?1:0,et}var Bt=At,Zt="__lodash_hash_undefined__",Yt=Object.prototype,vn=Yt.hasOwnProperty;function Un(ce){var et=this.__data__;if(Cn){var Wt=et[ce];return Wt===Zt?void 0:Wt}return vn.call(et,ce)?et[ce]:void 0}var tr=Un,Nn=Object.prototype,Vn=Nn.hasOwnProperty;function Ye(ce){var et=this.__data__;return Cn?et[ce]!==void 0:Vn.call(et,ce)}var de=Ye,ne="__lodash_hash_undefined__";function ge(ce,et){var Wt=this.__data__;return this.size+=this.has(ce)?0:1,Wt[ce]=Cn&&et===void 0?ne:et,this}var je=ge;function He(ce){var et=-1,Wt=ce==null?0:ce.length;for(this.clear();++et<Wt;){var mn=ce[et];this.set(mn[0],mn[1])}}He.prototype.clear=Ge,He.prototype.delete=Bt,He.prototype.get=tr,He.prototype.has=de,He.prototype.set=je;var it=He;function Rt(){this.size=0,this.__data__={hash:new it,map:new(tn||W),string:new it}}var fn=Rt;function qt(ce){var et=typeof ce;return et=="string"||et=="number"||et=="symbol"||et=="boolean"?ce!=="__proto__":ce===null}var Vt=qt;function Jt(ce,et){var Wt=ce.__data__;return Vt(et)?Wt[typeof et=="string"?"string":"hash"]:Wt.map}var dn=Jt;function Jn(ce){var et=dn(this,ce).delete(ce);return this.size-=et?1:0,et}var Hn=Jn;function Ir(ce){return dn(this,ce).get(ce)}var vr=Ir;function yr(ce){return dn(this,ce).has(ce)}var Er=yr;function Or(ce,et){var Wt=dn(this,ce),mn=Wt.size;return Wt.set(ce,et),this.size+=Wt.size==mn?0:1,this}var we=Or;function ue(ce){var et=-1,Wt=ce==null?0:ce.length;for(this.clear();++et<Wt;){var mn=ce[et];this.set(mn[0],mn[1])}}ue.prototype.clear=fn,ue.prototype.delete=Hn,ue.prototype.get=vr,ue.prototype.has=Er,ue.prototype.set=we;var Te=ue,ze=200;function ft(ce,et){var Wt=this.__data__;if(Wt instanceof W){var mn=Wt.__data__;if(!tn||mn.length<ze-1)return mn.push([ce,et]),this.size=++Wt.size,this;Wt=this.__data__=new Te(mn)}return Wt.set(ce,et),this.size=Wt.size,this}var yt=ft;function ln(ce){var et=this.__data__=new W(ce);this.size=et.size}ln.prototype.clear=Oe,ln.prototype.delete=pt,ln.prototype.get=Re,ln.prototype.has=Ne,ln.prototype.set=yt;var En=ln;function jr(ce,et){for(var Wt=-1,mn=ce==null?0:ce.length;++Wt<mn&&et(ce[Wt],Wt,ce)!==!1;);return ce}var ot=jr,zt=function(){try{var ce=Ke(Object,"defineProperty");return ce({},"",{}),ce}catch{}}(),Ut=zt;function Ln(ce,et,Wt){et=="__proto__"&&Ut?Ut(ce,et,{configurable:!0,enumerable:!0,value:Wt,writable:!0}):ce[et]=Wt}var Gn=Ln,xn=Object.prototype,ur=xn.hasOwnProperty;function Sr(ce,et,Wt){var mn=ce[et];(!(ur.call(ce,et)&&kn(mn,Wt))||Wt===void 0&&!(et in ce))&&Gn(ce,et,Wt)}var Fr=Sr;function ni(ce,et,Wt,mn){var gn=!Wt;Wt||(Wt={});for(var nr=-1,dr=et.length;++nr<dr;){var ri=et[nr],Ki=mn?mn(Wt[ri],ce[ri],ri,Wt,ce):void 0;Ki===void 0&&(Ki=ce[ri]),gn?Gn(Wt,ri,Ki):Fr(Wt,ri,Ki)}return Wt}var di=ni;function Ar(ce,et){for(var Wt=-1,mn=Array(ce);++Wt<ce;)mn[Wt]=et(Wt);return mn}var ai=Ar,Oi="[object Arguments]";function $r(ce){return Fe(ce)&&Pe(ce)==Oi}var _i=$r,Wi=Object.prototype,so=Wi.hasOwnProperty,yo=Wi.propertyIsEnumerable,to=_i(function(){return arguments}())?_i:function(ce){return Fe(ce)&&so.call(ce,"callee")&&!yo.call(ce,"callee")},Xe=to,De=Array.isArray,_t=De;function Et(){return!1}var Xt=Et,Sn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,On=Sn&&typeof module=="object"&&module&&!module.nodeType&&module,jn=On&&On.exports===Sn,cr=jn?j.Buffer:void 0,ii=cr?cr.isBuffer:void 0,li=ii||Xt,Yr=li,oi=9007199254740991,qr=/^(?:0|[1-9]\d*)$/;function gi(ce,et){var Wt=typeof ce;return et=et??oi,!!et&&(Wt=="number"||Wt!="symbol"&&qr.test(ce))&&ce>-1&&ce%1==0&&ce<et}var Qi=gi,zi=9007199254740991;function Li(ce){return typeof ce=="number"&&ce>-1&&ce%1==0&&ce<=zi}var ui=Li,Vi="[object Arguments]",Bi="[object Array]",ho="[object Boolean]",Hi="[object Date]",Eo="[object Error]",hi="[object Function]",wo="[object Map]",Uo="[object Number]",ie="[object Object]",B="[object RegExp]",he="[object Set]",xe="[object String]",rt="[object WeakMap]",Lt="[object ArrayBuffer]",en="[object DataView]",An="[object Float32Array]",_n="[object Float64Array]",Mr="[object Int8Array]",Ur="[object Int16Array]",Pr="[object Int32Array]",Kr="[object Uint8Array]",Qr="[object Uint8ClampedArray]",Wr="[object Uint16Array]",ci="[object Uint32Array]",pr={};pr[An]=pr[_n]=pr[Mr]=pr[Ur]=pr[Pr]=pr[Kr]=pr[Qr]=pr[Wr]=pr[ci]=!0,pr[Vi]=pr[Bi]=pr[Lt]=pr[ho]=pr[en]=pr[Hi]=pr[Eo]=pr[hi]=pr[wo]=pr[Uo]=pr[ie]=pr[B]=pr[he]=pr[xe]=pr[rt]=!1;function Xr(ce){return Fe(ce)&&ui(ce.length)&&!!pr[Pe(ce)]}var Br=Xr;function Mn(ce){return function(et){return ce(et)}}var qi=Mn,Po=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mo=Po&&typeof module=="object"&&module&&!module.nodeType&&module,Ko=mo&&mo.exports===Po,Co=Ko&&U.process,No=function(){try{var ce=mo&&mo.require&&mo.require("util").types;return ce||Co&&Co.binding&&Co.binding("util")}catch{}}(),Ao=No,vt=Ao&&Ao.isTypedArray,la=vt?qi(vt):Br,Es=la,Qn=Object.prototype,ms=Qn.hasOwnProperty;function ua(ce,et){var Wt=_t(ce),mn=!Wt&&Xe(ce),gn=!Wt&&!mn&&Yr(ce),nr=!Wt&&!mn&&!gn&&Es(ce),dr=Wt||mn||gn||nr,ri=dr?ai(ce.length,String):[],Ki=ri.length;for(var $i in ce)(et||ms.call(ce,$i))&&!(dr&&($i=="length"||gn&&($i=="offset"||$i=="parent")||nr&&($i=="buffer"||$i=="byteLength"||$i=="byteOffset")||Qi($i,Ki)))&&ri.push($i);return ri}var co=ua,Zs=Object.prototype;function ya(ce){var et=ce&&ce.constructor,Wt=typeof et=="function"&&et.prototype||Zs;return ce===Wt}var qe=ya,Oa=Ee(Object.keys,Object),ul=Oa,Mo=Object.prototype,bs=Mo.hasOwnProperty;function ca(ce){if(!qe(ce))return ul(ce);var et=[];for(var Wt in Object(ce))bs.call(ce,Wt)&&Wt!="constructor"&&et.push(Wt);return et}var El=ca;function Ds(ce){return ce!=null&&ui(ce.length)&&!fr(ce)}var Zi=Ds;function Xo(ce){return Zi(ce)?co(ce):El(ce)}var po=Xo;function go(ce,et){return ce&&di(et,po(et),ce)}var Fo=go;function xs(ce){var et=[];if(ce!=null)for(var Wt in Object(ce))et.push(Wt);return et}var fa=xs,$a=Object.prototype,us=$a.hasOwnProperty;function bl(ce){if(!Kt(ce))return fa(ce);var et=qe(ce),Wt=[];for(var mn in ce)mn=="constructor"&&(et||!us.call(ce,mn))||Wt.push(mn);return Wt}var Go=bl;function xt(ce){return Zi(ce)?co(ce,!0):Go(ce)}var Tn=xt;function $n(ce,et){return ce&&di(et,Tn(et),ce)}var lr=$n,br=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gr=br&&typeof module=="object"&&module&&!module.nodeType&&module,vi=Gr&&Gr.exports===br,xi=vi?j.Buffer:void 0,Ti=xi?xi.allocUnsafe:void 0;function bi(ce,et){if(et)return ce.slice();var Wt=ce.length,mn=Ti?Ti(Wt):new ce.constructor(Wt);return ce.copy(mn),mn}var wi=bi;function fi(ce,et){var Wt=-1,mn=ce.length;for(et||(et=Array(mn));++Wt<mn;)et[Wt]=ce[Wt];return et}var ji=fi;function lo(ce,et){for(var Wt=-1,mn=ce==null?0:ce.length,gn=0,nr=[];++Wt<mn;){var dr=ce[Wt];et(dr,Wt,ce)&&(nr[gn++]=dr)}return nr}var uo=lo;function xr(){return[]}var So=xr,Do=Object.prototype,bo=Do.propertyIsEnumerable,no=Object.getOwnPropertySymbols,Yo=no?function(ce){return ce==null?[]:(ce=Object(ce),uo(no(ce),function(et){return bo.call(ce,et)}))}:So,as=Yo;function Ks(ce,et){return di(ce,as(ce),et)}var qo=Ks;function Gs(ce,et){for(var Wt=-1,mn=et.length,gn=ce.length;++Wt<mn;)ce[gn+Wt]=et[Wt];return ce}var Ys=Gs,Ea=Object.getOwnPropertySymbols,Na=Ea?function(ce){for(var et=[];ce;)Ys(et,as(ce)),ce=We(ce);return et}:So,Ta=Na;function Ms(ce,et){return di(ce,Ta(ce),et)}var Fl=Ms;function wa(ce,et,Wt){var mn=et(ce);return _t(ce)?mn:Ys(mn,Wt(ce))}var Bl=wa;function ba(ce){return Bl(ce,po,as)}var Ro=ba;function Lr(ce){return Bl(ce,Tn,Ta)}var es=Lr,Ws=Ke(j,"DataView"),ta=Ws,Ja=Ke(j,"Promise"),kl=Ja,ou=Ke(j,"Set"),gs=ou,Is=Ke(j,"WeakMap"),cl=Is,_s="[object Map]",Fa="[object Object]",Ss="[object Promise]",fl="[object Set]",Gl="[object WeakMap]",Xu="[object DataView]",qu=Tt(ta),Xa=Tt(tn),xl=Tt(kl),Yl=Tt(gs),Da=Tt(cl),Cl=Pe;(ta&&Cl(new ta(new ArrayBuffer(1)))!=Xu||tn&&Cl(new tn)!=_s||kl&&Cl(kl.resolve())!=Ss||gs&&Cl(new gs)!=fl||cl&&Cl(new cl)!=Gl)&&(Cl=function(ce){var et=Pe(ce),Wt=et==Fa?ce.constructor:void 0,mn=Wt?Tt(Wt):"";if(mn)switch(mn){case qu:return Xu;case Xa:return _s;case xl:return Ss;case Yl:return fl;case Da:return Gl}return et});var Ls=Cl,Ba=Object.prototype,ds=Ba.hasOwnProperty;function Bo(ce){var et=ce.length,Wt=new ce.constructor(et);return et&&typeof ce[0]=="string"&&ds.call(ce,"index")&&(Wt.index=ce.index,Wt.input=ce.input),Wt}var Wo=Bo,$s=j.Uint8Array,da=$s;function Ml(ce){var et=new ce.constructor(ce.byteLength);return new da(et).set(new da(ce)),et}var qa=Ml;function na(ce,et){var Wt=et?qa(ce.buffer):ce.buffer;return new ce.constructor(Wt,ce.byteOffset,ce.byteLength)}var su=na,Sl=/\w*$/;function Ps(ce){var et=new ce.constructor(ce.source,Sl.exec(ce));return et.lastIndex=ce.lastIndex,et}var au=Ps,ts=K?K.prototype:void 0,el=ts?ts.valueOf:void 0;function Ql(ce){return el?Object(el.call(ce)):{}}var lu=Ql;function wc(ce,et){var Wt=et?qa(ce.buffer):ce.buffer;return new ce.constructor(Wt,ce.byteOffset,ce.length)}var of=wc,dl="[object Boolean]",Os="[object Date]",uu="[object Map]",ec="[object Number]",Ol="[object RegExp]",_o="[object Set]",ka="[object String]",Tl="[object Symbol]",tl="[object ArrayBuffer]",nl="[object DataView]",Pa="[object Float32Array]",Dc="[object Float64Array]",Tu="[object Int8Array]",Pc="[object Int16Array]",ha="[object Int32Array]",xa="[object Uint8Array]",hs="[object Uint8ClampedArray]",hl="[object Uint16Array]",sf="[object Uint32Array]";function Ac(ce,et,Wt){var mn=ce.constructor;switch(et){case tl:return qa(ce);case dl:case Os:return new mn(+ce);case nl:return su(ce,Wt);case Pa:case Dc:case Tu:case Pc:case ha:case xa:case hs:case hl:case sf:return of(ce,Wt);case uu:return new mn;case ec:case ka:return new mn(ce);case Ol:return au(ce);case _o:return new mn;case Tl:return lu(ce)}}var Rc=Ac,wu=Object.create,Ic=function(){function ce(){}return function(et){if(!Kt(et))return{};if(wu)return wu(et);ce.prototype=et;var Wt=new ce;return ce.prototype=void 0,Wt}}(),_c=Ic;function Qf(ce){return typeof ce.constructor=="function"&&!qe(ce)?_c(We(ce)):{}}var cu=Qf,af="[object Map]";function Jf(ce){return Fe(ce)&&Ls(ce)==af}var ja=Jf,Du=Ao&&Ao.isMap,Pu=Du?qi(Du):ja,jl=Pu,pa="[object Set]";function Au(ce){return Fe(ce)&&Ls(ce)==pa}var Ru=Au,tc=Ao&&Ao.isSet,fu=tc?qi(tc):Ru,Ua=fu,Jl=1,lf=2,Lc=4,rl="[object Arguments]",wl="[object Array]",$c="[object Boolean]",Nc="[object Date]",il="[object Error]",Aa="[object Function]",Fc="[object GeneratorFunction]",Xf="[object Map]",nc="[object Number]",rc="[object Object]",Bc="[object RegExp]",As="[object Set]",Iu="[object String]",uf="[object Symbol]",_f="[object WeakMap]",cf="[object ArrayBuffer]",ff="[object DataView]",du="[object Float32Array]",hu="[object Float64Array]",kc="[object Int8Array]",df="[object Int16Array]",ic="[object Int32Array]",hf="[object Uint8Array]",pu="[object Uint8ClampedArray]",pl="[object Uint16Array]",Xl="[object Uint32Array]",Vo={};Vo[rl]=Vo[wl]=Vo[cf]=Vo[ff]=Vo[$c]=Vo[Nc]=Vo[du]=Vo[hu]=Vo[kc]=Vo[df]=Vo[ic]=Vo[Xf]=Vo[nc]=Vo[rc]=Vo[Bc]=Vo[As]=Vo[Iu]=Vo[uf]=Vo[hf]=Vo[pu]=Vo[pl]=Vo[Xl]=!0,Vo[il]=Vo[Aa]=Vo[_f]=!1;function Dl(ce,et,Wt,mn,gn,nr){var dr,ri=et&Jl,Ki=et&lf,$i=et&Lc;if(Wt&&(dr=gn?Wt(ce,mn,gn,nr):Wt(ce)),dr!==void 0)return dr;if(!Kt(ce))return ce;var Lo=_t(ce);if(Lo){if(dr=Wo(ce),!ri)return ji(ce,dr)}else{var xo=Ls(ce),hr=xo==Aa||xo==Fc;if(Yr(ce))return wi(ce,ri);if(xo==rc||xo==rl||hr&&!gn){if(dr=Ki||hr?{}:cu(ce),!ri)return Ki?Fl(ce,lr(dr,ce)):qo(ce,Fo(dr,ce))}else{if(!Vo[xo])return gn?ce:{};dr=Rc(ce,xo,ri)}}nr||(nr=new En);var ns=nr.get(ce);if(ns)return ns;nr.set(ce,dr),Ua(ce)?ce.forEach(function(ws){dr.add(Dl(ws,et,Wt,ws,ce,nr))}):jl(ce)&&ce.forEach(function(ws,is){dr.set(is,Dl(ws,et,Wt,is,ce,nr))});var ra=$i?Ki?es:Ro:Ki?Tn:po,ga=Lo?void 0:ra(ce);return ot(ga||ce,function(ws,is){ga&&(is=ws,ws=ce[is]),Fr(dr,is,Dl(ws,et,Wt,is,ce,nr))}),dr}var oc=Dl,sc=4;function pf(ce){return oc(ce,sc)}var ql=pf;function vs(ce,et){for(var Wt=-1,mn=ce==null?0:ce.length,gn=Array(mn);++Wt<mn;)gn[Wt]=et(ce[Wt],Wt,ce);return gn}var mu=vs,ac="[object Symbol]";function jc(ce){return typeof ce=="symbol"||Fe(ce)&&Pe(ce)==ac}var Wa=jc,rs="Expected a function";function za(ce,et){if(typeof ce!="function"||et!=null&&typeof et!="function")throw new TypeError(rs);var Wt=function(){var mn=arguments,gn=et?et.apply(this,mn):mn[0],nr=Wt.cache;if(nr.has(gn))return nr.get(gn);var dr=ce.apply(this,mn);return Wt.cache=nr.set(gn,dr)||nr,dr};return Wt.cache=new(za.Cache||Te),Wt}za.Cache=Te;var Oo=za,Ts=500;function Ho(ce){var et=Oo(ce,function(mn){return Wt.size===Ts&&Wt.clear(),mn}),Wt=et.cache;return et}var Ns=Ho,gu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eu=/\\(\\)?/g,qf=Ns(function(ce){var et=[];return ce.charCodeAt(0)===46&&et.push(""),ce.replace(gu,function(Wt,mn,gn,nr){et.push(gn?nr.replace(eu,"$1"):mn||Wt)}),et}),Fs=qf,Uc=1/0;function mf(ce){if(typeof ce=="string"||Wa(ce))return ce;var et=ce+"";return et=="0"&&1/ce==-Uc?"-0":et}var lc=mf,ml=1/0,Ca=K?K.prototype:void 0,_u=Ca?Ca.toString:void 0;function uc(ce){if(typeof ce=="string")return ce;if(_t(ce))return mu(ce,uc)+"";if(Wa(ce))return _u?_u.call(ce):"";var et=ce+"";return et=="0"&&1/ce==-ml?"-0":et}var vu=uc;function gf(ce){return ce==null?"":vu(ce)}var yu=gf;function cc(ce){return _t(ce)?mu(ce,lc):Wa(ce)?[ce]:ji(Fs(yu(ce)))}var vf=cc,yf=!0;function Lf(ce,et){if(!yf){if(ce)return;var Wt="Warning: "+et;typeof console<"u"&&console.warn(Wt);try{throw Error(Wt)}catch{}}}var Pl=Lf,Lu=i(86058),tu=i.n(Lu),Wc=1,fc=4;function dc(ce){return oc(ce,Wc|fc)}var Ef=dc;function zo(){return zo=Object.assign||function(ce){for(var et=1;et<arguments.length;et++){var Wt=arguments[et];for(var mn in Wt)Object.prototype.hasOwnProperty.call(Wt,mn)&&(ce[mn]=Wt[mn])}return ce},zo.apply(this,arguments)}function $f(ce,et){ce.prototype=Object.create(et.prototype),ce.prototype.constructor=ce,ce.__proto__=et}function Al(ce,et){if(ce==null)return{};var Wt={},mn=Object.keys(ce),gn,nr;for(nr=0;nr<mn.length;nr++)gn=mn[nr],!(et.indexOf(gn)>=0)&&(Wt[gn]=ce[gn]);return Wt}function zc(ce){if(ce===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ce}var bf=function(et){return Array.isArray(et)&&et.length===0},Qs=function(et){return typeof et=="function"},Ul=function(et){return et!==null&&typeof et=="object"},Nf=function(et){return String(Math.floor(Number(et)))===et},$u=function(et){return Object.prototype.toString.call(et)==="[object String]"},fd=function(et){return et!==et},Vc=function(et){return l.Children.count(et)===0},xf=function(et){return Ul(et)&&Qs(et.then)},Di=function(et){return et&&Ul(et)&&Ul(et.target)};function dd(ce){if(ce=ce||(typeof document<"u"?document:void 0),typeof ce>"u")return null;try{return ce.activeElement||ce.body}catch{return ce.body}}function cs(ce,et,Wt,mn){mn===void 0&&(mn=0);for(var gn=vf(et);ce&&mn<gn.length;)ce=ce[gn[mn++]];return mn!==gn.length&&!ce||ce===void 0?Wt:ce}function Ra(ce,et,Wt){for(var mn=ql(ce),gn=mn,nr=0,dr=vf(et);nr<dr.length-1;nr++){var ri=dr[nr],Ki=cs(ce,dr.slice(0,nr+1));if(Ki&&(Ul(Ki)||Array.isArray(Ki)))gn=gn[ri]=ql(Ki);else{var $i=dr[nr+1];gn=gn[ri]=Nf($i)&&Number($i)>=0?[]:{}}}return(nr===0?ce:gn)[dr[nr]]===Wt?ce:(Wt===void 0?delete gn[dr[nr]]:gn[dr[nr]]=Wt,nr===0&&Wt===void 0&&delete mn[dr[nr]],mn)}function hc(ce,et,Wt,mn){Wt===void 0&&(Wt=new WeakMap),mn===void 0&&(mn={});for(var gn=0,nr=Object.keys(ce);gn<nr.length;gn++){var dr=nr[gn],ri=ce[dr];Ul(ri)?Wt.get(ri)||(Wt.set(ri,!0),mn[dr]=Array.isArray(ri)?[]:{},hc(ri,et,Wt,mn[dr])):mn[dr]=et}return mn}var pc=(0,l.createContext)(void 0);pc.displayName="FormikContext";var Ff=pc.Provider,Hc=pc.Consumer;function Wl(){var ce=(0,l.useContext)(pc);return ce||Pl(!1),ce}function Eu(ce,et){switch(et.type){case"SET_VALUES":return zo({},ce,{values:et.payload});case"SET_TOUCHED":return zo({},ce,{touched:et.payload});case"SET_ERRORS":return d()(ce.errors,et.payload)?ce:zo({},ce,{errors:et.payload});case"SET_STATUS":return zo({},ce,{status:et.payload});case"SET_ISSUBMITTING":return zo({},ce,{isSubmitting:et.payload});case"SET_ISVALIDATING":return zo({},ce,{isValidating:et.payload});case"SET_FIELD_VALUE":return zo({},ce,{values:Ra(ce.values,et.payload.field,et.payload.value)});case"SET_FIELD_TOUCHED":return zo({},ce,{touched:Ra(ce.touched,et.payload.field,et.payload.value)});case"SET_FIELD_ERROR":return zo({},ce,{errors:Ra(ce.errors,et.payload.field,et.payload.value)});case"RESET_FORM":return zo({},ce,et.payload);case"SET_FORMIK_STATE":return et.payload(ce);case"SUBMIT_ATTEMPT":return zo({},ce,{touched:hc(ce.values,!0),isSubmitting:!0,submitCount:ce.submitCount+1});case"SUBMIT_FAILURE":return zo({},ce,{isSubmitting:!1});case"SUBMIT_SUCCESS":return zo({},ce,{isSubmitting:!1});default:return ce}}var Rl={},mc={};function Cf(ce){var et=ce.validateOnChange,Wt=et===void 0?!0:et,mn=ce.validateOnBlur,gn=mn===void 0?!0:mn,nr=ce.validateOnMount,dr=nr===void 0?!1:nr,ri=ce.isInitialValid,Ki=ce.enableReinitialize,$i=Ki===void 0?!1:Ki,Lo=ce.onSubmit,xo=Al(ce,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),hr=zo({validateOnChange:Wt,validateOnBlur:gn,validateOnMount:dr,onSubmit:Lo},xo),ns=(0,l.useRef)(hr.initialValues),ra=(0,l.useRef)(hr.initialErrors||Rl),ga=(0,l.useRef)(hr.initialTouched||mc),ws=(0,l.useRef)(hr.initialStatus),is=(0,l.useRef)(!1),Ia=(0,l.useRef)({});(0,l.useEffect)(function(){return is.current=!0,function(){is.current=!1}},[]);var bu=(0,l.useReducer)(Eu,{values:hr.initialValues,errors:hr.initialErrors||Rl,touched:hr.initialTouched||mc,status:hr.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),Qo=bu[0],Jo=bu[1],Df=(0,l.useCallback)(function(sr,pi){return new Promise(function(Mi,Gi){var ao=hr.validate(sr,pi);ao==null?Mi(Rl):xf(ao)?ao.then(function(Io){Mi(Io||Rl)},function(Io){Gi(Io)}):Mi(ao)})},[hr.validate]),bc=(0,l.useCallback)(function(sr,pi){var Mi=Bf(hr.validationSchema),Gi=pi&&Mi.validateAt?Mi.validateAt(pi,sr):gc(sr,Mi);return new Promise(function(ao,Io){Gi.then(function(){ao(Rl)},function(os){os.name==="ValidationError"?ao(Mf(os)):Io(os)})})},[hr.validationSchema]),Yc=(0,l.useCallback)(function(sr,pi){return new Promise(function(Mi){return Mi(Ia.current[sr].validate(pi))})},[]),Xs=(0,l.useCallback)(function(sr){var pi=Object.keys(Ia.current).filter(function(Gi){return Qs(Ia.current[Gi].validate)}),Mi=pi.length>0?pi.map(function(Gi){return Yc(Gi,cs(sr,Gi))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(Mi).then(function(Gi){return Gi.reduce(function(ao,Io,os){return Io==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||Io&&(ao=Ra(ao,pi[os],Io)),ao},{})})},[Yc]),_l=(0,l.useCallback)(function(sr){return Promise.all([Xs(sr),hr.validationSchema?bc(sr):{},hr.validate?Df(sr):{}]).then(function(pi){var Mi=pi[0],Gi=pi[1],ao=pi[2],Io=L.all([Mi,Gi,ao],{arrayMerge:ma});return Io})},[hr.validate,hr.validationSchema,Xs,Df,bc]),qs=Va(function(sr){return sr===void 0&&(sr=Qo.values),Jo({type:"SET_ISVALIDATING",payload:!0}),_l(sr).then(function(pi){return is.current&&(Jo({type:"SET_ISVALIDATING",payload:!1}),Jo({type:"SET_ERRORS",payload:pi})),pi})});(0,l.useEffect)(function(){dr&&is.current===!0&&d()(ns.current,hr.initialValues)&&qs(ns.current)},[dr,qs]);var Bu=(0,l.useCallback)(function(sr){var pi=sr&&sr.values?sr.values:ns.current,Mi=sr&&sr.errors?sr.errors:ra.current?ra.current:hr.initialErrors||{},Gi=sr&&sr.touched?sr.touched:ga.current?ga.current:hr.initialTouched||{},ao=sr&&sr.status?sr.status:ws.current?ws.current:hr.initialStatus;ns.current=pi,ra.current=Mi,ga.current=Gi,ws.current=ao;var Io=function(){Jo({type:"RESET_FORM",payload:{isSubmitting:!!sr&&!!sr.isSubmitting,errors:Mi,touched:Gi,status:ao,values:pi,isValidating:!!sr&&!!sr.isValidating,submitCount:sr&&sr.submitCount&&typeof sr.submitCount=="number"?sr.submitCount:0}})};if(hr.onReset){var os=hr.onReset(Qo.values,Wu);xf(os)?os.then(Io):Io()}else Io()},[hr.initialErrors,hr.initialStatus,hr.initialTouched]);(0,l.useEffect)(function(){is.current===!0&&!d()(ns.current,hr.initialValues)&&$i&&(ns.current=hr.initialValues,Bu(),dr&&qs(ns.current))},[$i,hr.initialValues,Bu,dr,qs]),(0,l.useEffect)(function(){$i&&is.current===!0&&!d()(ra.current,hr.initialErrors)&&(ra.current=hr.initialErrors||Rl,Jo({type:"SET_ERRORS",payload:hr.initialErrors||Rl}))},[$i,hr.initialErrors]),(0,l.useEffect)(function(){$i&&is.current===!0&&!d()(ga.current,hr.initialTouched)&&(ga.current=hr.initialTouched||mc,Jo({type:"SET_TOUCHED",payload:hr.initialTouched||mc}))},[$i,hr.initialTouched]),(0,l.useEffect)(function(){$i&&is.current===!0&&!d()(ws.current,hr.initialStatus)&&(ws.current=hr.initialStatus,Jo({type:"SET_STATUS",payload:hr.initialStatus}))},[$i,hr.initialStatus,hr.initialTouched]);var Pf=Va(function(sr){if(Ia.current[sr]&&Qs(Ia.current[sr].validate)){var pi=cs(Qo.values,sr),Mi=Ia.current[sr].validate(pi);return xf(Mi)?(Jo({type:"SET_ISVALIDATING",payload:!0}),Mi.then(function(Gi){return Gi}).then(function(Gi){Jo({type:"SET_FIELD_ERROR",payload:{field:sr,value:Gi}}),Jo({type:"SET_ISVALIDATING",payload:!1})})):(Jo({type:"SET_FIELD_ERROR",payload:{field:sr,value:Mi}}),Promise.resolve(Mi))}else if(hr.validationSchema)return Jo({type:"SET_ISVALIDATING",payload:!0}),bc(Qo.values,sr).then(function(Gi){return Gi}).then(function(Gi){Jo({type:"SET_FIELD_ERROR",payload:{field:sr,value:cs(Gi,sr)}}),Jo({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),Ha=(0,l.useCallback)(function(sr,pi){var Mi=pi.validate;Ia.current[sr]={validate:Mi}},[]),Af=(0,l.useCallback)(function(sr){delete Ia.current[sr]},[]),Ll=Va(function(sr,pi){Jo({type:"SET_TOUCHED",payload:sr});var Mi=pi===void 0?gn:pi;return Mi?qs(Qo.values):Promise.resolve()}),zf=(0,l.useCallback)(function(sr){Jo({type:"SET_ERRORS",payload:sr})},[]),ku=Va(function(sr,pi){var Mi=Qs(sr)?sr(Qo.values):sr;Jo({type:"SET_VALUES",payload:Mi});var Gi=pi===void 0?Wt:pi;return Gi?qs(Mi):Promise.resolve()}),ju=(0,l.useCallback)(function(sr,pi){Jo({type:"SET_FIELD_ERROR",payload:{field:sr,value:pi}})},[]),xu=Va(function(sr,pi,Mi){Jo({type:"SET_FIELD_VALUE",payload:{field:sr,value:pi}});var Gi=Mi===void 0?Wt:Mi;return Gi?qs(Ra(Qo.values,sr,pi)):Promise.resolve()}),Rf=(0,l.useCallback)(function(sr,pi){var Mi=pi,Gi=sr,ao;if(!$u(sr)){sr.persist&&sr.persist();var Io=sr.target?sr.target:sr.currentTarget,os=Io.type,Vl=Io.name,Cu=Io.id,Cc=Io.value,Jc=Io.checked,Xc=Io.outerHTML,va=Io.options,Hl=Io.multiple;Mi=pi||Vl||Cu,Gi=/number|range/.test(os)?(ao=parseFloat(Cc),isNaN(ao)?"":ao):/checkbox/.test(os)?Of(cs(Qo.values,Mi),Jc,Cc):va&&Hl?Sf(va):Cc}Mi&&xu(Mi,Gi)},[xu,Qo.values]),Uu=Va(function(sr){if($u(sr))return function(pi){return Rf(pi,sr)};Rf(sr)}),Za=Va(function(sr,pi,Mi){pi===void 0&&(pi=!0),Jo({type:"SET_FIELD_TOUCHED",payload:{field:sr,value:pi}});var Gi=Mi===void 0?gn:Mi;return Gi?qs(Qo.values):Promise.resolve()}),xc=(0,l.useCallback)(function(sr,pi){sr.persist&&sr.persist();var Mi=sr.target,Gi=Mi.name,ao=Mi.id,Io=Mi.outerHTML,os=pi||Gi||ao;Za(os,!0)},[Za]),Ka=Va(function(sr){if($u(sr))return function(pi){return xc(pi,sr)};xc(sr)}),$o=(0,l.useCallback)(function(sr){Qs(sr)?Jo({type:"SET_FORMIK_STATE",payload:sr}):Jo({type:"SET_FORMIK_STATE",payload:function(){return sr}})},[]),Bs=(0,l.useCallback)(function(sr){Jo({type:"SET_STATUS",payload:sr})},[]),ks=(0,l.useCallback)(function(sr){Jo({type:"SET_ISSUBMITTING",payload:sr})},[]),zs=Va(function(){return Jo({type:"SUBMIT_ATTEMPT"}),qs().then(function(sr){var pi=sr instanceof Error,Mi=!pi&&Object.keys(sr).length===0;if(Mi){var Gi;try{if(Gi=Vs(),Gi===void 0)return}catch(ao){throw ao}return Promise.resolve(Gi).then(function(ao){return is.current&&Jo({type:"SUBMIT_SUCCESS"}),ao}).catch(function(ao){if(is.current)throw Jo({type:"SUBMIT_FAILURE"}),ao})}else if(is.current&&(Jo({type:"SUBMIT_FAILURE"}),pi))throw sr})}),Ga=Va(function(sr){if(sr&&sr.preventDefault&&Qs(sr.preventDefault)&&sr.preventDefault(),sr&&sr.stopPropagation&&Qs(sr.stopPropagation)&&sr.stopPropagation(),!1)var pi;zs().catch(function(Mi){console.warn("Warning: An unhandled error was caught from submitForm()",Mi)})}),Wu={resetForm:Bu,validateForm:qs,validateField:Pf,setErrors:zf,setFieldError:ju,setFieldTouched:Za,setFieldValue:xu,setStatus:Bs,setSubmitting:ks,setTouched:Ll,setValues:ku,setFormikState:$o,submitForm:zs},Vs=Va(function(){var sr=Bf(hr.validationSchema),pi=sr&&sr.cast?sr.cast(Qo.values):Qo.values;return Lo(pi,Wu)}),Qc=Va(function(sr){sr&&sr.preventDefault&&Qs(sr.preventDefault)&&sr.preventDefault(),sr&&sr.stopPropagation&&Qs(sr.stopPropagation)&&sr.stopPropagation(),Bu()}),zu=(0,l.useCallback)(function(sr){return{value:cs(Qo.values,sr),error:cs(Qo.errors,sr),touched:!!cs(Qo.touched,sr),initialValue:cs(ns.current,sr),initialTouched:!!cs(ga.current,sr),initialError:cs(ra.current,sr)}},[Qo.errors,Qo.touched,Qo.values]),Vu=(0,l.useCallback)(function(sr){return{setValue:function(Mi,Gi){return xu(sr,Mi,Gi)},setTouched:function(Mi,Gi){return Za(sr,Mi,Gi)},setError:function(Mi){return ju(sr,Mi)}}},[xu,Za,ju]),Vf=(0,l.useCallback)(function(sr){var pi=Ul(sr),Mi=pi?sr.name:sr,Gi=cs(Qo.values,Mi),ao={name:Mi,value:Gi,onChange:Uu,onBlur:Ka};if(pi){var Io=sr.type,os=sr.value,Vl=sr.as,Cu=sr.multiple;Io==="checkbox"?os===void 0?ao.checked=!!Gi:(ao.checked=!!(Array.isArray(Gi)&&~Gi.indexOf(os)),ao.value=os):Io==="radio"?(ao.checked=Gi===os,ao.value=os):Vl==="select"&&Cu&&(ao.value=ao.value||[],ao.multiple=!0)}return ao},[Ka,Uu,Qo.values]),gl=(0,l.useMemo)(function(){return!d()(ns.current,Qo.values)},[ns.current,Qo.values]),Ma=(0,l.useMemo)(function(){return typeof ri<"u"?gl?Qo.errors&&Object.keys(Qo.errors).length===0:ri!==!1&&Qs(ri)?ri(hr):ri:Qo.errors&&Object.keys(Qo.errors).length===0},[ri,gl,Qo.errors,hr]),Hu=zo({},Qo,{initialValues:ns.current,initialErrors:ra.current,initialTouched:ga.current,initialStatus:ws.current,handleBlur:Ka,handleChange:Uu,handleReset:Qc,handleSubmit:Ga,resetForm:Bu,setErrors:zf,setFormikState:$o,setFieldTouched:Za,setFieldValue:xu,setFieldError:ju,setStatus:Bs,setSubmitting:ks,setTouched:Ll,setValues:ku,submitForm:zs,validateForm:qs,validateField:Pf,isValid:Ma,dirty:gl,unregisterField:Af,registerField:Ha,getFieldProps:Vf,getFieldMeta:zu,getFieldHelpers:Vu,validateOnBlur:gn,validateOnChange:Wt,validateOnMount:dr});return Hu}function Il(ce){var et=Cf(ce),Wt=ce.component,mn=ce.children,gn=ce.render,nr=ce.innerRef;return(0,l.useImperativeHandle)(nr,function(){return et}),(0,l.createElement)(Ff,{value:et},Wt?(0,l.createElement)(Wt,et):gn?gn(et):mn?Qs(mn)?mn(et):Vc(mn)?null:l.Children.only(mn):null)}function Bf(ce){if(ce)return Qs(ce)?ce():ce}function ed(ce){var et=ce.htmlContent,Wt=ce.documentationAnchorLink,mn=ce.handlerName;console.warn("Warning: Formik called `"+mn+"`, but you forgot to pass an `id` or `name` attribute to your input:\n "+et+`
1130
+ `,Mt=({title:ot,icon:zt})=>{const{formatMessage:Ut}=(0,$.Z)();return m.createElement(gr.u,{description:Ut(ot)},m.createElement(Ke,{"aria-label":Ut(ot),type:"button"},zt))};Mt.propTypes={icon:L().element.isRequired,title:L().shape({id:L().string.isRequired,defaultMessage:L().string.isRequired}).isRequired};var tn=Mt;const Fn=(ot,zt)=>({queryInfos:{...ot.queryInfos,defaultParams:{...ot.queryInfos.defaultParams,locale:zt},paramsToKeep:["plugins.i18n.locale"]}}),Cn=ot=>ot?.fieldSchema?.type==="relation"&&ot?.targetModelPluginOptions?.i18n?.localized,Bn=(ot,zt)=>ot.map(Ut=>Ut.reduce((Gn,xn)=>{const ur=xn?.fieldSchema?.type??null,Sr=xn?.fieldSchema?.pluginOptions?.i18n?.localized??["uid","relation"].includes(ur),Fr={title:{id:Sr?(0,N.O)("Field.localized"):(0,N.O)("Field.not-localized"),defaultMessage:Sr?"This value is unique for the selected locale":"This value is common to all locales"},icon:Sr?m.createElement(Jr.Z,{"aria-hidden":!0}):m.createElement(mt,{"aria-hidden":!0})},ni=m.createElement(tn,{...Fr});return Cn(xn)?(Gn.push({...xn,labelAction:ni,...Fn(xn,zt)}),Gn):(Gn.push({...xn,labelAction:ni}),Gn)},[])),Ge=(ot,zt)=>Object.keys(ot).reduce((Ut,Ln)=>{const Gn=ot[Ln],xn=At(Gn.layouts.edit,zt);return Ut[Ln]={...Gn,layouts:{...Gn.layouts,edit:xn}},Ut},{}),At=(ot,zt)=>ot.map(Ut=>Ut.reduce((Gn,xn)=>Cn(xn)?(Gn.push({...xn,...Fn(xn,zt)}),Gn):(Gn.push(xn),Gn),[])),Bt=ot=>["contentType",...ot];var Yt=({layout:ot,query:zt})=>{if(!d()(ot,Bt(["pluginOptions","i18n","localized"]),!1))return{layout:ot,query:zt};const Ln=d()(zt,["plugins","i18n","locale"],null);if(!Ln)return{layout:ot,query:zt};const Gn=Bt(["layouts","edit"]),xn=d()(ot,Gn),ur=Bn(xn,Ln),Sr={...ot.contentType.layouts,edit:ur},Fr=Ge(ot.components,Ln);return{query:zt,layout:{...ot,contentType:{...ot.contentType,layouts:Sr},components:Fr}}},vn=i(97889),Un=i(3040),tr=i.n(Un),Nn=i(33003);const Vn={isLoading:!0,locales:[]},Ye=(0,vn.ZP)((ot=Vn,zt={})=>{switch(zt.type){case Nn.I4:{ot.isLoading=!1,ot.locales=zt.locales;break}case Nn.xz:{zt.newLocale.isDefault&&ot.locales.forEach(Ut=>{Ut.isDefault=!1}),ot.locales.push(zt.newLocale);break}case Nn.HC:{const Ut=ot.locales.filter(Ln=>Ln.id!==zt.id);tr()(ot,"locales",Ut);break}case Nn.OT:{zt.editedLocale.isDefault&&ot.locales.forEach(Ln=>{Ln.isDefault=!1});const Ut=ot.locales.findIndex(Ln=>Ln.id===zt.editedLocale.id);tr()(ot.locales,Ut,zt.editedLocale);break}default:return ot}return ot});var ne={[`${pt.Z}_locales`]:Ye},ge=i(99381),je=i.n(ge),He=i(86349),it=i.n(He),fn=()=>({getState:ot,dispatch:zt})=>Ut=>Ln=>{if(Ln.type!=="ContentManager/CrudReducer/INIT_FORM"||!Ln.rawQuery)return Ut(Ln);const Gn=Ln.rawQuery.substring(1),xn=(0,pe.parse)(Gn),ur=d()(xn,"plugins.i18n.relatedEntityId",null),Sr=d()(xn,"plugins.i18n.locale",null),Fr=Ln.isSingleType;if(!ur&&!Fr)return Ut(Ln);const ni=ot(),di=ni["content-manager_editViewCrudReducer"],Ar=ni["content-manager_editViewLayoutManager"],{contentTypeDataStructure:ai}=di,{currentLayout:Oi}=Ar;return(async()=>{zt({type:"ContentManager/CrudReducer/GET_DATA"});const _i=je()(ai);try{const{data:Wi}=await(0,l.tg)().post(`/${pt.Z}/content-manager/actions/get-non-localized-fields`,{model:Oi.contentType.uid,id:ur,locale:Sr}),{nonLocalizedFields:so,localizations:yo}=Wi,to=it()(_i,so),Xe=["createdBy","updatedBy","publishedAt","id","_id","updatedAt","createdAt"],De=(0,l.w6)(to,Oi.contentType,Oi.components,Xe);De.localizations=yo,Ln.data=(0,l.dU)(De,Oi.contentType,Oi.components)}catch{}return Ut(Ln)})()},Vt=()=>({getState:ot})=>zt=>Ut=>{const Ln=()=>{try{const Gn=ot();if(d()(Gn,["content-type-builder_dataManagerProvider","modifiedData","contentType","schema","pluginOptions","i18n","localized"],!1)){const ur=Ut.options?{...Ut.options.pluginOptions,i18n:{localized:!0}}:{i18n:{localized:!0}};return zt({...Ut,options:{pluginOptions:ur}})}return zt(Ut)}catch{return zt(Ut)}};return Ut.type==="ContentTypeBuilder/FormModal/SET_ATTRIBUTE_DATA_SCHEMA"&&Ut.forTarget==="contentType"&&!["relation","component"].includes(Ut.attributeType)&&!Ut.isEditing||Ut.type==="ContentTypeBuilder/FormModal/SET_CUSTOM_FIELD_DATA_SCHEMA"&&Ut.forTarget==="contentType"&&!Ut.isEditing||(Ut.type==="ContentTypeBuilder/FormModal/RESET_PROPS_AND_SET_FORM_FOR_ADDING_AN_EXISTING_COMPO"||Ut.type==="ContentTypeBuilder/FormModal/RESET_PROPS_AND_SAVE_CURRENT_DATA")&&Ut.forTarget==="contentType"?Ln():zt(Ut)},dn=()=>()=>ot=>zt=>{if(zt.type==="ContentTypeBuilder/FormModal/SET_DATA_TO_EDIT"&&zt.modalType==="contentType"){const Ut={localized:!1},Ln=zt.data.pluginOptions?{...zt.data.pluginOptions,i18n:Ut}:{i18n:Ut},Gn={...zt.data,pluginOptions:Ln};if(zt.actionType==="create")return ot({...zt,data:Gn});if(!zt.data.pluginOptions?.i18n?.localized)return ot({...zt,data:Gn})}return ot(zt)};const Jn=ot=>zt=>d()(zt,"properties.locales",[]).indexOf(ot)!==-1;var Ir=()=>()=>ot=>zt=>{if(zt.type!=="ContentManager/RBACManager/SET_PERMISSIONS")return ot(zt);const Ut=d()(zt,"__meta__.containerName",null);if(!["editView","listView"].includes(Ut))return ot(zt);const Ln=d()(zt,"__meta__.plugins.i18n.locale",null);if(!Ln)return ot(zt);const Gn=zt.permissions,xn=Object.keys(Gn).reduce((ur,Sr)=>{const ni=Gn[Sr].filter(Jn(Ln));return ni.length&&(ur[Sr]=ni),ur},{});return ot({...zt,permissions:xn})},yr=[fn,dn,Vt,Ir],Or=["biginteger","boolean","component","date","datetime","decimal","dynamiczone","email","enumeration","float","integer","json","media","number","password","richtext","string","text","time"],we=i(9086),ue=i.n(we);const Te=["pluginOptions","i18n","localized"],ze=ot=>Object.keys(ot).reduce((zt,Ut)=>{const Ln=ot[Ut];if(Or.includes(Ln.type)){const Gn={localized:!0},xn=Ln.pluginOptions?{...Ln.pluginOptions,i18n:Gn}:{i18n:Gn};return zt[Ut]={...Ln,pluginOptions:xn},zt}return zt[Ut]=Ln,zt},{}),ft=ot=>Object.keys(ot).reduce((zt,Ut)=>(zt[Ut]=ue()(ot[Ut],"pluginOptions.i18n"),zt),{});var ln=(ot,zt)=>{if(!G()(ot,Te))return ot;const Ut=d()(ot,Te,!1),Ln=d()(zt,["schema",...Te],!1);if(Ut&&Ln)return ot;if(Ut){const Gn=ze(ot.attributes);return{...ot,attributes:Gn}}if(!Ut){const Gn=ue()(ot.pluginOptions,"i18n"),xn=ft(ot.attributes);return{...ot,pluginOptions:Gn,attributes:xn}}return ot};const En=E.s1.u2;var jr={register(ot){ot.addMiddlewares(yr),ot.addReducers(ne),ot.registerPlugin({id:pt.Z,initializer:Re,isReady:!1,name:En})},bootstrap(ot){ot.registerHook("Admin/CM/pages/App/mutate-collection-types-links",zn),ot.registerHook("Admin/CM/pages/App/mutate-single-types-links",Zr),ot.registerHook("Admin/CM/pages/ListView/inject-column-in-table",Qt),ot.registerHook("Admin/CM/pages/EditView/mutate-edit-view-layout",Yt),ot.addSettingsLink("global",{intlLabel:{id:(0,N.O)("plugin.name"),defaultMessage:"Internationalization"},id:"internationalization",to:"/settings/internationalization",async Component(){return await i.e(3552).then(i.bind(i,72713))},permissions:Wn._.accessMain}),ot.injectContentManagerComponent("editView","informations",{name:"i18n-locale-filter-edit-view",Component:cn}),ot.injectContentManagerComponent("listView","actions",{name:"i18n-locale-filter",Component:rr}),ot.injectContentManagerComponent("listView","deleteModalAdditionalInfos",{name:"i18n-delete-bullets-in-modal",Component:rn}),ot.injectContentManagerComponent("listView","publishModalAdditionalInfos",{name:"i18n-publish-bullets-in-modal",Component:D}),ot.injectContentManagerComponent("listView","unpublishModalAdditionalInfos",{name:"i18n-unpublish-bullets-in-modal",Component:Oe});const zt=ot.getPlugin("content-type-builder");if(zt){const Ut=zt.apis.forms;Ut.addContentTypeSchemaMutation(ln),Ut.components.add({id:"checkboxConfirmation",component:z}),Ut.extendContentType({validator:()=>({i18n:g.Ry().shape({localized:g.Xg()})}),form:{advanced(){return[{name:"pluginOptions.i18n.localized",description:{id:(0,N.O)("plugin.schema.i18n.localized.description-content-type"),defaultMessage:"Allows translating an entry into different languages"},type:"checkboxConfirmation",intlLabel:{id:(0,N.O)("plugin.schema.i18n.localized.label-content-type"),defaultMessage:"Localization"}}]}}}),Ut.extendFields(Or,{validator:Ln=>({i18n:g.Ry().shape({localized:g.Xg().test({name:"ensure-unique-localization",message:(0,N.O)("plugin.schema.i18n.ensure-unique-localization"),test(Gn){return Gn===void 0||Gn?!0:!(d()(Ln,["3","modifiedData","unique"],null)&&!Gn)}})})}),form:{advanced({contentTypeSchema:Ln,forTarget:Gn,type:xn,step:ur}){return Gn!=="contentType"?[]:d()(Ln,["schema","pluginOptions","i18n","localized"],!1)?xn==="component"&&ur==="1"?[]:[{name:"pluginOptions.i18n.localized",description:{id:(0,N.O)("plugin.schema.i18n.localized.description-field"),defaultMessage:"The field can have different values in each locale"},type:"checkbox",intlLabel:{id:(0,N.O)("plugin.schema.i18n.localized.label-field"),defaultMessage:"Enable localization for this field"}}]:[]}}})}},async registerTrads({locales:ot}){const zt=await Promise.all(ot.map(Ut=>i(48736)(`./${Ut}.json`).then(({default:Ln})=>({data:(0,l.jV)(Ln,pt.Z),locale:Ut})).catch(()=>({data:{},locale:Ut}))));return Promise.resolve(zt)}}},64198:function(_,b,i){"use strict";var l=i(24834);const f=l.u2.replace(/^@strapi\/plugin-/i,"");b.Z=f},50006:function(_,b,i){"use strict";var l=i(64198);const f=d=>`${l.Z}.${d}`;b.Z=f},60677:function(_,b,i){"use strict";i.d(b,{O:function(){return l.Z}});var l=i(50006)},61215:function(_,b,i){"use strict";_.exports=i(98751).default},19108:function(_,b,i){"use strict";i.d(b,{_:function(){return l}});const l={accessRoles:[{action:"plugin::users-permissions.roles.create",subject:null},{action:"plugin::users-permissions.roles.read",subject:null}],createRole:[{action:"plugin::users-permissions.roles.create",subject:null}],deleteRole:[{action:"plugin::users-permissions.roles.delete",subject:null}],readRoles:[{action:"plugin::users-permissions.roles.read",subject:null}],updateRole:[{action:"plugin::users-permissions.roles.update",subject:null}],readAdvancedSettings:[{action:"plugin::users-permissions.advanced-settings.read",subject:null}],updateAdvancedSettings:[{action:"plugin::users-permissions.advanced-settings.update",subject:null}],readEmailTemplates:[{action:"plugin::users-permissions.email-templates.read",subject:null}],updateEmailTemplates:[{action:"plugin::users-permissions.email-templates.update",subject:null}],readProviders:[{action:"plugin::users-permissions.providers.read",subject:null}],updateProviders:[{action:"plugin::users-permissions.providers.update",subject:null}]}},62502:function(_,b,i){"use strict";var l=i(30126),f=i(46524),d=i(19108),g=i(48395);const E=f.s1.u2;b.default={register(m){m.createSettingSection({id:"users-permissions",intlLabel:{id:(0,g.Z)("Settings.section-label"),defaultMessage:"Users & Permissions plugin"}},[{intlLabel:{id:"global.roles",defaultMessage:"Roles"},id:"roles",to:"/settings/users-permissions/roles",async Component(){return await Promise.all([i.e(3911),i.e(8853)]).then(i.bind(i,34254))},permissions:d._.accessRoles},{intlLabel:{id:(0,g.Z)("HeaderNav.link.providers"),defaultMessage:"Providers"},id:"providers",to:"/settings/users-permissions/providers",async Component(){return await i.e(2282).then(i.bind(i,30866))},permissions:d._.readProviders},{intlLabel:{id:(0,g.Z)("HeaderNav.link.emailTemplates"),defaultMessage:"Email templates"},id:"email-templates",to:"/settings/users-permissions/email-templates",async Component(){return await i.e(8418).then(i.bind(i,61780))},permissions:d._.readEmailTemplates},{intlLabel:{id:(0,g.Z)("HeaderNav.link.advancedSettings"),defaultMessage:"Advanced Settings"},id:"advanced-settings",to:"/settings/users-permissions/advanced-settings",async Component(){return await i.e(9460).then(i.bind(i,63669))},permissions:d._.readAdvancedSettings}]),m.registerPlugin({id:"users-permissions",name:E})},bootstrap(){},async registerTrads({locales:m}){const C=await Promise.all(m.map(x=>i(35538)(`./${x}.json`).then(({default:P})=>({data:(0,l.jV)(P,"users-permissions"),locale:x})).catch(()=>({data:{},locale:x}))));return Promise.resolve(C)}}},48395:function(_,b,i){"use strict";i.d(b,{Z:function(){return E}});var l=i(46524),d=l.u2.replace(/^@strapi\/plugin-/i,""),E=m=>`${d}.${m}`},35901:function(_,b,i){"use strict";_.exports=i(62502).default},46729:function(_){"use strict";_.exports=b=>{if(typeof b!="string")throw new TypeError("Expected a string");return b.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},39507:function(_){"use strict";_.exports=function b(i,l){if(i===l)return!0;if(i&&l&&typeof i=="object"&&typeof l=="object"){if(i.constructor!==l.constructor)return!1;var f,d,g;if(Array.isArray(i)){if(f=i.length,f!=l.length)return!1;for(d=f;d--!==0;)if(!b(i[d],l[d]))return!1;return!0}if(i.constructor===RegExp)return i.source===l.source&&i.flags===l.flags;if(i.valueOf!==Object.prototype.valueOf)return i.valueOf()===l.valueOf();if(i.toString!==Object.prototype.toString)return i.toString()===l.toString();if(g=Object.keys(i),f=g.length,f!==Object.keys(l).length)return!1;for(d=f;d--!==0;)if(!Object.prototype.hasOwnProperty.call(l,g[d]))return!1;for(d=f;d--!==0;){var E=g[d];if(!b(i[E],l[E]))return!1}return!0}return i!==i&&l!==l}},92802:function(_,b,i){"use strict";i.d(b,{gN:function(){return yc},F2:function(){return Fu},l0:function(){return Zc},J9:function(){return Il},Hy:function(){return Ff},U$:function(){return vc},TA:function(){return Cf},u6:function(){return zl}});var l=i(32735),f=i(8266),d=i.n(f),g=function(et){return E(et)&&!m(et)};function E(ce){return!!ce&&typeof ce=="object"}function m(ce){var et=Object.prototype.toString.call(ce);return et==="[object RegExp]"||et==="[object Date]"||P(ce)}var C=typeof Symbol=="function"&&Symbol.for,x=C?Symbol.for("react.element"):60103;function P(ce){return ce.$$typeof===x}function T(ce){return Array.isArray(ce)?[]:{}}function O(ce,et){return et.clone!==!1&&et.isMergeableObject(ce)?F(T(ce),ce,et):ce}function w(ce,et,Wt){return ce.concat(et).map(function(mn){return O(mn,Wt)})}function R(ce,et,Wt){var mn={};return Wt.isMergeableObject(ce)&&Object.keys(ce).forEach(function(gn){mn[gn]=O(ce[gn],Wt)}),Object.keys(et).forEach(function(gn){!Wt.isMergeableObject(et[gn])||!ce[gn]?mn[gn]=O(et[gn],Wt):mn[gn]=F(ce[gn],et[gn],Wt)}),mn}function F(ce,et,Wt){Wt=Wt||{},Wt.arrayMerge=Wt.arrayMerge||w,Wt.isMergeableObject=Wt.isMergeableObject||g;var mn=Array.isArray(et),gn=Array.isArray(ce),nr=mn===gn;return nr?mn?Wt.arrayMerge(ce,et,Wt):R(ce,et,Wt):O(et,Wt)}F.all=function(et,Wt){if(!Array.isArray(et))throw new Error("first argument should be an array");return et.reduce(function(mn,gn){return F(mn,gn,Wt)},{})};var V=F,L=V,$=typeof global=="object"&&global&&global.Object===Object&&global,U=$,N=typeof self=="object"&&self&&self.Object===Object&&self,k=U||N||Function("return this")(),j=k,z=j.Symbol,K=z,G=Object.prototype,Y=G.hasOwnProperty,ae=G.toString,Ce=K?K.toStringTag:void 0;function J(ce){var et=Y.call(ce,Ce),Wt=ce[Ce];try{ce[Ce]=void 0;var mn=!0}catch{}var gn=ae.call(ce);return mn&&(et?ce[Ce]=Wt:delete ce[Ce]),gn}var le=J,be=Object.prototype,te=be.toString;function q(ce){return te.call(ce)}var ee=q,Se="[object Null]",tt="[object Undefined]",Ae=K?K.toStringTag:void 0;function pe(ce){return ce==null?ce===void 0?tt:Se:Ae&&Ae in Object(ce)?le(ce):ee(ce)}var Pe=pe;function ye(ce,et){return function(Wt){return ce(et(Wt))}}var Ee=ye,_e=Ee(Object.getPrototypeOf,Object),We=_e;function Ie(ce){return ce!=null&&typeof ce=="object"}var Fe=Ie,ut="[object Object]",ht=Function.prototype,Ot=Object.prototype,Ue=ht.toString,at=Ot.hasOwnProperty,Pt=Ue.call(Object);function lt(ce){if(!Fe(ce)||Pe(ce)!=ut)return!1;var et=We(ce);if(et===null)return!0;var Wt=at.call(et,"constructor")&&et.constructor;return typeof Wt=="function"&&Wt instanceof Wt&&Ue.call(Wt)==Pt}var kt=lt;function nn(){this.__data__=[],this.size=0}var hn=nn;function Rn(ce,et){return ce===et||ce!==ce&&et!==et}var kn=Rn;function $t(ce,et){for(var Wt=ce.length;Wt--;)if(kn(ce[Wt][0],et))return Wt;return-1}var yn=$t,Yn=Array.prototype,cn=Yn.splice;function st(ce){var et=this.__data__,Wt=yn(et,ce);if(Wt<0)return!1;var mn=et.length-1;return Wt==mn?et.pop():cn.call(et,Wt,1),--this.size,!0}var on=st;function dt(ce){var et=this.__data__,Wt=yn(et,ce);return Wt<0?void 0:et[Wt][1]}var Dt=dt;function Ht(ce){return yn(this.__data__,ce)>-1}var rn=Ht;function ke(ce,et){var Wt=this.__data__,mn=yn(Wt,ce);return mn<0?(++this.size,Wt.push([ce,et])):Wt[mn][1]=et,this}var ct=ke;function D(ce){var et=-1,Wt=ce==null?0:ce.length;for(this.clear();++et<Wt;){var mn=ce[et];this.set(mn[0],mn[1])}}D.prototype.clear=hn,D.prototype.delete=on,D.prototype.get=Dt,D.prototype.has=rn,D.prototype.set=ct;var W=D;function re(){this.__data__=new W,this.size=0}var Oe=re;function Ze(ce){var et=this.__data__,Wt=et.delete(ce);return this.size=et.size,Wt}var pt=Ze;function $e(ce){return this.__data__.get(ce)}var Re=$e;function Be(ce){return this.__data__.has(ce)}var Ne=Be;function bt(ce){var et=typeof ce;return ce!=null&&(et=="object"||et=="function")}var Kt=bt,an="[object AsyncFunction]",In="[object Function]",rr="[object GeneratorFunction]",Wn="[object Proxy]";function gr(ce){if(!Kt(ce))return!1;var et=Pe(ce);return et==In||et==rr||et==an||et==Wn}var fr=gr,Rr=j["__core-js_shared__"],Vr=Rr,ei=function(){var ce=/[^.]+$/.exec(Vr&&Vr.keys&&Vr.keys.IE_PROTO||"");return ce?"Symbol(src)_1."+ce:""}();function Ct(ce){return!!ei&&ei in ce}var St=Ct,Pn=Function.prototype,Qt=Pn.toString;function qn(ce){if(ce!=null){try{return Qt.call(ce)}catch{}try{return ce+""}catch{}}return""}var Tt=qn,fe=/[\\^$.*+?()[\]{}|]/g,ve=/^\[object .+?Constructor\]$/,Qe=Function.prototype,jt=Object.prototype,bn=Qe.toString,zn=jt.hasOwnProperty,Cr=RegExp("^"+bn.call(zn).replace(fe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zr(ce){if(!Kt(ce)||St(ce))return!1;var et=fr(ce)?Cr:ve;return et.test(Tt(ce))}var Jr=Zr;function _r(ce,et){return ce?.[et]}var Xn=_r;function mt(ce,et){var Wt=Xn(ce,et);return Jr(Wt)?Wt:void 0}var Ke=mt,Mt=Ke(j,"Map"),tn=Mt,Fn=Ke(Object,"create"),Cn=Fn;function Bn(){this.__data__=Cn?Cn(null):{},this.size=0}var Ge=Bn;function At(ce){var et=this.has(ce)&&delete this.__data__[ce];return this.size-=et?1:0,et}var Bt=At,Zt="__lodash_hash_undefined__",Yt=Object.prototype,vn=Yt.hasOwnProperty;function Un(ce){var et=this.__data__;if(Cn){var Wt=et[ce];return Wt===Zt?void 0:Wt}return vn.call(et,ce)?et[ce]:void 0}var tr=Un,Nn=Object.prototype,Vn=Nn.hasOwnProperty;function Ye(ce){var et=this.__data__;return Cn?et[ce]!==void 0:Vn.call(et,ce)}var de=Ye,ne="__lodash_hash_undefined__";function ge(ce,et){var Wt=this.__data__;return this.size+=this.has(ce)?0:1,Wt[ce]=Cn&&et===void 0?ne:et,this}var je=ge;function He(ce){var et=-1,Wt=ce==null?0:ce.length;for(this.clear();++et<Wt;){var mn=ce[et];this.set(mn[0],mn[1])}}He.prototype.clear=Ge,He.prototype.delete=Bt,He.prototype.get=tr,He.prototype.has=de,He.prototype.set=je;var it=He;function Rt(){this.size=0,this.__data__={hash:new it,map:new(tn||W),string:new it}}var fn=Rt;function qt(ce){var et=typeof ce;return et=="string"||et=="number"||et=="symbol"||et=="boolean"?ce!=="__proto__":ce===null}var Vt=qt;function Jt(ce,et){var Wt=ce.__data__;return Vt(et)?Wt[typeof et=="string"?"string":"hash"]:Wt.map}var dn=Jt;function Jn(ce){var et=dn(this,ce).delete(ce);return this.size-=et?1:0,et}var Hn=Jn;function Ir(ce){return dn(this,ce).get(ce)}var vr=Ir;function yr(ce){return dn(this,ce).has(ce)}var Er=yr;function Or(ce,et){var Wt=dn(this,ce),mn=Wt.size;return Wt.set(ce,et),this.size+=Wt.size==mn?0:1,this}var we=Or;function ue(ce){var et=-1,Wt=ce==null?0:ce.length;for(this.clear();++et<Wt;){var mn=ce[et];this.set(mn[0],mn[1])}}ue.prototype.clear=fn,ue.prototype.delete=Hn,ue.prototype.get=vr,ue.prototype.has=Er,ue.prototype.set=we;var Te=ue,ze=200;function ft(ce,et){var Wt=this.__data__;if(Wt instanceof W){var mn=Wt.__data__;if(!tn||mn.length<ze-1)return mn.push([ce,et]),this.size=++Wt.size,this;Wt=this.__data__=new Te(mn)}return Wt.set(ce,et),this.size=Wt.size,this}var yt=ft;function ln(ce){var et=this.__data__=new W(ce);this.size=et.size}ln.prototype.clear=Oe,ln.prototype.delete=pt,ln.prototype.get=Re,ln.prototype.has=Ne,ln.prototype.set=yt;var En=ln;function jr(ce,et){for(var Wt=-1,mn=ce==null?0:ce.length;++Wt<mn&&et(ce[Wt],Wt,ce)!==!1;);return ce}var ot=jr,zt=function(){try{var ce=Ke(Object,"defineProperty");return ce({},"",{}),ce}catch{}}(),Ut=zt;function Ln(ce,et,Wt){et=="__proto__"&&Ut?Ut(ce,et,{configurable:!0,enumerable:!0,value:Wt,writable:!0}):ce[et]=Wt}var Gn=Ln,xn=Object.prototype,ur=xn.hasOwnProperty;function Sr(ce,et,Wt){var mn=ce[et];(!(ur.call(ce,et)&&kn(mn,Wt))||Wt===void 0&&!(et in ce))&&Gn(ce,et,Wt)}var Fr=Sr;function ni(ce,et,Wt,mn){var gn=!Wt;Wt||(Wt={});for(var nr=-1,dr=et.length;++nr<dr;){var ri=et[nr],Ki=mn?mn(Wt[ri],ce[ri],ri,Wt,ce):void 0;Ki===void 0&&(Ki=ce[ri]),gn?Gn(Wt,ri,Ki):Fr(Wt,ri,Ki)}return Wt}var di=ni;function Ar(ce,et){for(var Wt=-1,mn=Array(ce);++Wt<ce;)mn[Wt]=et(Wt);return mn}var ai=Ar,Oi="[object Arguments]";function $r(ce){return Fe(ce)&&Pe(ce)==Oi}var _i=$r,Wi=Object.prototype,so=Wi.hasOwnProperty,yo=Wi.propertyIsEnumerable,to=_i(function(){return arguments}())?_i:function(ce){return Fe(ce)&&so.call(ce,"callee")&&!yo.call(ce,"callee")},Xe=to,De=Array.isArray,_t=De;function Et(){return!1}var Xt=Et,Sn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,On=Sn&&typeof module=="object"&&module&&!module.nodeType&&module,jn=On&&On.exports===Sn,cr=jn?j.Buffer:void 0,ii=cr?cr.isBuffer:void 0,li=ii||Xt,Yr=li,oi=9007199254740991,qr=/^(?:0|[1-9]\d*)$/;function gi(ce,et){var Wt=typeof ce;return et=et??oi,!!et&&(Wt=="number"||Wt!="symbol"&&qr.test(ce))&&ce>-1&&ce%1==0&&ce<et}var Qi=gi,zi=9007199254740991;function Li(ce){return typeof ce=="number"&&ce>-1&&ce%1==0&&ce<=zi}var ui=Li,Vi="[object Arguments]",Bi="[object Array]",ho="[object Boolean]",Hi="[object Date]",Eo="[object Error]",hi="[object Function]",wo="[object Map]",Uo="[object Number]",ie="[object Object]",B="[object RegExp]",he="[object Set]",xe="[object String]",rt="[object WeakMap]",Lt="[object ArrayBuffer]",en="[object DataView]",An="[object Float32Array]",_n="[object Float64Array]",Mr="[object Int8Array]",Ur="[object Int16Array]",Pr="[object Int32Array]",Kr="[object Uint8Array]",Qr="[object Uint8ClampedArray]",Wr="[object Uint16Array]",ci="[object Uint32Array]",pr={};pr[An]=pr[_n]=pr[Mr]=pr[Ur]=pr[Pr]=pr[Kr]=pr[Qr]=pr[Wr]=pr[ci]=!0,pr[Vi]=pr[Bi]=pr[Lt]=pr[ho]=pr[en]=pr[Hi]=pr[Eo]=pr[hi]=pr[wo]=pr[Uo]=pr[ie]=pr[B]=pr[he]=pr[xe]=pr[rt]=!1;function Xr(ce){return Fe(ce)&&ui(ce.length)&&!!pr[Pe(ce)]}var Br=Xr;function Mn(ce){return function(et){return ce(et)}}var qi=Mn,Po=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mo=Po&&typeof module=="object"&&module&&!module.nodeType&&module,Ko=mo&&mo.exports===Po,Co=Ko&&U.process,No=function(){try{var ce=mo&&mo.require&&mo.require("util").types;return ce||Co&&Co.binding&&Co.binding("util")}catch{}}(),Ao=No,vt=Ao&&Ao.isTypedArray,la=vt?qi(vt):Br,Es=la,Qn=Object.prototype,ms=Qn.hasOwnProperty;function ua(ce,et){var Wt=_t(ce),mn=!Wt&&Xe(ce),gn=!Wt&&!mn&&Yr(ce),nr=!Wt&&!mn&&!gn&&Es(ce),dr=Wt||mn||gn||nr,ri=dr?ai(ce.length,String):[],Ki=ri.length;for(var $i in ce)(et||ms.call(ce,$i))&&!(dr&&($i=="length"||gn&&($i=="offset"||$i=="parent")||nr&&($i=="buffer"||$i=="byteLength"||$i=="byteOffset")||Qi($i,Ki)))&&ri.push($i);return ri}var co=ua,Zs=Object.prototype;function ya(ce){var et=ce&&ce.constructor,Wt=typeof et=="function"&&et.prototype||Zs;return ce===Wt}var qe=ya,Oa=Ee(Object.keys,Object),ul=Oa,Mo=Object.prototype,bs=Mo.hasOwnProperty;function ca(ce){if(!qe(ce))return ul(ce);var et=[];for(var Wt in Object(ce))bs.call(ce,Wt)&&Wt!="constructor"&&et.push(Wt);return et}var El=ca;function Ds(ce){return ce!=null&&ui(ce.length)&&!fr(ce)}var Zi=Ds;function Xo(ce){return Zi(ce)?co(ce):El(ce)}var po=Xo;function go(ce,et){return ce&&di(et,po(et),ce)}var Fo=go;function xs(ce){var et=[];if(ce!=null)for(var Wt in Object(ce))et.push(Wt);return et}var fa=xs,$a=Object.prototype,us=$a.hasOwnProperty;function bl(ce){if(!Kt(ce))return fa(ce);var et=qe(ce),Wt=[];for(var mn in ce)mn=="constructor"&&(et||!us.call(ce,mn))||Wt.push(mn);return Wt}var Go=bl;function xt(ce){return Zi(ce)?co(ce,!0):Go(ce)}var Tn=xt;function $n(ce,et){return ce&&di(et,Tn(et),ce)}var lr=$n,br=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gr=br&&typeof module=="object"&&module&&!module.nodeType&&module,vi=Gr&&Gr.exports===br,xi=vi?j.Buffer:void 0,Ti=xi?xi.allocUnsafe:void 0;function bi(ce,et){if(et)return ce.slice();var Wt=ce.length,mn=Ti?Ti(Wt):new ce.constructor(Wt);return ce.copy(mn),mn}var wi=bi;function fi(ce,et){var Wt=-1,mn=ce.length;for(et||(et=Array(mn));++Wt<mn;)et[Wt]=ce[Wt];return et}var ji=fi;function lo(ce,et){for(var Wt=-1,mn=ce==null?0:ce.length,gn=0,nr=[];++Wt<mn;){var dr=ce[Wt];et(dr,Wt,ce)&&(nr[gn++]=dr)}return nr}var uo=lo;function xr(){return[]}var So=xr,Do=Object.prototype,bo=Do.propertyIsEnumerable,no=Object.getOwnPropertySymbols,Yo=no?function(ce){return ce==null?[]:(ce=Object(ce),uo(no(ce),function(et){return bo.call(ce,et)}))}:So,as=Yo;function Ks(ce,et){return di(ce,as(ce),et)}var qo=Ks;function Gs(ce,et){for(var Wt=-1,mn=et.length,gn=ce.length;++Wt<mn;)ce[gn+Wt]=et[Wt];return ce}var Ys=Gs,Ea=Object.getOwnPropertySymbols,Na=Ea?function(ce){for(var et=[];ce;)Ys(et,as(ce)),ce=We(ce);return et}:So,Ta=Na;function Ms(ce,et){return di(ce,Ta(ce),et)}var Fl=Ms;function wa(ce,et,Wt){var mn=et(ce);return _t(ce)?mn:Ys(mn,Wt(ce))}var Bl=wa;function ba(ce){return Bl(ce,po,as)}var Ro=ba;function Lr(ce){return Bl(ce,Tn,Ta)}var es=Lr,Ws=Ke(j,"DataView"),ta=Ws,Ja=Ke(j,"Promise"),kl=Ja,ou=Ke(j,"Set"),gs=ou,Is=Ke(j,"WeakMap"),cl=Is,_s="[object Map]",Fa="[object Object]",Ss="[object Promise]",fl="[object Set]",Yl="[object WeakMap]",Xu="[object DataView]",qu=Tt(ta),Xa=Tt(tn),xl=Tt(kl),jl=Tt(gs),Da=Tt(cl),Cl=Pe;(ta&&Cl(new ta(new ArrayBuffer(1)))!=Xu||tn&&Cl(new tn)!=_s||kl&&Cl(kl.resolve())!=Ss||gs&&Cl(new gs)!=fl||cl&&Cl(new cl)!=Yl)&&(Cl=function(ce){var et=Pe(ce),Wt=et==Fa?ce.constructor:void 0,mn=Wt?Tt(Wt):"";if(mn)switch(mn){case qu:return Xu;case Xa:return _s;case xl:return Ss;case jl:return fl;case Da:return Yl}return et});var Ls=Cl,Ba=Object.prototype,ds=Ba.hasOwnProperty;function Bo(ce){var et=ce.length,Wt=new ce.constructor(et);return et&&typeof ce[0]=="string"&&ds.call(ce,"index")&&(Wt.index=ce.index,Wt.input=ce.input),Wt}var Wo=Bo,$s=j.Uint8Array,da=$s;function Ml(ce){var et=new ce.constructor(ce.byteLength);return new da(et).set(new da(ce)),et}var qa=Ml;function na(ce,et){var Wt=et?qa(ce.buffer):ce.buffer;return new ce.constructor(Wt,ce.byteOffset,ce.byteLength)}var su=na,Sl=/\w*$/;function Ps(ce){var et=new ce.constructor(ce.source,Sl.exec(ce));return et.lastIndex=ce.lastIndex,et}var au=Ps,ts=K?K.prototype:void 0,el=ts?ts.valueOf:void 0;function Ql(ce){return el?Object(el.call(ce)):{}}var lu=Ql;function wc(ce,et){var Wt=et?qa(ce.buffer):ce.buffer;return new ce.constructor(Wt,ce.byteOffset,ce.length)}var of=wc,dl="[object Boolean]",Os="[object Date]",uu="[object Map]",ec="[object Number]",Ol="[object RegExp]",_o="[object Set]",ka="[object String]",Tl="[object Symbol]",tl="[object ArrayBuffer]",nl="[object DataView]",Pa="[object Float32Array]",Dc="[object Float64Array]",Tu="[object Int8Array]",Pc="[object Int16Array]",ha="[object Int32Array]",xa="[object Uint8Array]",hs="[object Uint8ClampedArray]",hl="[object Uint16Array]",sf="[object Uint32Array]";function Ac(ce,et,Wt){var mn=ce.constructor;switch(et){case tl:return qa(ce);case dl:case Os:return new mn(+ce);case nl:return su(ce,Wt);case Pa:case Dc:case Tu:case Pc:case ha:case xa:case hs:case hl:case sf:return of(ce,Wt);case uu:return new mn;case ec:case ka:return new mn(ce);case Ol:return au(ce);case _o:return new mn;case Tl:return lu(ce)}}var Rc=Ac,wu=Object.create,Ic=function(){function ce(){}return function(et){if(!Kt(et))return{};if(wu)return wu(et);ce.prototype=et;var Wt=new ce;return ce.prototype=void 0,Wt}}(),_c=Ic;function Qf(ce){return typeof ce.constructor=="function"&&!qe(ce)?_c(We(ce)):{}}var cu=Qf,af="[object Map]";function Jf(ce){return Fe(ce)&&Ls(ce)==af}var ja=Jf,Du=Ao&&Ao.isMap,Pu=Du?qi(Du):ja,Ul=Pu,pa="[object Set]";function Au(ce){return Fe(ce)&&Ls(ce)==pa}var Ru=Au,tc=Ao&&Ao.isSet,fu=tc?qi(tc):Ru,Ua=fu,Jl=1,lf=2,Lc=4,rl="[object Arguments]",wl="[object Array]",$c="[object Boolean]",Nc="[object Date]",il="[object Error]",Aa="[object Function]",Fc="[object GeneratorFunction]",Xf="[object Map]",nc="[object Number]",rc="[object Object]",Bc="[object RegExp]",As="[object Set]",Iu="[object String]",uf="[object Symbol]",_f="[object WeakMap]",cf="[object ArrayBuffer]",ff="[object DataView]",du="[object Float32Array]",hu="[object Float64Array]",kc="[object Int8Array]",df="[object Int16Array]",ic="[object Int32Array]",hf="[object Uint8Array]",pu="[object Uint8ClampedArray]",pl="[object Uint16Array]",Xl="[object Uint32Array]",Vo={};Vo[rl]=Vo[wl]=Vo[cf]=Vo[ff]=Vo[$c]=Vo[Nc]=Vo[du]=Vo[hu]=Vo[kc]=Vo[df]=Vo[ic]=Vo[Xf]=Vo[nc]=Vo[rc]=Vo[Bc]=Vo[As]=Vo[Iu]=Vo[uf]=Vo[hf]=Vo[pu]=Vo[pl]=Vo[Xl]=!0,Vo[il]=Vo[Aa]=Vo[_f]=!1;function Dl(ce,et,Wt,mn,gn,nr){var dr,ri=et&Jl,Ki=et&lf,$i=et&Lc;if(Wt&&(dr=gn?Wt(ce,mn,gn,nr):Wt(ce)),dr!==void 0)return dr;if(!Kt(ce))return ce;var Lo=_t(ce);if(Lo){if(dr=Wo(ce),!ri)return ji(ce,dr)}else{var xo=Ls(ce),hr=xo==Aa||xo==Fc;if(Yr(ce))return wi(ce,ri);if(xo==rc||xo==rl||hr&&!gn){if(dr=Ki||hr?{}:cu(ce),!ri)return Ki?Fl(ce,lr(dr,ce)):qo(ce,Fo(dr,ce))}else{if(!Vo[xo])return gn?ce:{};dr=Rc(ce,xo,ri)}}nr||(nr=new En);var ns=nr.get(ce);if(ns)return ns;nr.set(ce,dr),Ua(ce)?ce.forEach(function(ws){dr.add(Dl(ws,et,Wt,ws,ce,nr))}):Ul(ce)&&ce.forEach(function(ws,is){dr.set(is,Dl(ws,et,Wt,is,ce,nr))});var ra=$i?Ki?es:Ro:Ki?Tn:po,ga=Lo?void 0:ra(ce);return ot(ga||ce,function(ws,is){ga&&(is=ws,ws=ce[is]),Fr(dr,is,Dl(ws,et,Wt,is,ce,nr))}),dr}var oc=Dl,sc=4;function pf(ce){return oc(ce,sc)}var ql=pf;function vs(ce,et){for(var Wt=-1,mn=ce==null?0:ce.length,gn=Array(mn);++Wt<mn;)gn[Wt]=et(ce[Wt],Wt,ce);return gn}var mu=vs,ac="[object Symbol]";function jc(ce){return typeof ce=="symbol"||Fe(ce)&&Pe(ce)==ac}var Wa=jc,rs="Expected a function";function za(ce,et){if(typeof ce!="function"||et!=null&&typeof et!="function")throw new TypeError(rs);var Wt=function(){var mn=arguments,gn=et?et.apply(this,mn):mn[0],nr=Wt.cache;if(nr.has(gn))return nr.get(gn);var dr=ce.apply(this,mn);return Wt.cache=nr.set(gn,dr)||nr,dr};return Wt.cache=new(za.Cache||Te),Wt}za.Cache=Te;var Oo=za,Ts=500;function Ho(ce){var et=Oo(ce,function(mn){return Wt.size===Ts&&Wt.clear(),mn}),Wt=et.cache;return et}var Ns=Ho,gu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eu=/\\(\\)?/g,qf=Ns(function(ce){var et=[];return ce.charCodeAt(0)===46&&et.push(""),ce.replace(gu,function(Wt,mn,gn,nr){et.push(gn?nr.replace(eu,"$1"):mn||Wt)}),et}),Fs=qf,Uc=1/0;function mf(ce){if(typeof ce=="string"||Wa(ce))return ce;var et=ce+"";return et=="0"&&1/ce==-Uc?"-0":et}var lc=mf,ml=1/0,Ca=K?K.prototype:void 0,_u=Ca?Ca.toString:void 0;function uc(ce){if(typeof ce=="string")return ce;if(_t(ce))return mu(ce,uc)+"";if(Wa(ce))return _u?_u.call(ce):"";var et=ce+"";return et=="0"&&1/ce==-ml?"-0":et}var vu=uc;function gf(ce){return ce==null?"":vu(ce)}var yu=gf;function cc(ce){return _t(ce)?mu(ce,lc):Wa(ce)?[ce]:ji(Fs(yu(ce)))}var vf=cc,yf=!0;function Lf(ce,et){if(!yf){if(ce)return;var Wt="Warning: "+et;typeof console<"u"&&console.warn(Wt);try{throw Error(Wt)}catch{}}}var Pl=Lf,Lu=i(86058),tu=i.n(Lu),Wc=1,fc=4;function dc(ce){return oc(ce,Wc|fc)}var Ef=dc;function zo(){return zo=Object.assign||function(ce){for(var et=1;et<arguments.length;et++){var Wt=arguments[et];for(var mn in Wt)Object.prototype.hasOwnProperty.call(Wt,mn)&&(ce[mn]=Wt[mn])}return ce},zo.apply(this,arguments)}function $f(ce,et){ce.prototype=Object.create(et.prototype),ce.prototype.constructor=ce,ce.__proto__=et}function Al(ce,et){if(ce==null)return{};var Wt={},mn=Object.keys(ce),gn,nr;for(nr=0;nr<mn.length;nr++)gn=mn[nr],!(et.indexOf(gn)>=0)&&(Wt[gn]=ce[gn]);return Wt}function zc(ce){if(ce===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ce}var bf=function(et){return Array.isArray(et)&&et.length===0},Qs=function(et){return typeof et=="function"},Wl=function(et){return et!==null&&typeof et=="object"},Nf=function(et){return String(Math.floor(Number(et)))===et},$u=function(et){return Object.prototype.toString.call(et)==="[object String]"},fd=function(et){return et!==et},Vc=function(et){return l.Children.count(et)===0},xf=function(et){return Wl(et)&&Qs(et.then)},Di=function(et){return et&&Wl(et)&&Wl(et.target)};function dd(ce){if(ce=ce||(typeof document<"u"?document:void 0),typeof ce>"u")return null;try{return ce.activeElement||ce.body}catch{return ce.body}}function cs(ce,et,Wt,mn){mn===void 0&&(mn=0);for(var gn=vf(et);ce&&mn<gn.length;)ce=ce[gn[mn++]];return mn!==gn.length&&!ce||ce===void 0?Wt:ce}function Ra(ce,et,Wt){for(var mn=ql(ce),gn=mn,nr=0,dr=vf(et);nr<dr.length-1;nr++){var ri=dr[nr],Ki=cs(ce,dr.slice(0,nr+1));if(Ki&&(Wl(Ki)||Array.isArray(Ki)))gn=gn[ri]=ql(Ki);else{var $i=dr[nr+1];gn=gn[ri]=Nf($i)&&Number($i)>=0?[]:{}}}return(nr===0?ce:gn)[dr[nr]]===Wt?ce:(Wt===void 0?delete gn[dr[nr]]:gn[dr[nr]]=Wt,nr===0&&Wt===void 0&&delete mn[dr[nr]],mn)}function hc(ce,et,Wt,mn){Wt===void 0&&(Wt=new WeakMap),mn===void 0&&(mn={});for(var gn=0,nr=Object.keys(ce);gn<nr.length;gn++){var dr=nr[gn],ri=ce[dr];Wl(ri)?Wt.get(ri)||(Wt.set(ri,!0),mn[dr]=Array.isArray(ri)?[]:{},hc(ri,et,Wt,mn[dr])):mn[dr]=et}return mn}var pc=(0,l.createContext)(void 0);pc.displayName="FormikContext";var Ff=pc.Provider,Hc=pc.Consumer;function zl(){var ce=(0,l.useContext)(pc);return ce||Pl(!1),ce}function Eu(ce,et){switch(et.type){case"SET_VALUES":return zo({},ce,{values:et.payload});case"SET_TOUCHED":return zo({},ce,{touched:et.payload});case"SET_ERRORS":return d()(ce.errors,et.payload)?ce:zo({},ce,{errors:et.payload});case"SET_STATUS":return zo({},ce,{status:et.payload});case"SET_ISSUBMITTING":return zo({},ce,{isSubmitting:et.payload});case"SET_ISVALIDATING":return zo({},ce,{isValidating:et.payload});case"SET_FIELD_VALUE":return zo({},ce,{values:Ra(ce.values,et.payload.field,et.payload.value)});case"SET_FIELD_TOUCHED":return zo({},ce,{touched:Ra(ce.touched,et.payload.field,et.payload.value)});case"SET_FIELD_ERROR":return zo({},ce,{errors:Ra(ce.errors,et.payload.field,et.payload.value)});case"RESET_FORM":return zo({},ce,et.payload);case"SET_FORMIK_STATE":return et.payload(ce);case"SUBMIT_ATTEMPT":return zo({},ce,{touched:hc(ce.values,!0),isSubmitting:!0,submitCount:ce.submitCount+1});case"SUBMIT_FAILURE":return zo({},ce,{isSubmitting:!1});case"SUBMIT_SUCCESS":return zo({},ce,{isSubmitting:!1});default:return ce}}var Rl={},mc={};function Cf(ce){var et=ce.validateOnChange,Wt=et===void 0?!0:et,mn=ce.validateOnBlur,gn=mn===void 0?!0:mn,nr=ce.validateOnMount,dr=nr===void 0?!1:nr,ri=ce.isInitialValid,Ki=ce.enableReinitialize,$i=Ki===void 0?!1:Ki,Lo=ce.onSubmit,xo=Al(ce,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),hr=zo({validateOnChange:Wt,validateOnBlur:gn,validateOnMount:dr,onSubmit:Lo},xo),ns=(0,l.useRef)(hr.initialValues),ra=(0,l.useRef)(hr.initialErrors||Rl),ga=(0,l.useRef)(hr.initialTouched||mc),ws=(0,l.useRef)(hr.initialStatus),is=(0,l.useRef)(!1),Ia=(0,l.useRef)({});(0,l.useEffect)(function(){return is.current=!0,function(){is.current=!1}},[]);var bu=(0,l.useReducer)(Eu,{values:hr.initialValues,errors:hr.initialErrors||Rl,touched:hr.initialTouched||mc,status:hr.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),Qo=bu[0],Jo=bu[1],Df=(0,l.useCallback)(function(sr,pi){return new Promise(function(Mi,Gi){var ao=hr.validate(sr,pi);ao==null?Mi(Rl):xf(ao)?ao.then(function(Io){Mi(Io||Rl)},function(Io){Gi(Io)}):Mi(ao)})},[hr.validate]),bc=(0,l.useCallback)(function(sr,pi){var Mi=Bf(hr.validationSchema),Gi=pi&&Mi.validateAt?Mi.validateAt(pi,sr):gc(sr,Mi);return new Promise(function(ao,Io){Gi.then(function(){ao(Rl)},function(os){os.name==="ValidationError"?ao(Mf(os)):Io(os)})})},[hr.validationSchema]),Yc=(0,l.useCallback)(function(sr,pi){return new Promise(function(Mi){return Mi(Ia.current[sr].validate(pi))})},[]),Xs=(0,l.useCallback)(function(sr){var pi=Object.keys(Ia.current).filter(function(Gi){return Qs(Ia.current[Gi].validate)}),Mi=pi.length>0?pi.map(function(Gi){return Yc(Gi,cs(sr,Gi))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(Mi).then(function(Gi){return Gi.reduce(function(ao,Io,os){return Io==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||Io&&(ao=Ra(ao,pi[os],Io)),ao},{})})},[Yc]),_l=(0,l.useCallback)(function(sr){return Promise.all([Xs(sr),hr.validationSchema?bc(sr):{},hr.validate?Df(sr):{}]).then(function(pi){var Mi=pi[0],Gi=pi[1],ao=pi[2],Io=L.all([Mi,Gi,ao],{arrayMerge:ma});return Io})},[hr.validate,hr.validationSchema,Xs,Df,bc]),qs=Va(function(sr){return sr===void 0&&(sr=Qo.values),Jo({type:"SET_ISVALIDATING",payload:!0}),_l(sr).then(function(pi){return is.current&&(Jo({type:"SET_ISVALIDATING",payload:!1}),Jo({type:"SET_ERRORS",payload:pi})),pi})});(0,l.useEffect)(function(){dr&&is.current===!0&&d()(ns.current,hr.initialValues)&&qs(ns.current)},[dr,qs]);var Bu=(0,l.useCallback)(function(sr){var pi=sr&&sr.values?sr.values:ns.current,Mi=sr&&sr.errors?sr.errors:ra.current?ra.current:hr.initialErrors||{},Gi=sr&&sr.touched?sr.touched:ga.current?ga.current:hr.initialTouched||{},ao=sr&&sr.status?sr.status:ws.current?ws.current:hr.initialStatus;ns.current=pi,ra.current=Mi,ga.current=Gi,ws.current=ao;var Io=function(){Jo({type:"RESET_FORM",payload:{isSubmitting:!!sr&&!!sr.isSubmitting,errors:Mi,touched:Gi,status:ao,values:pi,isValidating:!!sr&&!!sr.isValidating,submitCount:sr&&sr.submitCount&&typeof sr.submitCount=="number"?sr.submitCount:0}})};if(hr.onReset){var os=hr.onReset(Qo.values,Wu);xf(os)?os.then(Io):Io()}else Io()},[hr.initialErrors,hr.initialStatus,hr.initialTouched]);(0,l.useEffect)(function(){is.current===!0&&!d()(ns.current,hr.initialValues)&&$i&&(ns.current=hr.initialValues,Bu(),dr&&qs(ns.current))},[$i,hr.initialValues,Bu,dr,qs]),(0,l.useEffect)(function(){$i&&is.current===!0&&!d()(ra.current,hr.initialErrors)&&(ra.current=hr.initialErrors||Rl,Jo({type:"SET_ERRORS",payload:hr.initialErrors||Rl}))},[$i,hr.initialErrors]),(0,l.useEffect)(function(){$i&&is.current===!0&&!d()(ga.current,hr.initialTouched)&&(ga.current=hr.initialTouched||mc,Jo({type:"SET_TOUCHED",payload:hr.initialTouched||mc}))},[$i,hr.initialTouched]),(0,l.useEffect)(function(){$i&&is.current===!0&&!d()(ws.current,hr.initialStatus)&&(ws.current=hr.initialStatus,Jo({type:"SET_STATUS",payload:hr.initialStatus}))},[$i,hr.initialStatus,hr.initialTouched]);var Pf=Va(function(sr){if(Ia.current[sr]&&Qs(Ia.current[sr].validate)){var pi=cs(Qo.values,sr),Mi=Ia.current[sr].validate(pi);return xf(Mi)?(Jo({type:"SET_ISVALIDATING",payload:!0}),Mi.then(function(Gi){return Gi}).then(function(Gi){Jo({type:"SET_FIELD_ERROR",payload:{field:sr,value:Gi}}),Jo({type:"SET_ISVALIDATING",payload:!1})})):(Jo({type:"SET_FIELD_ERROR",payload:{field:sr,value:Mi}}),Promise.resolve(Mi))}else if(hr.validationSchema)return Jo({type:"SET_ISVALIDATING",payload:!0}),bc(Qo.values,sr).then(function(Gi){return Gi}).then(function(Gi){Jo({type:"SET_FIELD_ERROR",payload:{field:sr,value:cs(Gi,sr)}}),Jo({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),Ha=(0,l.useCallback)(function(sr,pi){var Mi=pi.validate;Ia.current[sr]={validate:Mi}},[]),Af=(0,l.useCallback)(function(sr){delete Ia.current[sr]},[]),Ll=Va(function(sr,pi){Jo({type:"SET_TOUCHED",payload:sr});var Mi=pi===void 0?gn:pi;return Mi?qs(Qo.values):Promise.resolve()}),zf=(0,l.useCallback)(function(sr){Jo({type:"SET_ERRORS",payload:sr})},[]),ku=Va(function(sr,pi){var Mi=Qs(sr)?sr(Qo.values):sr;Jo({type:"SET_VALUES",payload:Mi});var Gi=pi===void 0?Wt:pi;return Gi?qs(Mi):Promise.resolve()}),ju=(0,l.useCallback)(function(sr,pi){Jo({type:"SET_FIELD_ERROR",payload:{field:sr,value:pi}})},[]),xu=Va(function(sr,pi,Mi){Jo({type:"SET_FIELD_VALUE",payload:{field:sr,value:pi}});var Gi=Mi===void 0?Wt:Mi;return Gi?qs(Ra(Qo.values,sr,pi)):Promise.resolve()}),Rf=(0,l.useCallback)(function(sr,pi){var Mi=pi,Gi=sr,ao;if(!$u(sr)){sr.persist&&sr.persist();var Io=sr.target?sr.target:sr.currentTarget,os=Io.type,Hl=Io.name,Cu=Io.id,Cc=Io.value,Jc=Io.checked,Xc=Io.outerHTML,va=Io.options,Zl=Io.multiple;Mi=pi||Hl||Cu,Gi=/number|range/.test(os)?(ao=parseFloat(Cc),isNaN(ao)?"":ao):/checkbox/.test(os)?Of(cs(Qo.values,Mi),Jc,Cc):va&&Zl?Sf(va):Cc}Mi&&xu(Mi,Gi)},[xu,Qo.values]),Uu=Va(function(sr){if($u(sr))return function(pi){return Rf(pi,sr)};Rf(sr)}),Za=Va(function(sr,pi,Mi){pi===void 0&&(pi=!0),Jo({type:"SET_FIELD_TOUCHED",payload:{field:sr,value:pi}});var Gi=Mi===void 0?gn:Mi;return Gi?qs(Qo.values):Promise.resolve()}),xc=(0,l.useCallback)(function(sr,pi){sr.persist&&sr.persist();var Mi=sr.target,Gi=Mi.name,ao=Mi.id,Io=Mi.outerHTML,os=pi||Gi||ao;Za(os,!0)},[Za]),Ka=Va(function(sr){if($u(sr))return function(pi){return xc(pi,sr)};xc(sr)}),$o=(0,l.useCallback)(function(sr){Qs(sr)?Jo({type:"SET_FORMIK_STATE",payload:sr}):Jo({type:"SET_FORMIK_STATE",payload:function(){return sr}})},[]),Bs=(0,l.useCallback)(function(sr){Jo({type:"SET_STATUS",payload:sr})},[]),ks=(0,l.useCallback)(function(sr){Jo({type:"SET_ISSUBMITTING",payload:sr})},[]),zs=Va(function(){return Jo({type:"SUBMIT_ATTEMPT"}),qs().then(function(sr){var pi=sr instanceof Error,Mi=!pi&&Object.keys(sr).length===0;if(Mi){var Gi;try{if(Gi=Vs(),Gi===void 0)return}catch(ao){throw ao}return Promise.resolve(Gi).then(function(ao){return is.current&&Jo({type:"SUBMIT_SUCCESS"}),ao}).catch(function(ao){if(is.current)throw Jo({type:"SUBMIT_FAILURE"}),ao})}else if(is.current&&(Jo({type:"SUBMIT_FAILURE"}),pi))throw sr})}),Ga=Va(function(sr){if(sr&&sr.preventDefault&&Qs(sr.preventDefault)&&sr.preventDefault(),sr&&sr.stopPropagation&&Qs(sr.stopPropagation)&&sr.stopPropagation(),!1)var pi;zs().catch(function(Mi){console.warn("Warning: An unhandled error was caught from submitForm()",Mi)})}),Wu={resetForm:Bu,validateForm:qs,validateField:Pf,setErrors:zf,setFieldError:ju,setFieldTouched:Za,setFieldValue:xu,setStatus:Bs,setSubmitting:ks,setTouched:Ll,setValues:ku,setFormikState:$o,submitForm:zs},Vs=Va(function(){var sr=Bf(hr.validationSchema),pi=sr&&sr.cast?sr.cast(Qo.values):Qo.values;return Lo(pi,Wu)}),Qc=Va(function(sr){sr&&sr.preventDefault&&Qs(sr.preventDefault)&&sr.preventDefault(),sr&&sr.stopPropagation&&Qs(sr.stopPropagation)&&sr.stopPropagation(),Bu()}),zu=(0,l.useCallback)(function(sr){return{value:cs(Qo.values,sr),error:cs(Qo.errors,sr),touched:!!cs(Qo.touched,sr),initialValue:cs(ns.current,sr),initialTouched:!!cs(ga.current,sr),initialError:cs(ra.current,sr)}},[Qo.errors,Qo.touched,Qo.values]),Vu=(0,l.useCallback)(function(sr){return{setValue:function(Mi,Gi){return xu(sr,Mi,Gi)},setTouched:function(Mi,Gi){return Za(sr,Mi,Gi)},setError:function(Mi){return ju(sr,Mi)}}},[xu,Za,ju]),Vf=(0,l.useCallback)(function(sr){var pi=Wl(sr),Mi=pi?sr.name:sr,Gi=cs(Qo.values,Mi),ao={name:Mi,value:Gi,onChange:Uu,onBlur:Ka};if(pi){var Io=sr.type,os=sr.value,Hl=sr.as,Cu=sr.multiple;Io==="checkbox"?os===void 0?ao.checked=!!Gi:(ao.checked=!!(Array.isArray(Gi)&&~Gi.indexOf(os)),ao.value=os):Io==="radio"?(ao.checked=Gi===os,ao.value=os):Hl==="select"&&Cu&&(ao.value=ao.value||[],ao.multiple=!0)}return ao},[Ka,Uu,Qo.values]),gl=(0,l.useMemo)(function(){return!d()(ns.current,Qo.values)},[ns.current,Qo.values]),Ma=(0,l.useMemo)(function(){return typeof ri<"u"?gl?Qo.errors&&Object.keys(Qo.errors).length===0:ri!==!1&&Qs(ri)?ri(hr):ri:Qo.errors&&Object.keys(Qo.errors).length===0},[ri,gl,Qo.errors,hr]),Hu=zo({},Qo,{initialValues:ns.current,initialErrors:ra.current,initialTouched:ga.current,initialStatus:ws.current,handleBlur:Ka,handleChange:Uu,handleReset:Qc,handleSubmit:Ga,resetForm:Bu,setErrors:zf,setFormikState:$o,setFieldTouched:Za,setFieldValue:xu,setFieldError:ju,setStatus:Bs,setSubmitting:ks,setTouched:Ll,setValues:ku,submitForm:zs,validateForm:qs,validateField:Pf,isValid:Ma,dirty:gl,unregisterField:Af,registerField:Ha,getFieldProps:Vf,getFieldMeta:zu,getFieldHelpers:Vu,validateOnBlur:gn,validateOnChange:Wt,validateOnMount:dr});return Hu}function Il(ce){var et=Cf(ce),Wt=ce.component,mn=ce.children,gn=ce.render,nr=ce.innerRef;return(0,l.useImperativeHandle)(nr,function(){return et}),(0,l.createElement)(Ff,{value:et},Wt?(0,l.createElement)(Wt,et):gn?gn(et):mn?Qs(mn)?mn(et):Vc(mn)?null:l.Children.only(mn):null)}function Bf(ce){if(ce)return Qs(ce)?ce():ce}function ed(ce){var et=ce.htmlContent,Wt=ce.documentationAnchorLink,mn=ce.handlerName;console.warn("Warning: Formik called `"+mn+"`, but you forgot to pass an `id` or `name` attribute to your input:\n "+et+`
1131
1131
  Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#`+Wt+`
1132
- `)}function Mf(ce){var et={};if(ce.inner){if(ce.inner.length===0)return Ra(et,ce.path,ce.message);for(var gn=ce.inner,Wt=Array.isArray(gn),mn=0,gn=Wt?gn:gn[Symbol.iterator]();;){var nr;if(Wt){if(mn>=gn.length)break;nr=gn[mn++]}else{if(mn=gn.next(),mn.done)break;nr=mn.value}var dr=nr;cs(et,dr.path)||(et=Ra(et,dr.path,dr.message))}}return et}function gc(ce,et,Wt,mn){Wt===void 0&&(Wt=!1);var gn=Js(ce);return et[Wt?"validateSync":"validate"](gn,{abortEarly:!1,context:mn||gn})}function Js(ce){var et=Array.isArray(ce)?[]:{};for(var Wt in ce)if(Object.prototype.hasOwnProperty.call(ce,Wt)){var mn=String(Wt);Array.isArray(ce[mn])===!0?et[mn]=ce[mn].map(function(gn){return Array.isArray(gn)===!0||kt(gn)?Js(gn):gn!==""?gn:void 0}):kt(ce[mn])?et[mn]=Js(ce[mn]):et[mn]=ce[mn]!==""?ce[mn]:void 0}return et}function ma(ce,et,Wt){var mn=ce.slice();return et.forEach(function(nr,dr){if(typeof mn[dr]>"u"){var ri=Wt.clone!==!1,Ki=ri&&Wt.isMergeableObject(nr);mn[dr]=Ki?L(Array.isArray(nr)?[]:{},nr,Wt):nr}else Wt.isMergeableObject(nr)?mn[dr]=L(ce[dr],nr,Wt):ce.indexOf(nr)===-1&&mn.push(nr)}),mn}function Sf(ce){return Array.from(ce).filter(function(et){return et.selected}).map(function(et){return et.value})}function Of(ce,et,Wt){if(typeof ce=="boolean")return Boolean(et);var mn=[],gn=!1,nr=-1;if(Array.isArray(ce))mn=ce,nr=ce.indexOf(Wt),gn=nr>=0;else if(!Wt||Wt=="true"||Wt=="false")return Boolean(et);return et&&Wt&&!gn?mn.concat(Wt):gn?mn.slice(0,nr).concat(mn.slice(nr+1)):mn}var kf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?l.useLayoutEffect:l.useEffect;function Va(ce){var et=(0,l.useRef)(ce);return kf(function(){et.current=ce}),(0,l.useCallback)(function(){for(var Wt=arguments.length,mn=new Array(Wt),gn=0;gn<Wt;gn++)mn[gn]=arguments[gn];return et.current.apply(void 0,mn)},[])}function vc(ce){var et=Wl(),Wt=et.getFieldProps,mn=et.getFieldMeta,gn=et.getFieldHelpers,nr=et.registerField,dr=et.unregisterField,ri=Ul(ce),Ki=ri?ce:{name:ce},$i=Ki.name,Lo=Ki.validate;(0,l.useEffect)(function(){return $i&&nr($i,{validate:Lo}),function(){$i&&dr($i)}},[nr,dr,$i,Lo]),$i||Pl(!1);var xo=(0,l.useMemo)(function(){return gn($i)},[gn,$i]);return[Wt(Ki),mn($i),xo]}function yc(ce){var et=ce.validate,Wt=ce.name,mn=ce.render,gn=ce.children,nr=ce.as,dr=ce.component,ri=Al(ce,["validate","name","render","children","as","component"]),Ki=Wl(),$i=Al(Ki,["validate","validationSchema"]),Lo=$i.registerField,xo=$i.unregisterField;(0,l.useEffect)(function(){return Lo(Wt,{validate:et}),function(){xo(Wt)}},[Lo,xo,Wt,et]);var hr=$i.getFieldProps(zo({name:Wt},ri)),ns=$i.getFieldMeta(Wt),ra={field:hr,form:$i};if(mn)return mn(zo({},ra,{meta:ns}));if(Qs(gn))return gn(zo({},ra,{meta:ns}));if(dr){if(typeof dr=="string"){var ga=ri.innerRef,ws=Al(ri,["innerRef"]);return(0,l.createElement)(dr,zo({ref:ga},hr,ws),gn)}return(0,l.createElement)(dr,zo({field:hr,form:$i},ri),gn)}var is=nr||"input";if(typeof is=="string"){var Ia=ri.innerRef,bu=Al(ri,["innerRef"]);return(0,l.createElement)(is,zo({ref:Ia},hr,bu),gn)}return(0,l.createElement)(is,zo({},hr,ri),gn)}var Zc=(0,l.forwardRef)(function(ce,et){var Wt=ce.action,mn=Al(ce,["action"]),gn=Wt??"#",nr=Wl(),dr=nr.handleReset,ri=nr.handleSubmit;return(0,l.createElement)("form",Object.assign({onSubmit:ri,ref:et,onReset:dr,action:gn},mn))});Zc.displayName="Form";function Nu(ce){var et=ce.mapPropsToValues,Wt=et===void 0?function(gn){var nr={};for(var dr in gn)gn.hasOwnProperty(dr)&&typeof gn[dr]!="function"&&(nr[dr]=gn[dr]);return nr}:et,mn=Al(ce,["mapPropsToValues"]);return function(nr){var dr=nr.displayName||nr.name||nr.constructor&&nr.constructor.name||"Component",ri=function(Ki){$f($i,Ki);function $i(){var xo;return xo=Ki.apply(this,arguments)||this,xo.validate=function(hr){return mn.validate(hr,xo.props)},xo.validationSchema=function(){return Qs(mn.validationSchema)?mn.validationSchema(xo.props):mn.validationSchema},xo.handleSubmit=function(hr,ns){return mn.handleSubmit(hr,zo({},ns,{props:xo.props}))},xo.renderFormComponent=function(hr){return createElement(nr,Object.assign({},xo.props,hr))},xo}var Lo=$i.prototype;return Lo.render=function(){var hr=this.props,ns=Al(hr,["children"]);return createElement(Il,Object.assign({},ns,mn,{validate:mn.validate&&this.validate,validationSchema:mn.validationSchema&&this.validationSchema,initialValues:Wt(this.props),initialStatus:mn.mapPropsToStatus&&mn.mapPropsToStatus(this.props),initialErrors:mn.mapPropsToErrors&&mn.mapPropsToErrors(this.props),initialTouched:mn.mapPropsToTouched&&mn.mapPropsToTouched(this.props),onSubmit:this.handleSubmit,children:this.renderFormComponent}))},$i}(Component);return ri.displayName="WithFormik("+dr+")",hoistNonReactStatics(ri,nr)}}function jf(ce){var et=function(gn){return(0,l.createElement)(Hc,null,function(nr){return nr||Pl(!1),(0,l.createElement)(ce,Object.assign({},gn,{formik:nr}))})},Wt=ce.displayName||ce.name||ce.constructor&&ce.constructor.name||"Component";return et.WrappedComponent=ce,et.displayName="FormikConnect("+Wt+")",tu()(et,ce)}var Tf=function(et,Wt,mn){var gn=zl(et),nr=gn[Wt];return gn.splice(Wt,1),gn.splice(mn,0,nr),gn},wf=function(et,Wt,mn){var gn=zl(et),nr=gn[Wt];return gn[Wt]=gn[mn],gn[mn]=nr,gn},Ec=function(et,Wt,mn){var gn=zl(et);return gn.splice(Wt,0,mn),gn},Uf=function(et,Wt,mn){var gn=zl(et);return gn[Wt]=mn,gn},zl=function(et){if(et){if(Array.isArray(et))return[].concat(et);var Wt=Object.keys(et).map(function(mn){return parseInt(mn)}).reduce(function(mn,gn){return gn>mn?gn:mn},0);return Array.from(zo({},et,{length:Wt+1}))}else return[]},Kc=function(et,Wt){var mn=typeof et=="function"?et:Wt;return function(gn){if(Array.isArray(gn)||Ul(gn)){var nr=zl(gn);return mn(nr)}return gn}},Wf=function(ce){$f(et,ce);function et(mn){var gn;return gn=ce.call(this,mn)||this,gn.updateArrayField=function(nr,dr,ri){var Ki=gn.props,$i=Ki.name,Lo=Ki.formik.setFormikState;Lo(function(xo){var hr=Kc(ri,nr),ns=Kc(dr,nr),ra=Ra(xo.values,$i,nr(cs(xo.values,$i))),ga=ri?hr(cs(xo.errors,$i)):void 0,ws=dr?ns(cs(xo.touched,$i)):void 0;return bf(ga)&&(ga=void 0),bf(ws)&&(ws=void 0),zo({},xo,{values:ra,errors:ri?Ra(xo.errors,$i,ga):xo.errors,touched:dr?Ra(xo.touched,$i,ws):xo.touched})})},gn.push=function(nr){return gn.updateArrayField(function(dr){return[].concat(zl(dr),[Ef(nr)])},!1,!1)},gn.handlePush=function(nr){return function(){return gn.push(nr)}},gn.swap=function(nr,dr){return gn.updateArrayField(function(ri){return wf(ri,nr,dr)},!0,!0)},gn.handleSwap=function(nr,dr){return function(){return gn.swap(nr,dr)}},gn.move=function(nr,dr){return gn.updateArrayField(function(ri){return Tf(ri,nr,dr)},!0,!0)},gn.handleMove=function(nr,dr){return function(){return gn.move(nr,dr)}},gn.insert=function(nr,dr){return gn.updateArrayField(function(ri){return Ec(ri,nr,dr)},function(ri){return Ec(ri,nr,null)},function(ri){return Ec(ri,nr,null)})},gn.handleInsert=function(nr,dr){return function(){return gn.insert(nr,dr)}},gn.replace=function(nr,dr){return gn.updateArrayField(function(ri){return Uf(ri,nr,dr)},!1,!1)},gn.handleReplace=function(nr,dr){return function(){return gn.replace(nr,dr)}},gn.unshift=function(nr){var dr=-1;return gn.updateArrayField(function(ri){var Ki=ri?[nr].concat(ri):[nr];return dr<0&&(dr=Ki.length),Ki},function(ri){var Ki=ri?[null].concat(ri):[null];return dr<0&&(dr=Ki.length),Ki},function(ri){var Ki=ri?[null].concat(ri):[null];return dr<0&&(dr=Ki.length),Ki}),dr},gn.handleUnshift=function(nr){return function(){return gn.unshift(nr)}},gn.handleRemove=function(nr){return function(){return gn.remove(nr)}},gn.handlePop=function(){return function(){return gn.pop()}},gn.remove=gn.remove.bind(zc(gn)),gn.pop=gn.pop.bind(zc(gn)),gn}var Wt=et.prototype;return Wt.shouldComponentUpdate=function(gn){return this.props.shouldUpdate?this.props.shouldUpdate(gn,this.props):gn.name!==this.props.name||cs(gn.formik.values,this.props.name)!==cs(this.props.formik.values,this.props.name)||cs(gn.formik.errors,this.props.name)!==cs(this.props.formik.errors,this.props.name)||cs(gn.formik.touched,this.props.name)!==cs(this.props.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(gn).length||gn.formik.isSubmitting!==this.props.formik.isSubmitting},Wt.componentDidUpdate=function(gn){this.props.validateOnChange&&this.props.formik.validateOnChange&&!d()(cs(gn.formik.values,gn.name),cs(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},Wt.remove=function(gn){var nr;return this.updateArrayField(function(dr){var ri=dr?zl(dr):[];return nr||(nr=ri[gn]),Qs(ri.splice)&&ri.splice(gn,1),Qs(ri.every)&&ri.every(function(Ki){return Ki===void 0})?[]:ri},!0,!0),nr},Wt.pop=function(){var gn;return this.updateArrayField(function(nr){var dr=nr.slice();return gn||(gn=dr&&dr.pop&&dr.pop()),dr},!0,!0),gn},Wt.render=function(){var gn={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},nr=this.props,dr=nr.component,ri=nr.render,Ki=nr.children,$i=nr.name,Lo=nr.formik,xo=Al(Lo,["validate","validationSchema"]),hr=zo({},gn,{form:xo,name:$i});return dr?(0,l.createElement)(dr,hr):ri?ri(hr):Ki?typeof Ki=="function"?Ki(hr):Vc(Ki)?null:l.Children.only(Ki):null},et}(l.Component);Wf.defaultProps={validateOnChange:!0};var Fu=jf(Wf),td=null,nd=null,Gc=null,nu=null},62521:function(_){"use strict";var b="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,l=Object.prototype.toString,f="[object Function]";_.exports=function(g){var E=this;if(typeof E!="function"||l.call(E)!==f)throw new TypeError(b+E);for(var m=i.call(arguments,1),C,x=function(){if(this instanceof C){var R=E.apply(this,m.concat(i.call(arguments)));return Object(R)===R?R:this}else return E.apply(g,m.concat(i.call(arguments)))},P=Math.max(0,E.length-m.length),T=[],O=0;O<P;O++)T.push("$"+O);if(C=Function("binder","return function ("+T.join(",")+"){ return binder.apply(this,arguments); }")(x),E.prototype){var w=function(){};w.prototype=E.prototype,C.prototype=new w,w.prototype=null}return C}},37156:function(_,b,i){"use strict";var l=i(62521);_.exports=Function.prototype.bind||l},10465:function(_,b,i){"use strict";var l=typeof Symbol<"u"&&Symbol,f=i(16073);_.exports=function(){return typeof l!="function"||typeof Symbol!="function"||typeof l("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:f()}},16073:function(_){"use strict";_.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var i={},l=Symbol("test"),f=Object(l);if(typeof l=="string"||Object.prototype.toString.call(l)!=="[object Symbol]"||Object.prototype.toString.call(f)!=="[object Symbol]")return!1;var d=42;i[l]=d;for(l in i)return!1;if(typeof Object.keys=="function"&&Object.keys(i).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(i).length!==0)return!1;var g=Object.getOwnPropertySymbols(i);if(g.length!==1||g[0]!==l||!Object.prototype.propertyIsEnumerable.call(i,l))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var E=Object.getOwnPropertyDescriptor(i,l);if(E.value!==d||E.enumerable!==!0)return!1}return!0}},98776:function(_,b,i){"use strict";var l=i(37156);_.exports=l.call(Function.call,Object.prototype.hasOwnProperty)},88710:function(_,b,i){"use strict";i.d(b,{lX:function(){return le},q_:function(){return Ae},ob:function(){return $},PP:function(){return Pe},Ep:function(){return L},Hp:function(){return U}});var l=i(20011);function f(ye){return ye.charAt(0)==="/"}function d(ye,Ee){for(var _e=Ee,We=_e+1,Ie=ye.length;We<Ie;_e+=1,We+=1)ye[_e]=ye[We];ye.pop()}function g(ye,Ee){Ee===void 0&&(Ee="");var _e=ye&&ye.split("/")||[],We=Ee&&Ee.split("/")||[],Ie=ye&&f(ye),Fe=Ee&&f(Ee),ut=Ie||Fe;if(ye&&f(ye)?We=_e:_e.length&&(We.pop(),We=We.concat(_e)),!We.length)return"/";var ht;if(We.length){var Ot=We[We.length-1];ht=Ot==="."||Ot===".."||Ot===""}else ht=!1;for(var Ue=0,at=We.length;at>=0;at--){var Pt=We[at];Pt==="."?d(We,at):Pt===".."?(d(We,at),Ue++):Ue&&(d(We,at),Ue--)}if(!ut)for(;Ue--;Ue)We.unshift("..");ut&&We[0]!==""&&(!We[0]||!f(We[0]))&&We.unshift("");var lt=We.join("/");return ht&&lt.substr(-1)!=="/"&&(lt+="/"),lt}var E=g;function m(ye){return ye.valueOf?ye.valueOf():Object.prototype.valueOf.call(ye)}function C(ye,Ee){if(ye===Ee)return!0;if(ye==null||Ee==null)return!1;if(Array.isArray(ye))return Array.isArray(Ee)&&ye.length===Ee.length&&ye.every(function(Ie,Fe){return C(Ie,Ee[Fe])});if(typeof ye=="object"||typeof Ee=="object"){var _e=m(ye),We=m(Ee);return _e!==ye||We!==Ee?C(_e,We):Object.keys(Object.assign({},ye,Ee)).every(function(Ie){return C(ye[Ie],Ee[Ie])})}return!1}var x=C,P=i(56720);function T(ye){return ye.charAt(0)==="/"?ye:"/"+ye}function O(ye){return ye.charAt(0)==="/"?ye.substr(1):ye}function w(ye,Ee){return ye.toLowerCase().indexOf(Ee.toLowerCase())===0&&"/?#".indexOf(ye.charAt(Ee.length))!==-1}function R(ye,Ee){return w(ye,Ee)?ye.substr(Ee.length):ye}function F(ye){return ye.charAt(ye.length-1)==="/"?ye.slice(0,-1):ye}function V(ye){var Ee=ye||"/",_e="",We="",Ie=Ee.indexOf("#");Ie!==-1&&(We=Ee.substr(Ie),Ee=Ee.substr(0,Ie));var Fe=Ee.indexOf("?");return Fe!==-1&&(_e=Ee.substr(Fe),Ee=Ee.substr(0,Fe)),{pathname:Ee,search:_e==="?"?"":_e,hash:We==="#"?"":We}}function L(ye){var Ee=ye.pathname,_e=ye.search,We=ye.hash,Ie=Ee||"/";return _e&&_e!=="?"&&(Ie+=_e.charAt(0)==="?"?_e:"?"+_e),We&&We!=="#"&&(Ie+=We.charAt(0)==="#"?We:"#"+We),Ie}function $(ye,Ee,_e,We){var Ie;typeof ye=="string"?(Ie=V(ye),Ie.state=Ee):(Ie=(0,l.Z)({},ye),Ie.pathname===void 0&&(Ie.pathname=""),Ie.search?Ie.search.charAt(0)!=="?"&&(Ie.search="?"+Ie.search):Ie.search="",Ie.hash?Ie.hash.charAt(0)!=="#"&&(Ie.hash="#"+Ie.hash):Ie.hash="",Ee!==void 0&&Ie.state===void 0&&(Ie.state=Ee));try{Ie.pathname=decodeURI(Ie.pathname)}catch(Fe){throw Fe instanceof URIError?new URIError('Pathname "'+Ie.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):Fe}return _e&&(Ie.key=_e),We?Ie.pathname?Ie.pathname.charAt(0)!=="/"&&(Ie.pathname=E(Ie.pathname,We.pathname)):Ie.pathname=We.pathname:Ie.pathname||(Ie.pathname="/"),Ie}function U(ye,Ee){return ye.pathname===Ee.pathname&&ye.search===Ee.search&&ye.hash===Ee.hash&&ye.key===Ee.key&&x(ye.state,Ee.state)}function N(){var ye=null;function Ee(ut){return ye=ut,function(){ye===ut&&(ye=null)}}function _e(ut,ht,Ot,Ue){if(ye!=null){var at=typeof ye=="function"?ye(ut,ht):ye;typeof at=="string"?typeof Ot=="function"?Ot(at,Ue):Ue(!0):Ue(at!==!1)}else Ue(!0)}var We=[];function Ie(ut){var ht=!0;function Ot(){ht&&ut.apply(void 0,arguments)}return We.push(Ot),function(){ht=!1,We=We.filter(function(Ue){return Ue!==Ot})}}function Fe(){for(var ut=arguments.length,ht=new Array(ut),Ot=0;Ot<ut;Ot++)ht[Ot]=arguments[Ot];We.forEach(function(Ue){return Ue.apply(void 0,ht)})}return{setPrompt:Ee,confirmTransitionTo:_e,appendListener:Ie,notifyListeners:Fe}}var k=!!(typeof window<"u"&&window.document&&window.document.createElement);function j(ye,Ee){Ee(window.confirm(ye))}function z(){var ye=window.navigator.userAgent;return(ye.indexOf("Android 2.")!==-1||ye.indexOf("Android 4.0")!==-1)&&ye.indexOf("Mobile Safari")!==-1&&ye.indexOf("Chrome")===-1&&ye.indexOf("Windows Phone")===-1?!1:window.history&&"pushState"in window.history}function K(){return window.navigator.userAgent.indexOf("Trident")===-1}function G(){return window.navigator.userAgent.indexOf("Firefox")===-1}function Y(ye){return ye.state===void 0&&navigator.userAgent.indexOf("CriOS")===-1}var ae="popstate",Ce="hashchange";function J(){try{return window.history.state||{}}catch{return{}}}function le(ye){ye===void 0&&(ye={}),k||(0,P.Z)(!1);var Ee=window.history,_e=z(),We=!K(),Ie=ye,Fe=Ie.forceRefresh,ut=Fe===void 0?!1:Fe,ht=Ie.getUserConfirmation,Ot=ht===void 0?j:ht,Ue=Ie.keyLength,at=Ue===void 0?6:Ue,Pt=ye.basename?F(T(ye.basename)):"";function lt(pt){var $e=pt||{},Re=$e.key,Be=$e.state,Ne=window.location,bt=Ne.pathname,Kt=Ne.search,an=Ne.hash,In=bt+Kt+an;return Pt&&(In=R(In,Pt)),$(In,Be,Re)}function kt(){return Math.random().toString(36).substr(2,at)}var nn=N();function hn(pt){(0,l.Z)(Ze,pt),Ze.length=Ee.length,nn.notifyListeners(Ze.location,Ze.action)}function Rn(pt){Y(pt)||yn(lt(pt.state))}function kn(){yn(lt(J()))}var $t=!1;function yn(pt){if($t)$t=!1,hn();else{var $e="POP";nn.confirmTransitionTo(pt,$e,Ot,function(Re){Re?hn({action:$e,location:pt}):Yn(pt)})}}function Yn(pt){var $e=Ze.location,Re=st.indexOf($e.key);Re===-1&&(Re=0);var Be=st.indexOf(pt.key);Be===-1&&(Be=0);var Ne=Re-Be;Ne&&($t=!0,Ht(Ne))}var cn=lt(J()),st=[cn.key];function on(pt){return Pt+L(pt)}function dt(pt,$e){var Re="PUSH",Be=$(pt,$e,kt(),Ze.location);nn.confirmTransitionTo(Be,Re,Ot,function(Ne){if(Ne){var bt=on(Be),Kt=Be.key,an=Be.state;if(_e)if(Ee.pushState({key:Kt,state:an},null,bt),ut)window.location.href=bt;else{var In=st.indexOf(Ze.location.key),rr=st.slice(0,In+1);rr.push(Be.key),st=rr,hn({action:Re,location:Be})}else window.location.href=bt}})}function Dt(pt,$e){var Re="REPLACE",Be=$(pt,$e,kt(),Ze.location);nn.confirmTransitionTo(Be,Re,Ot,function(Ne){if(Ne){var bt=on(Be),Kt=Be.key,an=Be.state;if(_e)if(Ee.replaceState({key:Kt,state:an},null,bt),ut)window.location.replace(bt);else{var In=st.indexOf(Ze.location.key);In!==-1&&(st[In]=Be.key),hn({action:Re,location:Be})}else window.location.replace(bt)}})}function Ht(pt){Ee.go(pt)}function rn(){Ht(-1)}function ke(){Ht(1)}var ct=0;function D(pt){ct+=pt,ct===1&&pt===1?(window.addEventListener(ae,Rn),We&&window.addEventListener(Ce,kn)):ct===0&&(window.removeEventListener(ae,Rn),We&&window.removeEventListener(Ce,kn))}var W=!1;function re(pt){pt===void 0&&(pt=!1);var $e=nn.setPrompt(pt);return W||(D(1),W=!0),function(){return W&&(W=!1,D(-1)),$e()}}function Oe(pt){var $e=nn.appendListener(pt);return D(1),function(){D(-1),$e()}}var Ze={length:Ee.length,action:"POP",location:cn,createHref:on,push:dt,replace:Dt,go:Ht,goBack:rn,goForward:ke,block:re,listen:Oe};return Ze}var be="hashchange",te={hashbang:{encodePath:function(Ee){return Ee.charAt(0)==="!"?Ee:"!/"+O(Ee)},decodePath:function(Ee){return Ee.charAt(0)==="!"?Ee.substr(1):Ee}},noslash:{encodePath:O,decodePath:T},slash:{encodePath:T,decodePath:T}};function q(ye){var Ee=ye.indexOf("#");return Ee===-1?ye:ye.slice(0,Ee)}function ee(){var ye=window.location.href,Ee=ye.indexOf("#");return Ee===-1?"":ye.substring(Ee+1)}function Se(ye){window.location.hash=ye}function tt(ye){window.location.replace(q(window.location.href)+"#"+ye)}function Ae(ye){ye===void 0&&(ye={}),k||(0,P.Z)(!1);var Ee=window.history,_e=G(),We=ye,Ie=We.getUserConfirmation,Fe=Ie===void 0?j:Ie,ut=We.hashType,ht=ut===void 0?"slash":ut,Ot=ye.basename?F(T(ye.basename)):"",Ue=te[ht],at=Ue.encodePath,Pt=Ue.decodePath;function lt(){var Re=Pt(ee());return Ot&&(Re=R(Re,Ot)),$(Re)}var kt=N();function nn(Re){(0,l.Z)($e,Re),$e.length=Ee.length,kt.notifyListeners($e.location,$e.action)}var hn=!1,Rn=null;function kn(Re,Be){return Re.pathname===Be.pathname&&Re.search===Be.search&&Re.hash===Be.hash}function $t(){var Re=ee(),Be=at(Re);if(Re!==Be)tt(Be);else{var Ne=lt(),bt=$e.location;if(!hn&&kn(bt,Ne)||Rn===L(Ne))return;Rn=null,yn(Ne)}}function yn(Re){if(hn)hn=!1,nn();else{var Be="POP";kt.confirmTransitionTo(Re,Be,Fe,function(Ne){Ne?nn({action:Be,location:Re}):Yn(Re)})}}function Yn(Re){var Be=$e.location,Ne=dt.lastIndexOf(L(Be));Ne===-1&&(Ne=0);var bt=dt.lastIndexOf(L(Re));bt===-1&&(bt=0);var Kt=Ne-bt;Kt&&(hn=!0,ke(Kt))}var cn=ee(),st=at(cn);cn!==st&&tt(st);var on=lt(),dt=[L(on)];function Dt(Re){var Be=document.querySelector("base"),Ne="";return Be&&Be.getAttribute("href")&&(Ne=q(window.location.href)),Ne+"#"+at(Ot+L(Re))}function Ht(Re,Be){var Ne="PUSH",bt=$(Re,void 0,void 0,$e.location);kt.confirmTransitionTo(bt,Ne,Fe,function(Kt){if(Kt){var an=L(bt),In=at(Ot+an),rr=ee()!==In;if(rr){Rn=an,Se(In);var Wn=dt.lastIndexOf(L($e.location)),gr=dt.slice(0,Wn+1);gr.push(an),dt=gr,nn({action:Ne,location:bt})}else nn()}})}function rn(Re,Be){var Ne="REPLACE",bt=$(Re,void 0,void 0,$e.location);kt.confirmTransitionTo(bt,Ne,Fe,function(Kt){if(Kt){var an=L(bt),In=at(Ot+an),rr=ee()!==In;rr&&(Rn=an,tt(In));var Wn=dt.indexOf(L($e.location));Wn!==-1&&(dt[Wn]=an),nn({action:Ne,location:bt})}})}function ke(Re){Ee.go(Re)}function ct(){ke(-1)}function D(){ke(1)}var W=0;function re(Re){W+=Re,W===1&&Re===1?window.addEventListener(be,$t):W===0&&window.removeEventListener(be,$t)}var Oe=!1;function Ze(Re){Re===void 0&&(Re=!1);var Be=kt.setPrompt(Re);return Oe||(re(1),Oe=!0),function(){return Oe&&(Oe=!1,re(-1)),Be()}}function pt(Re){var Be=kt.appendListener(Re);return re(1),function(){re(-1),Be()}}var $e={length:Ee.length,action:"POP",location:on,createHref:Dt,push:Ht,replace:rn,go:ke,goBack:ct,goForward:D,block:Ze,listen:pt};return $e}function pe(ye,Ee,_e){return Math.min(Math.max(ye,Ee),_e)}function Pe(ye){ye===void 0&&(ye={});var Ee=ye,_e=Ee.getUserConfirmation,We=Ee.initialEntries,Ie=We===void 0?["/"]:We,Fe=Ee.initialIndex,ut=Fe===void 0?0:Fe,ht=Ee.keyLength,Ot=ht===void 0?6:ht,Ue=N();function at(dt){(0,l.Z)(on,dt),on.length=on.entries.length,Ue.notifyListeners(on.location,on.action)}function Pt(){return Math.random().toString(36).substr(2,Ot)}var lt=pe(ut,0,Ie.length-1),kt=Ie.map(function(dt){return typeof dt=="string"?$(dt,void 0,Pt()):$(dt,void 0,dt.key||Pt())}),nn=L;function hn(dt,Dt){var Ht="PUSH",rn=$(dt,Dt,Pt(),on.location);Ue.confirmTransitionTo(rn,Ht,_e,function(ke){if(ke){var ct=on.index,D=ct+1,W=on.entries.slice(0);W.length>D?W.splice(D,W.length-D,rn):W.push(rn),at({action:Ht,location:rn,index:D,entries:W})}})}function Rn(dt,Dt){var Ht="REPLACE",rn=$(dt,Dt,Pt(),on.location);Ue.confirmTransitionTo(rn,Ht,_e,function(ke){ke&&(on.entries[on.index]=rn,at({action:Ht,location:rn}))})}function kn(dt){var Dt=pe(on.index+dt,0,on.entries.length-1),Ht="POP",rn=on.entries[Dt];Ue.confirmTransitionTo(rn,Ht,_e,function(ke){ke?at({action:Ht,location:rn,index:Dt}):at()})}function $t(){kn(-1)}function yn(){kn(1)}function Yn(dt){var Dt=on.index+dt;return Dt>=0&&Dt<on.entries.length}function cn(dt){return dt===void 0&&(dt=!1),Ue.setPrompt(dt)}function st(dt){return Ue.appendListener(dt)}var on={length:kt.length,action:"POP",location:kt[lt],index:lt,entries:kt,createHref:nn,push:hn,replace:Rn,go:kn,goBack:$t,goForward:yn,canGo:Yn,block:cn,listen:st};return on}},86058:function(_,b,i){"use strict";var l=i(72594),f={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},d={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},g={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},E={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},m={};m[l.ForwardRef]=g,m[l.Memo]=E;function C(V){return l.isMemo(V)?E:m[V.$$typeof]||f}var x=Object.defineProperty,P=Object.getOwnPropertyNames,T=Object.getOwnPropertySymbols,O=Object.getOwnPropertyDescriptor,w=Object.getPrototypeOf,R=Object.prototype;function F(V,L,$){if(typeof L!="string"){if(R){var U=w(L);U&&U!==R&&F(V,U,$)}var N=P(L);T&&(N=N.concat(T(L)));for(var k=C(V),j=C(L),z=0;z<N.length;++z){var K=N[z];if(!d[K]&&!($&&$[K])&&!(j&&j[K])&&!(k&&k[K])){var G=O(L,K);try{x(V,K,G)}catch{}}}}return V}_.exports=F},97889:function(_,b,i){"use strict";i.d(b,{Uy:function(){return on},Vk:function(){return tt}});function l(D){for(var W=arguments.length,re=Array(W>1?W-1:0),Oe=1;Oe<W;Oe++)re[Oe-1]=arguments[Oe];if(!1)var Ze,pt;throw Error("[Immer] minified error nr: "+D+(re.length?" "+re.map(function($e){return"'"+$e+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function f(D){return!!D&&!!D[lt]}function d(D){var W;return!!D&&(function(re){if(!re||typeof re!="object")return!1;var Oe=Object.getPrototypeOf(re);if(Oe===null)return!0;var Ze=Object.hasOwnProperty.call(Oe,"constructor")&&Oe.constructor;return Ze===Object||typeof Ze=="function"&&Function.toString.call(Ze)===hn}(D)||Array.isArray(D)||!!D[Pt]||!!(!((W=D.constructor)===null||W===void 0)&&W[Pt])||O(D)||w(D))}function g(D){return f(D)||l(23,D),D[lt].t}function E(D,W,re){re===void 0&&(re=!1),m(D)===0?(re?Object.keys:Rn)(D).forEach(function(Oe){re&&typeof Oe=="symbol"||W(Oe,D[Oe],D)}):D.forEach(function(Oe,Ze){return W(Ze,Oe,D)})}function m(D){var W=D[lt];return W?W.i>3?W.i-4:W.i:Array.isArray(D)?1:O(D)?2:w(D)?3:0}function C(D,W){return m(D)===2?D.has(W):Object.prototype.hasOwnProperty.call(D,W)}function x(D,W){return m(D)===2?D.get(W):D[W]}function P(D,W,re){var Oe=m(D);Oe===2?D.set(W,re):Oe===3?D.add(re):D[W]=re}function T(D,W){return D===W?D!==0||1/D==1/W:D!=D&&W!=W}function O(D){return ht&&D instanceof Map}function w(D){return Ot&&D instanceof Set}function R(D){return D.o||D.t}function F(D){if(Array.isArray(D))return Array.prototype.slice.call(D);var W=kn(D);delete W[lt];for(var re=Rn(W),Oe=0;Oe<re.length;Oe++){var Ze=re[Oe],pt=W[Ze];pt.writable===!1&&(pt.writable=!0,pt.configurable=!0),(pt.get||pt.set)&&(W[Ze]={configurable:!0,writable:!0,enumerable:pt.enumerable,value:D[Ze]})}return Object.create(Object.getPrototypeOf(D),W)}function V(D,W){return W===void 0&&(W=!1),$(D)||f(D)||!d(D)||(m(D)>1&&(D.set=D.add=D.clear=D.delete=L),Object.freeze(D),W&&E(D,function(re,Oe){return V(Oe,!0)},!0)),D}function L(){l(2)}function $(D){return D==null||typeof D!="object"||Object.isFrozen(D)}function U(D){var W=$t[D];return W||l(18,D),W}function N(D,W){$t[D]||($t[D]=W)}function k(){return Fe}function j(D,W){W&&(U("Patches"),D.u=[],D.s=[],D.v=W)}function z(D){K(D),D.p.forEach(Y),D.p=null}function K(D){D===Fe&&(Fe=D.l)}function G(D){return Fe={p:[],l:Fe,h:D,m:!0,_:0}}function Y(D){var W=D[lt];W.i===0||W.i===1?W.j():W.O=!0}function ae(D,W){W._=W.p.length;var re=W.p[0],Oe=D!==void 0&&D!==re;return W.h.g||U("ES5").S(W,D,Oe),Oe?(re[lt].P&&(z(W),l(4)),d(D)&&(D=Ce(W,D),W.l||le(W,D)),W.u&&U("Patches").M(re[lt].t,D,W.u,W.s)):D=Ce(W,re,[]),z(W),W.u&&W.v(W.u,W.s),D!==at?D:void 0}function Ce(D,W,re){if($(W))return W;var Oe=W[lt];if(!Oe)return E(W,function(Re,Be){return J(D,Oe,W,Re,Be,re)},!0),W;if(Oe.A!==D)return W;if(!Oe.P)return le(D,Oe.t,!0),Oe.t;if(!Oe.I){Oe.I=!0,Oe.A._--;var Ze=Oe.i===4||Oe.i===5?Oe.o=F(Oe.k):Oe.o,pt=Ze,$e=!1;Oe.i===3&&(pt=new Set(Ze),Ze.clear(),$e=!0),E(pt,function(Re,Be){return J(D,Oe,Ze,Re,Be,re,$e)}),le(D,Ze,!1),re&&D.u&&U("Patches").N(Oe,re,D.u,D.s)}return Oe.o}function J(D,W,re,Oe,Ze,pt,$e){if(f(Ze)){var Re=Ce(D,Ze,pt&&W&&W.i!==3&&!C(W.R,Oe)?pt.concat(Oe):void 0);if(P(re,Oe,Re),!f(Re))return;D.m=!1}else $e&&re.add(Ze);if(d(Ze)&&!$(Ze)){if(!D.h.D&&D._<1)return;Ce(D,Ze),W&&W.A.l||le(D,Ze)}}function le(D,W,re){re===void 0&&(re=!1),!D.l&&D.h.D&&D.m&&V(W,re)}function be(D,W){var re=D[lt];return(re?R(re):D)[W]}function te(D,W){if(W in D)for(var re=Object.getPrototypeOf(D);re;){var Oe=Object.getOwnPropertyDescriptor(re,W);if(Oe)return Oe;re=Object.getPrototypeOf(re)}}function q(D){D.P||(D.P=!0,D.l&&q(D.l))}function ee(D){D.o||(D.o=F(D.t))}function Se(D,W,re){var Oe=O(W)?U("MapSet").F(W,re):w(W)?U("MapSet").T(W,re):D.g?function(Ze,pt){var $e=Array.isArray(Ze),Re={i:$e?1:0,A:pt?pt.A:k(),P:!1,I:!1,R:{},l:pt,t:Ze,k:null,o:null,j:null,C:!1},Be=Re,Ne=yn;$e&&(Be=[Re],Ne=Yn);var bt=Proxy.revocable(Be,Ne),Kt=bt.revoke,an=bt.proxy;return Re.k=an,Re.j=Kt,an}(W,re):U("ES5").J(W,re);return(re?re.A:k()).p.push(Oe),Oe}function tt(D){return f(D)||l(22,D),function W(re){if(!d(re))return re;var Oe,Ze=re[lt],pt=m(re);if(Ze){if(!Ze.P&&(Ze.i<4||!U("ES5").K(Ze)))return Ze.t;Ze.I=!0,Oe=Ae(re,pt),Ze.I=!1}else Oe=Ae(re,pt);return E(Oe,function($e,Re){Ze&&x(Ze.t,$e)===Re||P(Oe,$e,W(Re))}),pt===3?new Set(Oe):Oe}(D)}function Ae(D,W){switch(W){case 2:return new Map(D);case 3:return Array.from(D)}return F(D)}function pe(){function D($e,Re){var Be=pt[$e];return Be?Be.enumerable=Re:pt[$e]=Be={configurable:!0,enumerable:Re,get:function(){var Ne=this[lt];return yn.get(Ne,$e)},set:function(Ne){var bt=this[lt];yn.set(bt,$e,Ne)}},Be}function W($e){for(var Re=$e.length-1;Re>=0;Re--){var Be=$e[Re][lt];if(!Be.P)switch(Be.i){case 5:Oe(Be)&&q(Be);break;case 4:re(Be)&&q(Be)}}}function re($e){for(var Re=$e.t,Be=$e.k,Ne=Rn(Be),bt=Ne.length-1;bt>=0;bt--){var Kt=Ne[bt];if(Kt!==lt){var an=Re[Kt];if(an===void 0&&!C(Re,Kt))return!0;var In=Be[Kt],rr=In&&In[lt];if(rr?rr.t!==an:!T(In,an))return!0}}var Wn=!!Re[lt];return Ne.length!==Rn(Re).length+(Wn?0:1)}function Oe($e){var Re=$e.k;if(Re.length!==$e.t.length)return!0;var Be=Object.getOwnPropertyDescriptor(Re,Re.length-1);if(Be&&!Be.get)return!0;for(var Ne=0;Ne<Re.length;Ne++)if(!Re.hasOwnProperty(Ne))return!0;return!1}function Ze($e){$e.O&&l(3,JSON.stringify(R($e)))}var pt={};N("ES5",{J:function($e,Re){var Be=Array.isArray($e),Ne=function(Kt,an){if(Kt){for(var In=Array(an.length),rr=0;rr<an.length;rr++)Object.defineProperty(In,""+rr,D(rr,!0));return In}var Wn=kn(an);delete Wn[lt];for(var gr=Rn(Wn),fr=0;fr<gr.length;fr++){var Rr=gr[fr];Wn[Rr]=D(Rr,Kt||!!Wn[Rr].enumerable)}return Object.create(Object.getPrototypeOf(an),Wn)}(Be,$e),bt={i:Be?5:4,A:Re?Re.A:k(),P:!1,I:!1,R:{},l:Re,t:$e,k:Ne,o:null,O:!1,C:!1};return Object.defineProperty(Ne,lt,{value:bt,writable:!0}),Ne},S:function($e,Re,Be){Be?f(Re)&&Re[lt].A===$e&&W($e.p):($e.u&&function Ne(bt){if(bt&&typeof bt=="object"){var Kt=bt[lt];if(Kt){var an=Kt.t,In=Kt.k,rr=Kt.R,Wn=Kt.i;if(Wn===4)E(In,function(ei){ei!==lt&&(an[ei]!==void 0||C(an,ei)?rr[ei]||Ne(In[ei]):(rr[ei]=!0,q(Kt)))}),E(an,function(ei){In[ei]!==void 0||C(In,ei)||(rr[ei]=!1,q(Kt))});else if(Wn===5){if(Oe(Kt)&&(q(Kt),rr.length=!0),In.length<an.length)for(var gr=In.length;gr<an.length;gr++)rr[gr]=!1;else for(var fr=an.length;fr<In.length;fr++)rr[fr]=!0;for(var Rr=Math.min(In.length,an.length),Vr=0;Vr<Rr;Vr++)In.hasOwnProperty(Vr)||(rr[Vr]=!0),rr[Vr]===void 0&&Ne(In[Vr])}}}}($e.p[0]),W($e.p))},K:function($e){return $e.i===4?re($e):Oe($e)}})}function Pe(){function D(Oe){if(!d(Oe))return Oe;if(Array.isArray(Oe))return Oe.map(D);if(O(Oe))return new Map(Array.from(Oe.entries()).map(function($e){return[$e[0],D($e[1])]}));if(w(Oe))return new Set(Array.from(Oe).map(D));var Ze=Object.create(Object.getPrototypeOf(Oe));for(var pt in Oe)Ze[pt]=D(Oe[pt]);return C(Oe,Pt)&&(Ze[Pt]=Oe[Pt]),Ze}function W(Oe){return f(Oe)?D(Oe):Oe}var re="add";N("Patches",{$:function(Oe,Ze){return Ze.forEach(function(pt){for(var $e=pt.path,Re=pt.op,Be=Oe,Ne=0;Ne<$e.length-1;Ne++){var bt=m(Be),Kt=""+$e[Ne];bt!==0&&bt!==1||Kt!=="__proto__"&&Kt!=="constructor"||l(24),typeof Be=="function"&&Kt==="prototype"&&l(24),typeof(Be=x(Be,Kt))!="object"&&l(15,$e.join("/"))}var an=m(Be),In=D(pt.value),rr=$e[$e.length-1];switch(Re){case"replace":switch(an){case 2:return Be.set(rr,In);case 3:l(16);default:return Be[rr]=In}case re:switch(an){case 1:return rr==="-"?Be.push(In):Be.splice(rr,0,In);case 2:return Be.set(rr,In);case 3:return Be.add(In);default:return Be[rr]=In}case"remove":switch(an){case 1:return Be.splice(rr,1);case 2:return Be.delete(rr);case 3:return Be.delete(pt.value);default:return delete Be[rr]}default:l(17,Re)}}),Oe},N:function(Oe,Ze,pt,$e){switch(Oe.i){case 0:case 4:case 2:return function(Re,Be,Ne,bt){var Kt=Re.t,an=Re.o;E(Re.R,function(In,rr){var Wn=x(Kt,In),gr=x(an,In),fr=rr?C(Kt,In)?"replace":re:"remove";if(Wn!==gr||fr!=="replace"){var Rr=Be.concat(In);Ne.push(fr==="remove"?{op:fr,path:Rr}:{op:fr,path:Rr,value:gr}),bt.push(fr===re?{op:"remove",path:Rr}:fr==="remove"?{op:re,path:Rr,value:W(Wn)}:{op:"replace",path:Rr,value:W(Wn)})}})}(Oe,Ze,pt,$e);case 5:case 1:return function(Re,Be,Ne,bt){var Kt=Re.t,an=Re.R,In=Re.o;if(In.length<Kt.length){var rr=[In,Kt];Kt=rr[0],In=rr[1];var Wn=[bt,Ne];Ne=Wn[0],bt=Wn[1]}for(var gr=0;gr<Kt.length;gr++)if(an[gr]&&In[gr]!==Kt[gr]){var fr=Be.concat([gr]);Ne.push({op:"replace",path:fr,value:W(In[gr])}),bt.push({op:"replace",path:fr,value:W(Kt[gr])})}for(var Rr=Kt.length;Rr<In.length;Rr++){var Vr=Be.concat([Rr]);Ne.push({op:re,path:Vr,value:W(In[Rr])})}Kt.length<In.length&&bt.push({op:"replace",path:Be.concat(["length"]),value:Kt.length})}(Oe,Ze,pt,$e);case 3:return function(Re,Be,Ne,bt){var Kt=Re.t,an=Re.o,In=0;Kt.forEach(function(rr){if(!an.has(rr)){var Wn=Be.concat([In]);Ne.push({op:"remove",path:Wn,value:rr}),bt.unshift({op:re,path:Wn,value:rr})}In++}),In=0,an.forEach(function(rr){if(!Kt.has(rr)){var Wn=Be.concat([In]);Ne.push({op:re,path:Wn,value:rr}),bt.unshift({op:"remove",path:Wn,value:rr})}In++})}(Oe,Ze,pt,$e)}},M:function(Oe,Ze,pt,$e){pt.push({op:"replace",path:[],value:Ze===at?void 0:Ze}),$e.push({op:"replace",path:[],value:Oe})}})}function ye(){function D(Re,Be){function Ne(){this.constructor=Re}Ze(Re,Be),Re.prototype=(Ne.prototype=Be.prototype,new Ne)}function W(Re){Re.o||(Re.R=new Map,Re.o=new Map(Re.t))}function re(Re){Re.o||(Re.o=new Set,Re.t.forEach(function(Be){if(d(Be)){var Ne=Se(Re.A.h,Be,Re);Re.p.set(Be,Ne),Re.o.add(Ne)}else Re.o.add(Be)}))}function Oe(Re){Re.O&&l(3,JSON.stringify(R(Re)))}var Ze=function(Re,Be){return(Ze=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ne,bt){Ne.__proto__=bt}||function(Ne,bt){for(var Kt in bt)bt.hasOwnProperty(Kt)&&(Ne[Kt]=bt[Kt])})(Re,Be)},pt=function(){function Re(Ne,bt){return this[lt]={i:2,l:bt,A:bt?bt.A:k(),P:!1,I:!1,o:void 0,R:void 0,t:Ne,k:this,C:!1,O:!1},this}D(Re,Map);var Be=Re.prototype;return Object.defineProperty(Be,"size",{get:function(){return R(this[lt]).size}}),Be.has=function(Ne){return R(this[lt]).has(Ne)},Be.set=function(Ne,bt){var Kt=this[lt];return Oe(Kt),R(Kt).has(Ne)&&R(Kt).get(Ne)===bt||(W(Kt),q(Kt),Kt.R.set(Ne,!0),Kt.o.set(Ne,bt),Kt.R.set(Ne,!0)),this},Be.delete=function(Ne){if(!this.has(Ne))return!1;var bt=this[lt];return Oe(bt),W(bt),q(bt),bt.t.has(Ne)?bt.R.set(Ne,!1):bt.R.delete(Ne),bt.o.delete(Ne),!0},Be.clear=function(){var Ne=this[lt];Oe(Ne),R(Ne).size&&(W(Ne),q(Ne),Ne.R=new Map,E(Ne.t,function(bt){Ne.R.set(bt,!1)}),Ne.o.clear())},Be.forEach=function(Ne,bt){var Kt=this;R(this[lt]).forEach(function(an,In){Ne.call(bt,Kt.get(In),In,Kt)})},Be.get=function(Ne){var bt=this[lt];Oe(bt);var Kt=R(bt).get(Ne);if(bt.I||!d(Kt)||Kt!==bt.t.get(Ne))return Kt;var an=Se(bt.A.h,Kt,bt);return W(bt),bt.o.set(Ne,an),an},Be.keys=function(){return R(this[lt]).keys()},Be.values=function(){var Ne,bt=this,Kt=this.keys();return(Ne={})[kt]=function(){return bt.values()},Ne.next=function(){var an=Kt.next();return an.done?an:{done:!1,value:bt.get(an.value)}},Ne},Be.entries=function(){var Ne,bt=this,Kt=this.keys();return(Ne={})[kt]=function(){return bt.entries()},Ne.next=function(){var an=Kt.next();if(an.done)return an;var In=bt.get(an.value);return{done:!1,value:[an.value,In]}},Ne},Be[kt]=function(){return this.entries()},Re}(),$e=function(){function Re(Ne,bt){return this[lt]={i:3,l:bt,A:bt?bt.A:k(),P:!1,I:!1,o:void 0,t:Ne,k:this,p:new Map,O:!1,C:!1},this}D(Re,Set);var Be=Re.prototype;return Object.defineProperty(Be,"size",{get:function(){return R(this[lt]).size}}),Be.has=function(Ne){var bt=this[lt];return Oe(bt),bt.o?!!bt.o.has(Ne)||!(!bt.p.has(Ne)||!bt.o.has(bt.p.get(Ne))):bt.t.has(Ne)},Be.add=function(Ne){var bt=this[lt];return Oe(bt),this.has(Ne)||(re(bt),q(bt),bt.o.add(Ne)),this},Be.delete=function(Ne){if(!this.has(Ne))return!1;var bt=this[lt];return Oe(bt),re(bt),q(bt),bt.o.delete(Ne)||!!bt.p.has(Ne)&&bt.o.delete(bt.p.get(Ne))},Be.clear=function(){var Ne=this[lt];Oe(Ne),R(Ne).size&&(re(Ne),q(Ne),Ne.o.clear())},Be.values=function(){var Ne=this[lt];return Oe(Ne),re(Ne),Ne.o.values()},Be.entries=function(){var Ne=this[lt];return Oe(Ne),re(Ne),Ne.o.entries()},Be.keys=function(){return this.values()},Be[kt]=function(){return this.values()},Be.forEach=function(Ne,bt){for(var Kt=this.values(),an=Kt.next();!an.done;)Ne.call(bt,an.value,an.value,this),an=Kt.next()},Re}();N("MapSet",{F:function(Re,Be){return new pt(Re,Be)},T:function(Re,Be){return new $e(Re,Be)}})}function Ee(){pe(),ye(),Pe()}function _e(D){return D}function We(D){return D}var Ie,Fe,ut=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ht=typeof Map<"u",Ot=typeof Set<"u",Ue=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",at=ut?Symbol.for("immer-nothing"):((Ie={})["immer-nothing"]=!0,Ie),Pt=ut?Symbol.for("immer-draftable"):"__$immer_draftable",lt=ut?Symbol.for("immer-state"):"__$immer_state",kt=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",nn={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(D){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+D},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(D){return"Cannot apply patch, path doesn't resolve: "+D},16:'Sets cannot have "replace" patches.',17:function(D){return"Unsupported patch operation: "+D},18:function(D){return"The plugin for '"+D+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+D+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(D){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+D+"'"},22:function(D){return"'current' expects a draft, got: "+D},23:function(D){return"'original' expects a draft, got: "+D},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},hn=""+Object.prototype.constructor,Rn=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(D){return Object.getOwnPropertyNames(D).concat(Object.getOwnPropertySymbols(D))}:Object.getOwnPropertyNames,kn=Object.getOwnPropertyDescriptors||function(D){var W={};return Rn(D).forEach(function(re){W[re]=Object.getOwnPropertyDescriptor(D,re)}),W},$t={},yn={get:function(D,W){if(W===lt)return D;var re=R(D);if(!C(re,W))return function(Ze,pt,$e){var Re,Be=te(pt,$e);return Be?"value"in Be?Be.value:(Re=Be.get)===null||Re===void 0?void 0:Re.call(Ze.k):void 0}(D,re,W);var Oe=re[W];return D.I||!d(Oe)?Oe:Oe===be(D.t,W)?(ee(D),D.o[W]=Se(D.A.h,Oe,D)):Oe},has:function(D,W){return W in R(D)},ownKeys:function(D){return Reflect.ownKeys(R(D))},set:function(D,W,re){var Oe=te(R(D),W);if(Oe?.set)return Oe.set.call(D.k,re),!0;if(!D.P){var Ze=be(R(D),W),pt=Ze?.[lt];if(pt&&pt.t===re)return D.o[W]=re,D.R[W]=!1,!0;if(T(re,Ze)&&(re!==void 0||C(D.t,W)))return!0;ee(D),q(D)}return D.o[W]===re&&(re!==void 0||W in D.o)||Number.isNaN(re)&&Number.isNaN(D.o[W])||(D.o[W]=re,D.R[W]=!0),!0},deleteProperty:function(D,W){return be(D.t,W)!==void 0||W in D.t?(D.R[W]=!1,ee(D),q(D)):delete D.R[W],D.o&&delete D.o[W],!0},getOwnPropertyDescriptor:function(D,W){var re=R(D),Oe=Reflect.getOwnPropertyDescriptor(re,W);return Oe&&{writable:!0,configurable:D.i!==1||W!=="length",enumerable:Oe.enumerable,value:re[W]}},defineProperty:function(){l(11)},getPrototypeOf:function(D){return Object.getPrototypeOf(D.t)},setPrototypeOf:function(){l(12)}},Yn={};E(yn,function(D,W){Yn[D]=function(){return arguments[0]=arguments[0][0],W.apply(this,arguments)}}),Yn.deleteProperty=function(D,W){return Yn.set.call(this,D,W,void 0)},Yn.set=function(D,W,re){return yn.set.call(this,D[0],W,re,D[0])};var cn=function(){function D(re){var Oe=this;this.g=Ue,this.D=!0,this.produce=function(Ze,pt,$e){if(typeof Ze=="function"&&typeof pt!="function"){var Re=pt;pt=Ze;var Be=Oe;return function(Wn){var gr=this;Wn===void 0&&(Wn=Re);for(var fr=arguments.length,Rr=Array(fr>1?fr-1:0),Vr=1;Vr<fr;Vr++)Rr[Vr-1]=arguments[Vr];return Be.produce(Wn,function(ei){var Ct;return(Ct=pt).call.apply(Ct,[gr,ei].concat(Rr))})}}var Ne;if(typeof pt!="function"&&l(6),$e!==void 0&&typeof $e!="function"&&l(7),d(Ze)){var bt=G(Oe),Kt=Se(Oe,Ze,void 0),an=!0;try{Ne=pt(Kt),an=!1}finally{an?z(bt):K(bt)}return typeof Promise<"u"&&Ne instanceof Promise?Ne.then(function(Wn){return j(bt,$e),ae(Wn,bt)},function(Wn){throw z(bt),Wn}):(j(bt,$e),ae(Ne,bt))}if(!Ze||typeof Ze!="object"){if((Ne=pt(Ze))===void 0&&(Ne=Ze),Ne===at&&(Ne=void 0),Oe.D&&V(Ne,!0),$e){var In=[],rr=[];U("Patches").M(Ze,Ne,In,rr),$e(In,rr)}return Ne}l(21,Ze)},this.produceWithPatches=function(Ze,pt){if(typeof Ze=="function")return function(Ne){for(var bt=arguments.length,Kt=Array(bt>1?bt-1:0),an=1;an<bt;an++)Kt[an-1]=arguments[an];return Oe.produceWithPatches(Ne,function(In){return Ze.apply(void 0,[In].concat(Kt))})};var $e,Re,Be=Oe.produce(Ze,pt,function(Ne,bt){$e=Ne,Re=bt});return typeof Promise<"u"&&Be instanceof Promise?Be.then(function(Ne){return[Ne,$e,Re]}):[Be,$e,Re]},typeof re?.useProxies=="boolean"&&this.setUseProxies(re.useProxies),typeof re?.autoFreeze=="boolean"&&this.setAutoFreeze(re.autoFreeze)}var W=D.prototype;return W.createDraft=function(re){d(re)||l(8),f(re)&&(re=tt(re));var Oe=G(this),Ze=Se(this,re,void 0);return Ze[lt].C=!0,K(Oe),Ze},W.finishDraft=function(re,Oe){var Ze=re&&re[lt],pt=Ze.A;return j(pt,Oe),ae(void 0,pt)},W.setAutoFreeze=function(re){this.D=re},W.setUseProxies=function(re){re&&!Ue&&l(20),this.g=re},W.applyPatches=function(re,Oe){var Ze;for(Ze=Oe.length-1;Ze>=0;Ze--){var pt=Oe[Ze];if(pt.path.length===0&&pt.op==="replace"){re=pt.value;break}}Ze>-1&&(Oe=Oe.slice(Ze+1));var $e=U("Patches").$;return f(re)?$e(re,Oe):this.produce(re,function(Re){return $e(Re,Oe)})},D}(),st=new cn,on=st.produce,dt=st.produceWithPatches.bind(st),Dt=st.setAutoFreeze.bind(st),Ht=st.setUseProxies.bind(st),rn=st.applyPatches.bind(st),ke=st.createDraft.bind(st),ct=st.finishDraft.bind(st);b.ZP=on},75461:function(_,b,i){"use strict";i.d(b,{C:function(){return P}});var l=i(31191),f=i(20552),d=i(16315),g=i(33961);function E(T,O){return O?(0,l.pi)((0,l.pi)((0,l.pi)({},T||{}),O||{}),Object.keys(T).reduce(function(w,R){return w[R]=(0,l.pi)((0,l.pi)({},T[R]),O[R]||{}),w},{})):T}function m(T,O){return O?Object.keys(T).reduce(function(w,R){return w[R]=E(T[R],O[R]),w},(0,l.pi)({},T)):T}function C(T){return{create:function(){return{get:function(O){return T[O]},set:function(O,w){T[O]=w}}}}}function x(T){return T===void 0&&(T={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:(0,d.H)(function(){for(var O,w=[],R=0;R<arguments.length;R++)w[R]=arguments[R];return new((O=Intl.NumberFormat).bind.apply(O,(0,l.ev)([void 0],w,!1)))},{cache:C(T.number),strategy:d.A.variadic}),getDateTimeFormat:(0,d.H)(function(){for(var O,w=[],R=0;R<arguments.length;R++)w[R]=arguments[R];return new((O=Intl.DateTimeFormat).bind.apply(O,(0,l.ev)([void 0],w,!1)))},{cache:C(T.dateTime),strategy:d.A.variadic}),getPluralRules:(0,d.H)(function(){for(var O,w=[],R=0;R<arguments.length;R++)w[R]=arguments[R];return new((O=Intl.PluralRules).bind.apply(O,(0,l.ev)([void 0],w,!1)))},{cache:C(T.pluralRules),strategy:d.A.variadic})}}var P=function(){function T(O,w,R,F){w===void 0&&(w=T.defaultLocale);var V=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(N){var k=V.formatToParts(N);if(k.length===1)return k[0].value;var j=k.reduce(function(z,K){return!z.length||K.type!==g.du.literal||typeof z[z.length-1]!="string"?z.push(K.value):z[z.length-1]+=K.value,z},[]);return j.length<=1?j[0]||"":j},this.formatToParts=function(N){return(0,g.FK)(V.ast,V.locales,V.formatters,V.formats,N,void 0,V.message)},this.resolvedOptions=function(){var N;return{locale:((N=V.resolvedLocale)===null||N===void 0?void 0:N.toString())||Intl.NumberFormat.supportedLocalesOf(V.locales)[0]}},this.getAst=function(){return V.ast},this.locales=w,this.resolvedLocale=T.resolveLocale(w),typeof O=="string"){if(this.message=O,!T.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var L=F||{},$=L.formatters,U=(0,l._T)(L,["formatters"]);this.ast=T.__parse(O,(0,l.pi)((0,l.pi)({},U),{locale:this.resolvedLocale}))}else this.ast=O;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=m(T.formats,R),this.formatters=F&&F.formatters||x(this.formatterCache)}return Object.defineProperty(T,"defaultLocale",{get:function(){return T.memoizedDefaultLocale||(T.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),T.memoizedDefaultLocale},enumerable:!1,configurable:!0}),T.memoizedDefaultLocale=null,T.resolveLocale=function(O){if(!(typeof Intl.Locale>"u")){var w=Intl.NumberFormat.supportedLocalesOf(O);return w.length>0?new Intl.Locale(w[0]):new Intl.Locale(typeof O=="string"?O:O[0])}},T.__parse=f.Qc,T.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},T}()},14979:function(_,b,i){"use strict";i.d(b,{C8:function(){return g},HR:function(){return m},YR:function(){return E},jK:function(){return f},u_:function(){return d}});var l=i(31191),f;(function(C){C.MISSING_VALUE="MISSING_VALUE",C.INVALID_VALUE="INVALID_VALUE",C.MISSING_INTL_API="MISSING_INTL_API"})(f||(f={}));var d=function(C){(0,l.ZT)(x,C);function x(P,T,O){var w=C.call(this,P)||this;return w.code=T,w.originalMessage=O,w}return x.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},x}(Error),g=function(C){(0,l.ZT)(x,C);function x(P,T,O,w){return C.call(this,'Invalid values for "'.concat(P,'": "').concat(T,'". Options are "').concat(Object.keys(O).join('", "'),'"'),f.INVALID_VALUE,w)||this}return x}(d),E=function(C){(0,l.ZT)(x,C);function x(P,T,O){return C.call(this,'Value for "'.concat(P,'" must be of type ').concat(T),f.INVALID_VALUE,O)||this}return x}(d),m=function(C){(0,l.ZT)(x,C);function x(P,T){return C.call(this,'The intl string context variable "'.concat(P,'" was not provided to the string "').concat(T,'"'),f.MISSING_VALUE,T)||this}return x}(d)},33961:function(_,b,i){"use strict";i.d(b,{FK:function(){return m},Gt:function(){return E},du:function(){return d}});var l=i(20552),f=i(14979),d;(function(C){C[C.literal=0]="literal",C[C.object=1]="object"})(d||(d={}));function g(C){return C.length<2?C:C.reduce(function(x,P){var T=x[x.length-1];return!T||T.type!==d.literal||P.type!==d.literal?x.push(P):T.value+=P.value,x},[])}function E(C){return typeof C=="function"}function m(C,x,P,T,O,w,R){if(C.length===1&&(0,l.O4)(C[0]))return[{type:d.literal,value:C[0].value}];for(var F=[],V=0,L=C;V<L.length;V++){var $=L[V];if((0,l.O4)($)){F.push({type:d.literal,value:$.value});continue}if((0,l.yx)($)){typeof w=="number"&&F.push({type:d.literal,value:P.getNumberFormat(x).format(w)});continue}var U=$.value;if(!(O&&U in O))throw new f.HR(U,R);var N=O[U];if((0,l.VG)($)){(!N||typeof N=="string"||typeof N=="number")&&(N=typeof N=="string"||typeof N=="number"?String(N):""),F.push({type:typeof N=="string"?d.literal:d.object,value:N});continue}if((0,l.rp)($)){var k=typeof $.style=="string"?T.date[$.style]:(0,l.Ii)($.style)?$.style.parsedOptions:void 0;F.push({type:d.literal,value:P.getDateTimeFormat(x,k).format(N)});continue}if((0,l.pe)($)){var k=typeof $.style=="string"?T.time[$.style]:(0,l.Ii)($.style)?$.style.parsedOptions:T.time.medium;F.push({type:d.literal,value:P.getDateTimeFormat(x,k).format(N)});continue}if((0,l.uf)($)){var k=typeof $.style=="string"?T.number[$.style]:(0,l.Wh)($.style)?$.style.parsedOptions:void 0;k&&k.scale&&(N=N*(k.scale||1)),F.push({type:d.literal,value:P.getNumberFormat(x,k).format(N)});continue}if((0,l.HI)($)){var j=$.children,z=$.value,K=O[z];if(!E(K))throw new f.YR(z,"function",R);var G=m(j,x,P,T,O,w),Y=K(G.map(function(J){return J.value}));Array.isArray(Y)||(Y=[Y]),F.push.apply(F,Y.map(function(J){return{type:typeof J=="string"?d.literal:d.object,value:J}}))}if((0,l.Wi)($)){var ae=$.options[N]||$.options.other;if(!ae)throw new f.C8($.value,N,Object.keys($.options),R);F.push.apply(F,m(ae.value,x,P,T,O));continue}if((0,l.Jo)($)){var ae=$.options["=".concat(N)];if(!ae){if(!Intl.PluralRules)throw new f.u_(`Intl.PluralRules is not available in this environment.
1132
+ `)}function Mf(ce){var et={};if(ce.inner){if(ce.inner.length===0)return Ra(et,ce.path,ce.message);for(var gn=ce.inner,Wt=Array.isArray(gn),mn=0,gn=Wt?gn:gn[Symbol.iterator]();;){var nr;if(Wt){if(mn>=gn.length)break;nr=gn[mn++]}else{if(mn=gn.next(),mn.done)break;nr=mn.value}var dr=nr;cs(et,dr.path)||(et=Ra(et,dr.path,dr.message))}}return et}function gc(ce,et,Wt,mn){Wt===void 0&&(Wt=!1);var gn=Js(ce);return et[Wt?"validateSync":"validate"](gn,{abortEarly:!1,context:mn||gn})}function Js(ce){var et=Array.isArray(ce)?[]:{};for(var Wt in ce)if(Object.prototype.hasOwnProperty.call(ce,Wt)){var mn=String(Wt);Array.isArray(ce[mn])===!0?et[mn]=ce[mn].map(function(gn){return Array.isArray(gn)===!0||kt(gn)?Js(gn):gn!==""?gn:void 0}):kt(ce[mn])?et[mn]=Js(ce[mn]):et[mn]=ce[mn]!==""?ce[mn]:void 0}return et}function ma(ce,et,Wt){var mn=ce.slice();return et.forEach(function(nr,dr){if(typeof mn[dr]>"u"){var ri=Wt.clone!==!1,Ki=ri&&Wt.isMergeableObject(nr);mn[dr]=Ki?L(Array.isArray(nr)?[]:{},nr,Wt):nr}else Wt.isMergeableObject(nr)?mn[dr]=L(ce[dr],nr,Wt):ce.indexOf(nr)===-1&&mn.push(nr)}),mn}function Sf(ce){return Array.from(ce).filter(function(et){return et.selected}).map(function(et){return et.value})}function Of(ce,et,Wt){if(typeof ce=="boolean")return Boolean(et);var mn=[],gn=!1,nr=-1;if(Array.isArray(ce))mn=ce,nr=ce.indexOf(Wt),gn=nr>=0;else if(!Wt||Wt=="true"||Wt=="false")return Boolean(et);return et&&Wt&&!gn?mn.concat(Wt):gn?mn.slice(0,nr).concat(mn.slice(nr+1)):mn}var kf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?l.useLayoutEffect:l.useEffect;function Va(ce){var et=(0,l.useRef)(ce);return kf(function(){et.current=ce}),(0,l.useCallback)(function(){for(var Wt=arguments.length,mn=new Array(Wt),gn=0;gn<Wt;gn++)mn[gn]=arguments[gn];return et.current.apply(void 0,mn)},[])}function vc(ce){var et=zl(),Wt=et.getFieldProps,mn=et.getFieldMeta,gn=et.getFieldHelpers,nr=et.registerField,dr=et.unregisterField,ri=Wl(ce),Ki=ri?ce:{name:ce},$i=Ki.name,Lo=Ki.validate;(0,l.useEffect)(function(){return $i&&nr($i,{validate:Lo}),function(){$i&&dr($i)}},[nr,dr,$i,Lo]),$i||Pl(!1);var xo=(0,l.useMemo)(function(){return gn($i)},[gn,$i]);return[Wt(Ki),mn($i),xo]}function yc(ce){var et=ce.validate,Wt=ce.name,mn=ce.render,gn=ce.children,nr=ce.as,dr=ce.component,ri=Al(ce,["validate","name","render","children","as","component"]),Ki=zl(),$i=Al(Ki,["validate","validationSchema"]),Lo=$i.registerField,xo=$i.unregisterField;(0,l.useEffect)(function(){return Lo(Wt,{validate:et}),function(){xo(Wt)}},[Lo,xo,Wt,et]);var hr=$i.getFieldProps(zo({name:Wt},ri)),ns=$i.getFieldMeta(Wt),ra={field:hr,form:$i};if(mn)return mn(zo({},ra,{meta:ns}));if(Qs(gn))return gn(zo({},ra,{meta:ns}));if(dr){if(typeof dr=="string"){var ga=ri.innerRef,ws=Al(ri,["innerRef"]);return(0,l.createElement)(dr,zo({ref:ga},hr,ws),gn)}return(0,l.createElement)(dr,zo({field:hr,form:$i},ri),gn)}var is=nr||"input";if(typeof is=="string"){var Ia=ri.innerRef,bu=Al(ri,["innerRef"]);return(0,l.createElement)(is,zo({ref:Ia},hr,bu),gn)}return(0,l.createElement)(is,zo({},hr,ri),gn)}var Zc=(0,l.forwardRef)(function(ce,et){var Wt=ce.action,mn=Al(ce,["action"]),gn=Wt??"#",nr=zl(),dr=nr.handleReset,ri=nr.handleSubmit;return(0,l.createElement)("form",Object.assign({onSubmit:ri,ref:et,onReset:dr,action:gn},mn))});Zc.displayName="Form";function Nu(ce){var et=ce.mapPropsToValues,Wt=et===void 0?function(gn){var nr={};for(var dr in gn)gn.hasOwnProperty(dr)&&typeof gn[dr]!="function"&&(nr[dr]=gn[dr]);return nr}:et,mn=Al(ce,["mapPropsToValues"]);return function(nr){var dr=nr.displayName||nr.name||nr.constructor&&nr.constructor.name||"Component",ri=function(Ki){$f($i,Ki);function $i(){var xo;return xo=Ki.apply(this,arguments)||this,xo.validate=function(hr){return mn.validate(hr,xo.props)},xo.validationSchema=function(){return Qs(mn.validationSchema)?mn.validationSchema(xo.props):mn.validationSchema},xo.handleSubmit=function(hr,ns){return mn.handleSubmit(hr,zo({},ns,{props:xo.props}))},xo.renderFormComponent=function(hr){return createElement(nr,Object.assign({},xo.props,hr))},xo}var Lo=$i.prototype;return Lo.render=function(){var hr=this.props,ns=Al(hr,["children"]);return createElement(Il,Object.assign({},ns,mn,{validate:mn.validate&&this.validate,validationSchema:mn.validationSchema&&this.validationSchema,initialValues:Wt(this.props),initialStatus:mn.mapPropsToStatus&&mn.mapPropsToStatus(this.props),initialErrors:mn.mapPropsToErrors&&mn.mapPropsToErrors(this.props),initialTouched:mn.mapPropsToTouched&&mn.mapPropsToTouched(this.props),onSubmit:this.handleSubmit,children:this.renderFormComponent}))},$i}(Component);return ri.displayName="WithFormik("+dr+")",hoistNonReactStatics(ri,nr)}}function jf(ce){var et=function(gn){return(0,l.createElement)(Hc,null,function(nr){return nr||Pl(!1),(0,l.createElement)(ce,Object.assign({},gn,{formik:nr}))})},Wt=ce.displayName||ce.name||ce.constructor&&ce.constructor.name||"Component";return et.WrappedComponent=ce,et.displayName="FormikConnect("+Wt+")",tu()(et,ce)}var Tf=function(et,Wt,mn){var gn=Vl(et),nr=gn[Wt];return gn.splice(Wt,1),gn.splice(mn,0,nr),gn},wf=function(et,Wt,mn){var gn=Vl(et),nr=gn[Wt];return gn[Wt]=gn[mn],gn[mn]=nr,gn},Ec=function(et,Wt,mn){var gn=Vl(et);return gn.splice(Wt,0,mn),gn},Uf=function(et,Wt,mn){var gn=Vl(et);return gn[Wt]=mn,gn},Vl=function(et){if(et){if(Array.isArray(et))return[].concat(et);var Wt=Object.keys(et).map(function(mn){return parseInt(mn)}).reduce(function(mn,gn){return gn>mn?gn:mn},0);return Array.from(zo({},et,{length:Wt+1}))}else return[]},Kc=function(et,Wt){var mn=typeof et=="function"?et:Wt;return function(gn){if(Array.isArray(gn)||Wl(gn)){var nr=Vl(gn);return mn(nr)}return gn}},Wf=function(ce){$f(et,ce);function et(mn){var gn;return gn=ce.call(this,mn)||this,gn.updateArrayField=function(nr,dr,ri){var Ki=gn.props,$i=Ki.name,Lo=Ki.formik.setFormikState;Lo(function(xo){var hr=Kc(ri,nr),ns=Kc(dr,nr),ra=Ra(xo.values,$i,nr(cs(xo.values,$i))),ga=ri?hr(cs(xo.errors,$i)):void 0,ws=dr?ns(cs(xo.touched,$i)):void 0;return bf(ga)&&(ga=void 0),bf(ws)&&(ws=void 0),zo({},xo,{values:ra,errors:ri?Ra(xo.errors,$i,ga):xo.errors,touched:dr?Ra(xo.touched,$i,ws):xo.touched})})},gn.push=function(nr){return gn.updateArrayField(function(dr){return[].concat(Vl(dr),[Ef(nr)])},!1,!1)},gn.handlePush=function(nr){return function(){return gn.push(nr)}},gn.swap=function(nr,dr){return gn.updateArrayField(function(ri){return wf(ri,nr,dr)},!0,!0)},gn.handleSwap=function(nr,dr){return function(){return gn.swap(nr,dr)}},gn.move=function(nr,dr){return gn.updateArrayField(function(ri){return Tf(ri,nr,dr)},!0,!0)},gn.handleMove=function(nr,dr){return function(){return gn.move(nr,dr)}},gn.insert=function(nr,dr){return gn.updateArrayField(function(ri){return Ec(ri,nr,dr)},function(ri){return Ec(ri,nr,null)},function(ri){return Ec(ri,nr,null)})},gn.handleInsert=function(nr,dr){return function(){return gn.insert(nr,dr)}},gn.replace=function(nr,dr){return gn.updateArrayField(function(ri){return Uf(ri,nr,dr)},!1,!1)},gn.handleReplace=function(nr,dr){return function(){return gn.replace(nr,dr)}},gn.unshift=function(nr){var dr=-1;return gn.updateArrayField(function(ri){var Ki=ri?[nr].concat(ri):[nr];return dr<0&&(dr=Ki.length),Ki},function(ri){var Ki=ri?[null].concat(ri):[null];return dr<0&&(dr=Ki.length),Ki},function(ri){var Ki=ri?[null].concat(ri):[null];return dr<0&&(dr=Ki.length),Ki}),dr},gn.handleUnshift=function(nr){return function(){return gn.unshift(nr)}},gn.handleRemove=function(nr){return function(){return gn.remove(nr)}},gn.handlePop=function(){return function(){return gn.pop()}},gn.remove=gn.remove.bind(zc(gn)),gn.pop=gn.pop.bind(zc(gn)),gn}var Wt=et.prototype;return Wt.shouldComponentUpdate=function(gn){return this.props.shouldUpdate?this.props.shouldUpdate(gn,this.props):gn.name!==this.props.name||cs(gn.formik.values,this.props.name)!==cs(this.props.formik.values,this.props.name)||cs(gn.formik.errors,this.props.name)!==cs(this.props.formik.errors,this.props.name)||cs(gn.formik.touched,this.props.name)!==cs(this.props.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(gn).length||gn.formik.isSubmitting!==this.props.formik.isSubmitting},Wt.componentDidUpdate=function(gn){this.props.validateOnChange&&this.props.formik.validateOnChange&&!d()(cs(gn.formik.values,gn.name),cs(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},Wt.remove=function(gn){var nr;return this.updateArrayField(function(dr){var ri=dr?Vl(dr):[];return nr||(nr=ri[gn]),Qs(ri.splice)&&ri.splice(gn,1),Qs(ri.every)&&ri.every(function(Ki){return Ki===void 0})?[]:ri},!0,!0),nr},Wt.pop=function(){var gn;return this.updateArrayField(function(nr){var dr=nr.slice();return gn||(gn=dr&&dr.pop&&dr.pop()),dr},!0,!0),gn},Wt.render=function(){var gn={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},nr=this.props,dr=nr.component,ri=nr.render,Ki=nr.children,$i=nr.name,Lo=nr.formik,xo=Al(Lo,["validate","validationSchema"]),hr=zo({},gn,{form:xo,name:$i});return dr?(0,l.createElement)(dr,hr):ri?ri(hr):Ki?typeof Ki=="function"?Ki(hr):Vc(Ki)?null:l.Children.only(Ki):null},et}(l.Component);Wf.defaultProps={validateOnChange:!0};var Fu=jf(Wf),td=null,nd=null,Gc=null,nu=null},62521:function(_){"use strict";var b="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,l=Object.prototype.toString,f="[object Function]";_.exports=function(g){var E=this;if(typeof E!="function"||l.call(E)!==f)throw new TypeError(b+E);for(var m=i.call(arguments,1),C,x=function(){if(this instanceof C){var R=E.apply(this,m.concat(i.call(arguments)));return Object(R)===R?R:this}else return E.apply(g,m.concat(i.call(arguments)))},P=Math.max(0,E.length-m.length),T=[],O=0;O<P;O++)T.push("$"+O);if(C=Function("binder","return function ("+T.join(",")+"){ return binder.apply(this,arguments); }")(x),E.prototype){var w=function(){};w.prototype=E.prototype,C.prototype=new w,w.prototype=null}return C}},37156:function(_,b,i){"use strict";var l=i(62521);_.exports=Function.prototype.bind||l},10465:function(_,b,i){"use strict";var l=typeof Symbol<"u"&&Symbol,f=i(16073);_.exports=function(){return typeof l!="function"||typeof Symbol!="function"||typeof l("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:f()}},16073:function(_){"use strict";_.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var i={},l=Symbol("test"),f=Object(l);if(typeof l=="string"||Object.prototype.toString.call(l)!=="[object Symbol]"||Object.prototype.toString.call(f)!=="[object Symbol]")return!1;var d=42;i[l]=d;for(l in i)return!1;if(typeof Object.keys=="function"&&Object.keys(i).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(i).length!==0)return!1;var g=Object.getOwnPropertySymbols(i);if(g.length!==1||g[0]!==l||!Object.prototype.propertyIsEnumerable.call(i,l))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var E=Object.getOwnPropertyDescriptor(i,l);if(E.value!==d||E.enumerable!==!0)return!1}return!0}},98776:function(_,b,i){"use strict";var l=i(37156);_.exports=l.call(Function.call,Object.prototype.hasOwnProperty)},88710:function(_,b,i){"use strict";i.d(b,{lX:function(){return le},q_:function(){return Ae},ob:function(){return $},PP:function(){return Pe},Ep:function(){return L},Hp:function(){return U}});var l=i(20011);function f(ye){return ye.charAt(0)==="/"}function d(ye,Ee){for(var _e=Ee,We=_e+1,Ie=ye.length;We<Ie;_e+=1,We+=1)ye[_e]=ye[We];ye.pop()}function g(ye,Ee){Ee===void 0&&(Ee="");var _e=ye&&ye.split("/")||[],We=Ee&&Ee.split("/")||[],Ie=ye&&f(ye),Fe=Ee&&f(Ee),ut=Ie||Fe;if(ye&&f(ye)?We=_e:_e.length&&(We.pop(),We=We.concat(_e)),!We.length)return"/";var ht;if(We.length){var Ot=We[We.length-1];ht=Ot==="."||Ot===".."||Ot===""}else ht=!1;for(var Ue=0,at=We.length;at>=0;at--){var Pt=We[at];Pt==="."?d(We,at):Pt===".."?(d(We,at),Ue++):Ue&&(d(We,at),Ue--)}if(!ut)for(;Ue--;Ue)We.unshift("..");ut&&We[0]!==""&&(!We[0]||!f(We[0]))&&We.unshift("");var lt=We.join("/");return ht&&lt.substr(-1)!=="/"&&(lt+="/"),lt}var E=g;function m(ye){return ye.valueOf?ye.valueOf():Object.prototype.valueOf.call(ye)}function C(ye,Ee){if(ye===Ee)return!0;if(ye==null||Ee==null)return!1;if(Array.isArray(ye))return Array.isArray(Ee)&&ye.length===Ee.length&&ye.every(function(Ie,Fe){return C(Ie,Ee[Fe])});if(typeof ye=="object"||typeof Ee=="object"){var _e=m(ye),We=m(Ee);return _e!==ye||We!==Ee?C(_e,We):Object.keys(Object.assign({},ye,Ee)).every(function(Ie){return C(ye[Ie],Ee[Ie])})}return!1}var x=C,P=i(56720);function T(ye){return ye.charAt(0)==="/"?ye:"/"+ye}function O(ye){return ye.charAt(0)==="/"?ye.substr(1):ye}function w(ye,Ee){return ye.toLowerCase().indexOf(Ee.toLowerCase())===0&&"/?#".indexOf(ye.charAt(Ee.length))!==-1}function R(ye,Ee){return w(ye,Ee)?ye.substr(Ee.length):ye}function F(ye){return ye.charAt(ye.length-1)==="/"?ye.slice(0,-1):ye}function V(ye){var Ee=ye||"/",_e="",We="",Ie=Ee.indexOf("#");Ie!==-1&&(We=Ee.substr(Ie),Ee=Ee.substr(0,Ie));var Fe=Ee.indexOf("?");return Fe!==-1&&(_e=Ee.substr(Fe),Ee=Ee.substr(0,Fe)),{pathname:Ee,search:_e==="?"?"":_e,hash:We==="#"?"":We}}function L(ye){var Ee=ye.pathname,_e=ye.search,We=ye.hash,Ie=Ee||"/";return _e&&_e!=="?"&&(Ie+=_e.charAt(0)==="?"?_e:"?"+_e),We&&We!=="#"&&(Ie+=We.charAt(0)==="#"?We:"#"+We),Ie}function $(ye,Ee,_e,We){var Ie;typeof ye=="string"?(Ie=V(ye),Ie.state=Ee):(Ie=(0,l.Z)({},ye),Ie.pathname===void 0&&(Ie.pathname=""),Ie.search?Ie.search.charAt(0)!=="?"&&(Ie.search="?"+Ie.search):Ie.search="",Ie.hash?Ie.hash.charAt(0)!=="#"&&(Ie.hash="#"+Ie.hash):Ie.hash="",Ee!==void 0&&Ie.state===void 0&&(Ie.state=Ee));try{Ie.pathname=decodeURI(Ie.pathname)}catch(Fe){throw Fe instanceof URIError?new URIError('Pathname "'+Ie.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):Fe}return _e&&(Ie.key=_e),We?Ie.pathname?Ie.pathname.charAt(0)!=="/"&&(Ie.pathname=E(Ie.pathname,We.pathname)):Ie.pathname=We.pathname:Ie.pathname||(Ie.pathname="/"),Ie}function U(ye,Ee){return ye.pathname===Ee.pathname&&ye.search===Ee.search&&ye.hash===Ee.hash&&ye.key===Ee.key&&x(ye.state,Ee.state)}function N(){var ye=null;function Ee(ut){return ye=ut,function(){ye===ut&&(ye=null)}}function _e(ut,ht,Ot,Ue){if(ye!=null){var at=typeof ye=="function"?ye(ut,ht):ye;typeof at=="string"?typeof Ot=="function"?Ot(at,Ue):Ue(!0):Ue(at!==!1)}else Ue(!0)}var We=[];function Ie(ut){var ht=!0;function Ot(){ht&&ut.apply(void 0,arguments)}return We.push(Ot),function(){ht=!1,We=We.filter(function(Ue){return Ue!==Ot})}}function Fe(){for(var ut=arguments.length,ht=new Array(ut),Ot=0;Ot<ut;Ot++)ht[Ot]=arguments[Ot];We.forEach(function(Ue){return Ue.apply(void 0,ht)})}return{setPrompt:Ee,confirmTransitionTo:_e,appendListener:Ie,notifyListeners:Fe}}var k=!!(typeof window<"u"&&window.document&&window.document.createElement);function j(ye,Ee){Ee(window.confirm(ye))}function z(){var ye=window.navigator.userAgent;return(ye.indexOf("Android 2.")!==-1||ye.indexOf("Android 4.0")!==-1)&&ye.indexOf("Mobile Safari")!==-1&&ye.indexOf("Chrome")===-1&&ye.indexOf("Windows Phone")===-1?!1:window.history&&"pushState"in window.history}function K(){return window.navigator.userAgent.indexOf("Trident")===-1}function G(){return window.navigator.userAgent.indexOf("Firefox")===-1}function Y(ye){return ye.state===void 0&&navigator.userAgent.indexOf("CriOS")===-1}var ae="popstate",Ce="hashchange";function J(){try{return window.history.state||{}}catch{return{}}}function le(ye){ye===void 0&&(ye={}),k||(0,P.Z)(!1);var Ee=window.history,_e=z(),We=!K(),Ie=ye,Fe=Ie.forceRefresh,ut=Fe===void 0?!1:Fe,ht=Ie.getUserConfirmation,Ot=ht===void 0?j:ht,Ue=Ie.keyLength,at=Ue===void 0?6:Ue,Pt=ye.basename?F(T(ye.basename)):"";function lt(pt){var $e=pt||{},Re=$e.key,Be=$e.state,Ne=window.location,bt=Ne.pathname,Kt=Ne.search,an=Ne.hash,In=bt+Kt+an;return Pt&&(In=R(In,Pt)),$(In,Be,Re)}function kt(){return Math.random().toString(36).substr(2,at)}var nn=N();function hn(pt){(0,l.Z)(Ze,pt),Ze.length=Ee.length,nn.notifyListeners(Ze.location,Ze.action)}function Rn(pt){Y(pt)||yn(lt(pt.state))}function kn(){yn(lt(J()))}var $t=!1;function yn(pt){if($t)$t=!1,hn();else{var $e="POP";nn.confirmTransitionTo(pt,$e,Ot,function(Re){Re?hn({action:$e,location:pt}):Yn(pt)})}}function Yn(pt){var $e=Ze.location,Re=st.indexOf($e.key);Re===-1&&(Re=0);var Be=st.indexOf(pt.key);Be===-1&&(Be=0);var Ne=Re-Be;Ne&&($t=!0,Ht(Ne))}var cn=lt(J()),st=[cn.key];function on(pt){return Pt+L(pt)}function dt(pt,$e){var Re="PUSH",Be=$(pt,$e,kt(),Ze.location);nn.confirmTransitionTo(Be,Re,Ot,function(Ne){if(Ne){var bt=on(Be),Kt=Be.key,an=Be.state;if(_e)if(Ee.pushState({key:Kt,state:an},null,bt),ut)window.location.href=bt;else{var In=st.indexOf(Ze.location.key),rr=st.slice(0,In+1);rr.push(Be.key),st=rr,hn({action:Re,location:Be})}else window.location.href=bt}})}function Dt(pt,$e){var Re="REPLACE",Be=$(pt,$e,kt(),Ze.location);nn.confirmTransitionTo(Be,Re,Ot,function(Ne){if(Ne){var bt=on(Be),Kt=Be.key,an=Be.state;if(_e)if(Ee.replaceState({key:Kt,state:an},null,bt),ut)window.location.replace(bt);else{var In=st.indexOf(Ze.location.key);In!==-1&&(st[In]=Be.key),hn({action:Re,location:Be})}else window.location.replace(bt)}})}function Ht(pt){Ee.go(pt)}function rn(){Ht(-1)}function ke(){Ht(1)}var ct=0;function D(pt){ct+=pt,ct===1&&pt===1?(window.addEventListener(ae,Rn),We&&window.addEventListener(Ce,kn)):ct===0&&(window.removeEventListener(ae,Rn),We&&window.removeEventListener(Ce,kn))}var W=!1;function re(pt){pt===void 0&&(pt=!1);var $e=nn.setPrompt(pt);return W||(D(1),W=!0),function(){return W&&(W=!1,D(-1)),$e()}}function Oe(pt){var $e=nn.appendListener(pt);return D(1),function(){D(-1),$e()}}var Ze={length:Ee.length,action:"POP",location:cn,createHref:on,push:dt,replace:Dt,go:Ht,goBack:rn,goForward:ke,block:re,listen:Oe};return Ze}var be="hashchange",te={hashbang:{encodePath:function(Ee){return Ee.charAt(0)==="!"?Ee:"!/"+O(Ee)},decodePath:function(Ee){return Ee.charAt(0)==="!"?Ee.substr(1):Ee}},noslash:{encodePath:O,decodePath:T},slash:{encodePath:T,decodePath:T}};function q(ye){var Ee=ye.indexOf("#");return Ee===-1?ye:ye.slice(0,Ee)}function ee(){var ye=window.location.href,Ee=ye.indexOf("#");return Ee===-1?"":ye.substring(Ee+1)}function Se(ye){window.location.hash=ye}function tt(ye){window.location.replace(q(window.location.href)+"#"+ye)}function Ae(ye){ye===void 0&&(ye={}),k||(0,P.Z)(!1);var Ee=window.history,_e=G(),We=ye,Ie=We.getUserConfirmation,Fe=Ie===void 0?j:Ie,ut=We.hashType,ht=ut===void 0?"slash":ut,Ot=ye.basename?F(T(ye.basename)):"",Ue=te[ht],at=Ue.encodePath,Pt=Ue.decodePath;function lt(){var Re=Pt(ee());return Ot&&(Re=R(Re,Ot)),$(Re)}var kt=N();function nn(Re){(0,l.Z)($e,Re),$e.length=Ee.length,kt.notifyListeners($e.location,$e.action)}var hn=!1,Rn=null;function kn(Re,Be){return Re.pathname===Be.pathname&&Re.search===Be.search&&Re.hash===Be.hash}function $t(){var Re=ee(),Be=at(Re);if(Re!==Be)tt(Be);else{var Ne=lt(),bt=$e.location;if(!hn&&kn(bt,Ne)||Rn===L(Ne))return;Rn=null,yn(Ne)}}function yn(Re){if(hn)hn=!1,nn();else{var Be="POP";kt.confirmTransitionTo(Re,Be,Fe,function(Ne){Ne?nn({action:Be,location:Re}):Yn(Re)})}}function Yn(Re){var Be=$e.location,Ne=dt.lastIndexOf(L(Be));Ne===-1&&(Ne=0);var bt=dt.lastIndexOf(L(Re));bt===-1&&(bt=0);var Kt=Ne-bt;Kt&&(hn=!0,ke(Kt))}var cn=ee(),st=at(cn);cn!==st&&tt(st);var on=lt(),dt=[L(on)];function Dt(Re){var Be=document.querySelector("base"),Ne="";return Be&&Be.getAttribute("href")&&(Ne=q(window.location.href)),Ne+"#"+at(Ot+L(Re))}function Ht(Re,Be){var Ne="PUSH",bt=$(Re,void 0,void 0,$e.location);kt.confirmTransitionTo(bt,Ne,Fe,function(Kt){if(Kt){var an=L(bt),In=at(Ot+an),rr=ee()!==In;if(rr){Rn=an,Se(In);var Wn=dt.lastIndexOf(L($e.location)),gr=dt.slice(0,Wn+1);gr.push(an),dt=gr,nn({action:Ne,location:bt})}else nn()}})}function rn(Re,Be){var Ne="REPLACE",bt=$(Re,void 0,void 0,$e.location);kt.confirmTransitionTo(bt,Ne,Fe,function(Kt){if(Kt){var an=L(bt),In=at(Ot+an),rr=ee()!==In;rr&&(Rn=an,tt(In));var Wn=dt.indexOf(L($e.location));Wn!==-1&&(dt[Wn]=an),nn({action:Ne,location:bt})}})}function ke(Re){Ee.go(Re)}function ct(){ke(-1)}function D(){ke(1)}var W=0;function re(Re){W+=Re,W===1&&Re===1?window.addEventListener(be,$t):W===0&&window.removeEventListener(be,$t)}var Oe=!1;function Ze(Re){Re===void 0&&(Re=!1);var Be=kt.setPrompt(Re);return Oe||(re(1),Oe=!0),function(){return Oe&&(Oe=!1,re(-1)),Be()}}function pt(Re){var Be=kt.appendListener(Re);return re(1),function(){re(-1),Be()}}var $e={length:Ee.length,action:"POP",location:on,createHref:Dt,push:Ht,replace:rn,go:ke,goBack:ct,goForward:D,block:Ze,listen:pt};return $e}function pe(ye,Ee,_e){return Math.min(Math.max(ye,Ee),_e)}function Pe(ye){ye===void 0&&(ye={});var Ee=ye,_e=Ee.getUserConfirmation,We=Ee.initialEntries,Ie=We===void 0?["/"]:We,Fe=Ee.initialIndex,ut=Fe===void 0?0:Fe,ht=Ee.keyLength,Ot=ht===void 0?6:ht,Ue=N();function at(dt){(0,l.Z)(on,dt),on.length=on.entries.length,Ue.notifyListeners(on.location,on.action)}function Pt(){return Math.random().toString(36).substr(2,Ot)}var lt=pe(ut,0,Ie.length-1),kt=Ie.map(function(dt){return typeof dt=="string"?$(dt,void 0,Pt()):$(dt,void 0,dt.key||Pt())}),nn=L;function hn(dt,Dt){var Ht="PUSH",rn=$(dt,Dt,Pt(),on.location);Ue.confirmTransitionTo(rn,Ht,_e,function(ke){if(ke){var ct=on.index,D=ct+1,W=on.entries.slice(0);W.length>D?W.splice(D,W.length-D,rn):W.push(rn),at({action:Ht,location:rn,index:D,entries:W})}})}function Rn(dt,Dt){var Ht="REPLACE",rn=$(dt,Dt,Pt(),on.location);Ue.confirmTransitionTo(rn,Ht,_e,function(ke){ke&&(on.entries[on.index]=rn,at({action:Ht,location:rn}))})}function kn(dt){var Dt=pe(on.index+dt,0,on.entries.length-1),Ht="POP",rn=on.entries[Dt];Ue.confirmTransitionTo(rn,Ht,_e,function(ke){ke?at({action:Ht,location:rn,index:Dt}):at()})}function $t(){kn(-1)}function yn(){kn(1)}function Yn(dt){var Dt=on.index+dt;return Dt>=0&&Dt<on.entries.length}function cn(dt){return dt===void 0&&(dt=!1),Ue.setPrompt(dt)}function st(dt){return Ue.appendListener(dt)}var on={length:kt.length,action:"POP",location:kt[lt],index:lt,entries:kt,createHref:nn,push:hn,replace:Rn,go:kn,goBack:$t,goForward:yn,canGo:Yn,block:cn,listen:st};return on}},86058:function(_,b,i){"use strict";var l=i(72594),f={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},d={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},g={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},E={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},m={};m[l.ForwardRef]=g,m[l.Memo]=E;function C(V){return l.isMemo(V)?E:m[V.$$typeof]||f}var x=Object.defineProperty,P=Object.getOwnPropertyNames,T=Object.getOwnPropertySymbols,O=Object.getOwnPropertyDescriptor,w=Object.getPrototypeOf,R=Object.prototype;function F(V,L,$){if(typeof L!="string"){if(R){var U=w(L);U&&U!==R&&F(V,U,$)}var N=P(L);T&&(N=N.concat(T(L)));for(var k=C(V),j=C(L),z=0;z<N.length;++z){var K=N[z];if(!d[K]&&!($&&$[K])&&!(j&&j[K])&&!(k&&k[K])){var G=O(L,K);try{x(V,K,G)}catch{}}}}return V}_.exports=F},97889:function(_,b,i){"use strict";i.d(b,{Uy:function(){return on},Vk:function(){return tt}});function l(D){for(var W=arguments.length,re=Array(W>1?W-1:0),Oe=1;Oe<W;Oe++)re[Oe-1]=arguments[Oe];if(!1)var Ze,pt;throw Error("[Immer] minified error nr: "+D+(re.length?" "+re.map(function($e){return"'"+$e+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function f(D){return!!D&&!!D[lt]}function d(D){var W;return!!D&&(function(re){if(!re||typeof re!="object")return!1;var Oe=Object.getPrototypeOf(re);if(Oe===null)return!0;var Ze=Object.hasOwnProperty.call(Oe,"constructor")&&Oe.constructor;return Ze===Object||typeof Ze=="function"&&Function.toString.call(Ze)===hn}(D)||Array.isArray(D)||!!D[Pt]||!!(!((W=D.constructor)===null||W===void 0)&&W[Pt])||O(D)||w(D))}function g(D){return f(D)||l(23,D),D[lt].t}function E(D,W,re){re===void 0&&(re=!1),m(D)===0?(re?Object.keys:Rn)(D).forEach(function(Oe){re&&typeof Oe=="symbol"||W(Oe,D[Oe],D)}):D.forEach(function(Oe,Ze){return W(Ze,Oe,D)})}function m(D){var W=D[lt];return W?W.i>3?W.i-4:W.i:Array.isArray(D)?1:O(D)?2:w(D)?3:0}function C(D,W){return m(D)===2?D.has(W):Object.prototype.hasOwnProperty.call(D,W)}function x(D,W){return m(D)===2?D.get(W):D[W]}function P(D,W,re){var Oe=m(D);Oe===2?D.set(W,re):Oe===3?D.add(re):D[W]=re}function T(D,W){return D===W?D!==0||1/D==1/W:D!=D&&W!=W}function O(D){return ht&&D instanceof Map}function w(D){return Ot&&D instanceof Set}function R(D){return D.o||D.t}function F(D){if(Array.isArray(D))return Array.prototype.slice.call(D);var W=kn(D);delete W[lt];for(var re=Rn(W),Oe=0;Oe<re.length;Oe++){var Ze=re[Oe],pt=W[Ze];pt.writable===!1&&(pt.writable=!0,pt.configurable=!0),(pt.get||pt.set)&&(W[Ze]={configurable:!0,writable:!0,enumerable:pt.enumerable,value:D[Ze]})}return Object.create(Object.getPrototypeOf(D),W)}function V(D,W){return W===void 0&&(W=!1),$(D)||f(D)||!d(D)||(m(D)>1&&(D.set=D.add=D.clear=D.delete=L),Object.freeze(D),W&&E(D,function(re,Oe){return V(Oe,!0)},!0)),D}function L(){l(2)}function $(D){return D==null||typeof D!="object"||Object.isFrozen(D)}function U(D){var W=$t[D];return W||l(18,D),W}function N(D,W){$t[D]||($t[D]=W)}function k(){return Fe}function j(D,W){W&&(U("Patches"),D.u=[],D.s=[],D.v=W)}function z(D){K(D),D.p.forEach(Y),D.p=null}function K(D){D===Fe&&(Fe=D.l)}function G(D){return Fe={p:[],l:Fe,h:D,m:!0,_:0}}function Y(D){var W=D[lt];W.i===0||W.i===1?W.j():W.O=!0}function ae(D,W){W._=W.p.length;var re=W.p[0],Oe=D!==void 0&&D!==re;return W.h.g||U("ES5").S(W,D,Oe),Oe?(re[lt].P&&(z(W),l(4)),d(D)&&(D=Ce(W,D),W.l||le(W,D)),W.u&&U("Patches").M(re[lt].t,D,W.u,W.s)):D=Ce(W,re,[]),z(W),W.u&&W.v(W.u,W.s),D!==at?D:void 0}function Ce(D,W,re){if($(W))return W;var Oe=W[lt];if(!Oe)return E(W,function(Re,Be){return J(D,Oe,W,Re,Be,re)},!0),W;if(Oe.A!==D)return W;if(!Oe.P)return le(D,Oe.t,!0),Oe.t;if(!Oe.I){Oe.I=!0,Oe.A._--;var Ze=Oe.i===4||Oe.i===5?Oe.o=F(Oe.k):Oe.o,pt=Ze,$e=!1;Oe.i===3&&(pt=new Set(Ze),Ze.clear(),$e=!0),E(pt,function(Re,Be){return J(D,Oe,Ze,Re,Be,re,$e)}),le(D,Ze,!1),re&&D.u&&U("Patches").N(Oe,re,D.u,D.s)}return Oe.o}function J(D,W,re,Oe,Ze,pt,$e){if(f(Ze)){var Re=Ce(D,Ze,pt&&W&&W.i!==3&&!C(W.R,Oe)?pt.concat(Oe):void 0);if(P(re,Oe,Re),!f(Re))return;D.m=!1}else $e&&re.add(Ze);if(d(Ze)&&!$(Ze)){if(!D.h.D&&D._<1)return;Ce(D,Ze),W&&W.A.l||le(D,Ze)}}function le(D,W,re){re===void 0&&(re=!1),!D.l&&D.h.D&&D.m&&V(W,re)}function be(D,W){var re=D[lt];return(re?R(re):D)[W]}function te(D,W){if(W in D)for(var re=Object.getPrototypeOf(D);re;){var Oe=Object.getOwnPropertyDescriptor(re,W);if(Oe)return Oe;re=Object.getPrototypeOf(re)}}function q(D){D.P||(D.P=!0,D.l&&q(D.l))}function ee(D){D.o||(D.o=F(D.t))}function Se(D,W,re){var Oe=O(W)?U("MapSet").F(W,re):w(W)?U("MapSet").T(W,re):D.g?function(Ze,pt){var $e=Array.isArray(Ze),Re={i:$e?1:0,A:pt?pt.A:k(),P:!1,I:!1,R:{},l:pt,t:Ze,k:null,o:null,j:null,C:!1},Be=Re,Ne=yn;$e&&(Be=[Re],Ne=Yn);var bt=Proxy.revocable(Be,Ne),Kt=bt.revoke,an=bt.proxy;return Re.k=an,Re.j=Kt,an}(W,re):U("ES5").J(W,re);return(re?re.A:k()).p.push(Oe),Oe}function tt(D){return f(D)||l(22,D),function W(re){if(!d(re))return re;var Oe,Ze=re[lt],pt=m(re);if(Ze){if(!Ze.P&&(Ze.i<4||!U("ES5").K(Ze)))return Ze.t;Ze.I=!0,Oe=Ae(re,pt),Ze.I=!1}else Oe=Ae(re,pt);return E(Oe,function($e,Re){Ze&&x(Ze.t,$e)===Re||P(Oe,$e,W(Re))}),pt===3?new Set(Oe):Oe}(D)}function Ae(D,W){switch(W){case 2:return new Map(D);case 3:return Array.from(D)}return F(D)}function pe(){function D($e,Re){var Be=pt[$e];return Be?Be.enumerable=Re:pt[$e]=Be={configurable:!0,enumerable:Re,get:function(){var Ne=this[lt];return yn.get(Ne,$e)},set:function(Ne){var bt=this[lt];yn.set(bt,$e,Ne)}},Be}function W($e){for(var Re=$e.length-1;Re>=0;Re--){var Be=$e[Re][lt];if(!Be.P)switch(Be.i){case 5:Oe(Be)&&q(Be);break;case 4:re(Be)&&q(Be)}}}function re($e){for(var Re=$e.t,Be=$e.k,Ne=Rn(Be),bt=Ne.length-1;bt>=0;bt--){var Kt=Ne[bt];if(Kt!==lt){var an=Re[Kt];if(an===void 0&&!C(Re,Kt))return!0;var In=Be[Kt],rr=In&&In[lt];if(rr?rr.t!==an:!T(In,an))return!0}}var Wn=!!Re[lt];return Ne.length!==Rn(Re).length+(Wn?0:1)}function Oe($e){var Re=$e.k;if(Re.length!==$e.t.length)return!0;var Be=Object.getOwnPropertyDescriptor(Re,Re.length-1);if(Be&&!Be.get)return!0;for(var Ne=0;Ne<Re.length;Ne++)if(!Re.hasOwnProperty(Ne))return!0;return!1}function Ze($e){$e.O&&l(3,JSON.stringify(R($e)))}var pt={};N("ES5",{J:function($e,Re){var Be=Array.isArray($e),Ne=function(Kt,an){if(Kt){for(var In=Array(an.length),rr=0;rr<an.length;rr++)Object.defineProperty(In,""+rr,D(rr,!0));return In}var Wn=kn(an);delete Wn[lt];for(var gr=Rn(Wn),fr=0;fr<gr.length;fr++){var Rr=gr[fr];Wn[Rr]=D(Rr,Kt||!!Wn[Rr].enumerable)}return Object.create(Object.getPrototypeOf(an),Wn)}(Be,$e),bt={i:Be?5:4,A:Re?Re.A:k(),P:!1,I:!1,R:{},l:Re,t:$e,k:Ne,o:null,O:!1,C:!1};return Object.defineProperty(Ne,lt,{value:bt,writable:!0}),Ne},S:function($e,Re,Be){Be?f(Re)&&Re[lt].A===$e&&W($e.p):($e.u&&function Ne(bt){if(bt&&typeof bt=="object"){var Kt=bt[lt];if(Kt){var an=Kt.t,In=Kt.k,rr=Kt.R,Wn=Kt.i;if(Wn===4)E(In,function(ei){ei!==lt&&(an[ei]!==void 0||C(an,ei)?rr[ei]||Ne(In[ei]):(rr[ei]=!0,q(Kt)))}),E(an,function(ei){In[ei]!==void 0||C(In,ei)||(rr[ei]=!1,q(Kt))});else if(Wn===5){if(Oe(Kt)&&(q(Kt),rr.length=!0),In.length<an.length)for(var gr=In.length;gr<an.length;gr++)rr[gr]=!1;else for(var fr=an.length;fr<In.length;fr++)rr[fr]=!0;for(var Rr=Math.min(In.length,an.length),Vr=0;Vr<Rr;Vr++)In.hasOwnProperty(Vr)||(rr[Vr]=!0),rr[Vr]===void 0&&Ne(In[Vr])}}}}($e.p[0]),W($e.p))},K:function($e){return $e.i===4?re($e):Oe($e)}})}function Pe(){function D(Oe){if(!d(Oe))return Oe;if(Array.isArray(Oe))return Oe.map(D);if(O(Oe))return new Map(Array.from(Oe.entries()).map(function($e){return[$e[0],D($e[1])]}));if(w(Oe))return new Set(Array.from(Oe).map(D));var Ze=Object.create(Object.getPrototypeOf(Oe));for(var pt in Oe)Ze[pt]=D(Oe[pt]);return C(Oe,Pt)&&(Ze[Pt]=Oe[Pt]),Ze}function W(Oe){return f(Oe)?D(Oe):Oe}var re="add";N("Patches",{$:function(Oe,Ze){return Ze.forEach(function(pt){for(var $e=pt.path,Re=pt.op,Be=Oe,Ne=0;Ne<$e.length-1;Ne++){var bt=m(Be),Kt=""+$e[Ne];bt!==0&&bt!==1||Kt!=="__proto__"&&Kt!=="constructor"||l(24),typeof Be=="function"&&Kt==="prototype"&&l(24),typeof(Be=x(Be,Kt))!="object"&&l(15,$e.join("/"))}var an=m(Be),In=D(pt.value),rr=$e[$e.length-1];switch(Re){case"replace":switch(an){case 2:return Be.set(rr,In);case 3:l(16);default:return Be[rr]=In}case re:switch(an){case 1:return rr==="-"?Be.push(In):Be.splice(rr,0,In);case 2:return Be.set(rr,In);case 3:return Be.add(In);default:return Be[rr]=In}case"remove":switch(an){case 1:return Be.splice(rr,1);case 2:return Be.delete(rr);case 3:return Be.delete(pt.value);default:return delete Be[rr]}default:l(17,Re)}}),Oe},N:function(Oe,Ze,pt,$e){switch(Oe.i){case 0:case 4:case 2:return function(Re,Be,Ne,bt){var Kt=Re.t,an=Re.o;E(Re.R,function(In,rr){var Wn=x(Kt,In),gr=x(an,In),fr=rr?C(Kt,In)?"replace":re:"remove";if(Wn!==gr||fr!=="replace"){var Rr=Be.concat(In);Ne.push(fr==="remove"?{op:fr,path:Rr}:{op:fr,path:Rr,value:gr}),bt.push(fr===re?{op:"remove",path:Rr}:fr==="remove"?{op:re,path:Rr,value:W(Wn)}:{op:"replace",path:Rr,value:W(Wn)})}})}(Oe,Ze,pt,$e);case 5:case 1:return function(Re,Be,Ne,bt){var Kt=Re.t,an=Re.R,In=Re.o;if(In.length<Kt.length){var rr=[In,Kt];Kt=rr[0],In=rr[1];var Wn=[bt,Ne];Ne=Wn[0],bt=Wn[1]}for(var gr=0;gr<Kt.length;gr++)if(an[gr]&&In[gr]!==Kt[gr]){var fr=Be.concat([gr]);Ne.push({op:"replace",path:fr,value:W(In[gr])}),bt.push({op:"replace",path:fr,value:W(Kt[gr])})}for(var Rr=Kt.length;Rr<In.length;Rr++){var Vr=Be.concat([Rr]);Ne.push({op:re,path:Vr,value:W(In[Rr])})}Kt.length<In.length&&bt.push({op:"replace",path:Be.concat(["length"]),value:Kt.length})}(Oe,Ze,pt,$e);case 3:return function(Re,Be,Ne,bt){var Kt=Re.t,an=Re.o,In=0;Kt.forEach(function(rr){if(!an.has(rr)){var Wn=Be.concat([In]);Ne.push({op:"remove",path:Wn,value:rr}),bt.unshift({op:re,path:Wn,value:rr})}In++}),In=0,an.forEach(function(rr){if(!Kt.has(rr)){var Wn=Be.concat([In]);Ne.push({op:re,path:Wn,value:rr}),bt.unshift({op:"remove",path:Wn,value:rr})}In++})}(Oe,Ze,pt,$e)}},M:function(Oe,Ze,pt,$e){pt.push({op:"replace",path:[],value:Ze===at?void 0:Ze}),$e.push({op:"replace",path:[],value:Oe})}})}function ye(){function D(Re,Be){function Ne(){this.constructor=Re}Ze(Re,Be),Re.prototype=(Ne.prototype=Be.prototype,new Ne)}function W(Re){Re.o||(Re.R=new Map,Re.o=new Map(Re.t))}function re(Re){Re.o||(Re.o=new Set,Re.t.forEach(function(Be){if(d(Be)){var Ne=Se(Re.A.h,Be,Re);Re.p.set(Be,Ne),Re.o.add(Ne)}else Re.o.add(Be)}))}function Oe(Re){Re.O&&l(3,JSON.stringify(R(Re)))}var Ze=function(Re,Be){return(Ze=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ne,bt){Ne.__proto__=bt}||function(Ne,bt){for(var Kt in bt)bt.hasOwnProperty(Kt)&&(Ne[Kt]=bt[Kt])})(Re,Be)},pt=function(){function Re(Ne,bt){return this[lt]={i:2,l:bt,A:bt?bt.A:k(),P:!1,I:!1,o:void 0,R:void 0,t:Ne,k:this,C:!1,O:!1},this}D(Re,Map);var Be=Re.prototype;return Object.defineProperty(Be,"size",{get:function(){return R(this[lt]).size}}),Be.has=function(Ne){return R(this[lt]).has(Ne)},Be.set=function(Ne,bt){var Kt=this[lt];return Oe(Kt),R(Kt).has(Ne)&&R(Kt).get(Ne)===bt||(W(Kt),q(Kt),Kt.R.set(Ne,!0),Kt.o.set(Ne,bt),Kt.R.set(Ne,!0)),this},Be.delete=function(Ne){if(!this.has(Ne))return!1;var bt=this[lt];return Oe(bt),W(bt),q(bt),bt.t.has(Ne)?bt.R.set(Ne,!1):bt.R.delete(Ne),bt.o.delete(Ne),!0},Be.clear=function(){var Ne=this[lt];Oe(Ne),R(Ne).size&&(W(Ne),q(Ne),Ne.R=new Map,E(Ne.t,function(bt){Ne.R.set(bt,!1)}),Ne.o.clear())},Be.forEach=function(Ne,bt){var Kt=this;R(this[lt]).forEach(function(an,In){Ne.call(bt,Kt.get(In),In,Kt)})},Be.get=function(Ne){var bt=this[lt];Oe(bt);var Kt=R(bt).get(Ne);if(bt.I||!d(Kt)||Kt!==bt.t.get(Ne))return Kt;var an=Se(bt.A.h,Kt,bt);return W(bt),bt.o.set(Ne,an),an},Be.keys=function(){return R(this[lt]).keys()},Be.values=function(){var Ne,bt=this,Kt=this.keys();return(Ne={})[kt]=function(){return bt.values()},Ne.next=function(){var an=Kt.next();return an.done?an:{done:!1,value:bt.get(an.value)}},Ne},Be.entries=function(){var Ne,bt=this,Kt=this.keys();return(Ne={})[kt]=function(){return bt.entries()},Ne.next=function(){var an=Kt.next();if(an.done)return an;var In=bt.get(an.value);return{done:!1,value:[an.value,In]}},Ne},Be[kt]=function(){return this.entries()},Re}(),$e=function(){function Re(Ne,bt){return this[lt]={i:3,l:bt,A:bt?bt.A:k(),P:!1,I:!1,o:void 0,t:Ne,k:this,p:new Map,O:!1,C:!1},this}D(Re,Set);var Be=Re.prototype;return Object.defineProperty(Be,"size",{get:function(){return R(this[lt]).size}}),Be.has=function(Ne){var bt=this[lt];return Oe(bt),bt.o?!!bt.o.has(Ne)||!(!bt.p.has(Ne)||!bt.o.has(bt.p.get(Ne))):bt.t.has(Ne)},Be.add=function(Ne){var bt=this[lt];return Oe(bt),this.has(Ne)||(re(bt),q(bt),bt.o.add(Ne)),this},Be.delete=function(Ne){if(!this.has(Ne))return!1;var bt=this[lt];return Oe(bt),re(bt),q(bt),bt.o.delete(Ne)||!!bt.p.has(Ne)&&bt.o.delete(bt.p.get(Ne))},Be.clear=function(){var Ne=this[lt];Oe(Ne),R(Ne).size&&(re(Ne),q(Ne),Ne.o.clear())},Be.values=function(){var Ne=this[lt];return Oe(Ne),re(Ne),Ne.o.values()},Be.entries=function(){var Ne=this[lt];return Oe(Ne),re(Ne),Ne.o.entries()},Be.keys=function(){return this.values()},Be[kt]=function(){return this.values()},Be.forEach=function(Ne,bt){for(var Kt=this.values(),an=Kt.next();!an.done;)Ne.call(bt,an.value,an.value,this),an=Kt.next()},Re}();N("MapSet",{F:function(Re,Be){return new pt(Re,Be)},T:function(Re,Be){return new $e(Re,Be)}})}function Ee(){pe(),ye(),Pe()}function _e(D){return D}function We(D){return D}var Ie,Fe,ut=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ht=typeof Map<"u",Ot=typeof Set<"u",Ue=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",at=ut?Symbol.for("immer-nothing"):((Ie={})["immer-nothing"]=!0,Ie),Pt=ut?Symbol.for("immer-draftable"):"__$immer_draftable",lt=ut?Symbol.for("immer-state"):"__$immer_state",kt=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",nn={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(D){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+D},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(D){return"Cannot apply patch, path doesn't resolve: "+D},16:'Sets cannot have "replace" patches.',17:function(D){return"Unsupported patch operation: "+D},18:function(D){return"The plugin for '"+D+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+D+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(D){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+D+"'"},22:function(D){return"'current' expects a draft, got: "+D},23:function(D){return"'original' expects a draft, got: "+D},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},hn=""+Object.prototype.constructor,Rn=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(D){return Object.getOwnPropertyNames(D).concat(Object.getOwnPropertySymbols(D))}:Object.getOwnPropertyNames,kn=Object.getOwnPropertyDescriptors||function(D){var W={};return Rn(D).forEach(function(re){W[re]=Object.getOwnPropertyDescriptor(D,re)}),W},$t={},yn={get:function(D,W){if(W===lt)return D;var re=R(D);if(!C(re,W))return function(Ze,pt,$e){var Re,Be=te(pt,$e);return Be?"value"in Be?Be.value:(Re=Be.get)===null||Re===void 0?void 0:Re.call(Ze.k):void 0}(D,re,W);var Oe=re[W];return D.I||!d(Oe)?Oe:Oe===be(D.t,W)?(ee(D),D.o[W]=Se(D.A.h,Oe,D)):Oe},has:function(D,W){return W in R(D)},ownKeys:function(D){return Reflect.ownKeys(R(D))},set:function(D,W,re){var Oe=te(R(D),W);if(Oe?.set)return Oe.set.call(D.k,re),!0;if(!D.P){var Ze=be(R(D),W),pt=Ze?.[lt];if(pt&&pt.t===re)return D.o[W]=re,D.R[W]=!1,!0;if(T(re,Ze)&&(re!==void 0||C(D.t,W)))return!0;ee(D),q(D)}return D.o[W]===re&&(re!==void 0||W in D.o)||Number.isNaN(re)&&Number.isNaN(D.o[W])||(D.o[W]=re,D.R[W]=!0),!0},deleteProperty:function(D,W){return be(D.t,W)!==void 0||W in D.t?(D.R[W]=!1,ee(D),q(D)):delete D.R[W],D.o&&delete D.o[W],!0},getOwnPropertyDescriptor:function(D,W){var re=R(D),Oe=Reflect.getOwnPropertyDescriptor(re,W);return Oe&&{writable:!0,configurable:D.i!==1||W!=="length",enumerable:Oe.enumerable,value:re[W]}},defineProperty:function(){l(11)},getPrototypeOf:function(D){return Object.getPrototypeOf(D.t)},setPrototypeOf:function(){l(12)}},Yn={};E(yn,function(D,W){Yn[D]=function(){return arguments[0]=arguments[0][0],W.apply(this,arguments)}}),Yn.deleteProperty=function(D,W){return Yn.set.call(this,D,W,void 0)},Yn.set=function(D,W,re){return yn.set.call(this,D[0],W,re,D[0])};var cn=function(){function D(re){var Oe=this;this.g=Ue,this.D=!0,this.produce=function(Ze,pt,$e){if(typeof Ze=="function"&&typeof pt!="function"){var Re=pt;pt=Ze;var Be=Oe;return function(Wn){var gr=this;Wn===void 0&&(Wn=Re);for(var fr=arguments.length,Rr=Array(fr>1?fr-1:0),Vr=1;Vr<fr;Vr++)Rr[Vr-1]=arguments[Vr];return Be.produce(Wn,function(ei){var Ct;return(Ct=pt).call.apply(Ct,[gr,ei].concat(Rr))})}}var Ne;if(typeof pt!="function"&&l(6),$e!==void 0&&typeof $e!="function"&&l(7),d(Ze)){var bt=G(Oe),Kt=Se(Oe,Ze,void 0),an=!0;try{Ne=pt(Kt),an=!1}finally{an?z(bt):K(bt)}return typeof Promise<"u"&&Ne instanceof Promise?Ne.then(function(Wn){return j(bt,$e),ae(Wn,bt)},function(Wn){throw z(bt),Wn}):(j(bt,$e),ae(Ne,bt))}if(!Ze||typeof Ze!="object"){if((Ne=pt(Ze))===void 0&&(Ne=Ze),Ne===at&&(Ne=void 0),Oe.D&&V(Ne,!0),$e){var In=[],rr=[];U("Patches").M(Ze,Ne,In,rr),$e(In,rr)}return Ne}l(21,Ze)},this.produceWithPatches=function(Ze,pt){if(typeof Ze=="function")return function(Ne){for(var bt=arguments.length,Kt=Array(bt>1?bt-1:0),an=1;an<bt;an++)Kt[an-1]=arguments[an];return Oe.produceWithPatches(Ne,function(In){return Ze.apply(void 0,[In].concat(Kt))})};var $e,Re,Be=Oe.produce(Ze,pt,function(Ne,bt){$e=Ne,Re=bt});return typeof Promise<"u"&&Be instanceof Promise?Be.then(function(Ne){return[Ne,$e,Re]}):[Be,$e,Re]},typeof re?.useProxies=="boolean"&&this.setUseProxies(re.useProxies),typeof re?.autoFreeze=="boolean"&&this.setAutoFreeze(re.autoFreeze)}var W=D.prototype;return W.createDraft=function(re){d(re)||l(8),f(re)&&(re=tt(re));var Oe=G(this),Ze=Se(this,re,void 0);return Ze[lt].C=!0,K(Oe),Ze},W.finishDraft=function(re,Oe){var Ze=re&&re[lt],pt=Ze.A;return j(pt,Oe),ae(void 0,pt)},W.setAutoFreeze=function(re){this.D=re},W.setUseProxies=function(re){re&&!Ue&&l(20),this.g=re},W.applyPatches=function(re,Oe){var Ze;for(Ze=Oe.length-1;Ze>=0;Ze--){var pt=Oe[Ze];if(pt.path.length===0&&pt.op==="replace"){re=pt.value;break}}Ze>-1&&(Oe=Oe.slice(Ze+1));var $e=U("Patches").$;return f(re)?$e(re,Oe):this.produce(re,function(Re){return $e(Re,Oe)})},D}(),st=new cn,on=st.produce,dt=st.produceWithPatches.bind(st),Dt=st.setAutoFreeze.bind(st),Ht=st.setUseProxies.bind(st),rn=st.applyPatches.bind(st),ke=st.createDraft.bind(st),ct=st.finishDraft.bind(st);b.ZP=on},75461:function(_,b,i){"use strict";i.d(b,{C:function(){return P}});var l=i(31191),f=i(20552),d=i(16315),g=i(33961);function E(T,O){return O?(0,l.pi)((0,l.pi)((0,l.pi)({},T||{}),O||{}),Object.keys(T).reduce(function(w,R){return w[R]=(0,l.pi)((0,l.pi)({},T[R]),O[R]||{}),w},{})):T}function m(T,O){return O?Object.keys(T).reduce(function(w,R){return w[R]=E(T[R],O[R]),w},(0,l.pi)({},T)):T}function C(T){return{create:function(){return{get:function(O){return T[O]},set:function(O,w){T[O]=w}}}}}function x(T){return T===void 0&&(T={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:(0,d.H)(function(){for(var O,w=[],R=0;R<arguments.length;R++)w[R]=arguments[R];return new((O=Intl.NumberFormat).bind.apply(O,(0,l.ev)([void 0],w,!1)))},{cache:C(T.number),strategy:d.A.variadic}),getDateTimeFormat:(0,d.H)(function(){for(var O,w=[],R=0;R<arguments.length;R++)w[R]=arguments[R];return new((O=Intl.DateTimeFormat).bind.apply(O,(0,l.ev)([void 0],w,!1)))},{cache:C(T.dateTime),strategy:d.A.variadic}),getPluralRules:(0,d.H)(function(){for(var O,w=[],R=0;R<arguments.length;R++)w[R]=arguments[R];return new((O=Intl.PluralRules).bind.apply(O,(0,l.ev)([void 0],w,!1)))},{cache:C(T.pluralRules),strategy:d.A.variadic})}}var P=function(){function T(O,w,R,F){w===void 0&&(w=T.defaultLocale);var V=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(N){var k=V.formatToParts(N);if(k.length===1)return k[0].value;var j=k.reduce(function(z,K){return!z.length||K.type!==g.du.literal||typeof z[z.length-1]!="string"?z.push(K.value):z[z.length-1]+=K.value,z},[]);return j.length<=1?j[0]||"":j},this.formatToParts=function(N){return(0,g.FK)(V.ast,V.locales,V.formatters,V.formats,N,void 0,V.message)},this.resolvedOptions=function(){var N;return{locale:((N=V.resolvedLocale)===null||N===void 0?void 0:N.toString())||Intl.NumberFormat.supportedLocalesOf(V.locales)[0]}},this.getAst=function(){return V.ast},this.locales=w,this.resolvedLocale=T.resolveLocale(w),typeof O=="string"){if(this.message=O,!T.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var L=F||{},$=L.formatters,U=(0,l._T)(L,["formatters"]);this.ast=T.__parse(O,(0,l.pi)((0,l.pi)({},U),{locale:this.resolvedLocale}))}else this.ast=O;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=m(T.formats,R),this.formatters=F&&F.formatters||x(this.formatterCache)}return Object.defineProperty(T,"defaultLocale",{get:function(){return T.memoizedDefaultLocale||(T.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),T.memoizedDefaultLocale},enumerable:!1,configurable:!0}),T.memoizedDefaultLocale=null,T.resolveLocale=function(O){if(!(typeof Intl.Locale>"u")){var w=Intl.NumberFormat.supportedLocalesOf(O);return w.length>0?new Intl.Locale(w[0]):new Intl.Locale(typeof O=="string"?O:O[0])}},T.__parse=f.Qc,T.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},T}()},14979:function(_,b,i){"use strict";i.d(b,{C8:function(){return g},HR:function(){return m},YR:function(){return E},jK:function(){return f},u_:function(){return d}});var l=i(31191),f;(function(C){C.MISSING_VALUE="MISSING_VALUE",C.INVALID_VALUE="INVALID_VALUE",C.MISSING_INTL_API="MISSING_INTL_API"})(f||(f={}));var d=function(C){(0,l.ZT)(x,C);function x(P,T,O){var w=C.call(this,P)||this;return w.code=T,w.originalMessage=O,w}return x.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},x}(Error),g=function(C){(0,l.ZT)(x,C);function x(P,T,O,w){return C.call(this,'Invalid values for "'.concat(P,'": "').concat(T,'". Options are "').concat(Object.keys(O).join('", "'),'"'),f.INVALID_VALUE,w)||this}return x}(d),E=function(C){(0,l.ZT)(x,C);function x(P,T,O){return C.call(this,'Value for "'.concat(P,'" must be of type ').concat(T),f.INVALID_VALUE,O)||this}return x}(d),m=function(C){(0,l.ZT)(x,C);function x(P,T){return C.call(this,'The intl string context variable "'.concat(P,'" was not provided to the string "').concat(T,'"'),f.MISSING_VALUE,T)||this}return x}(d)},33961:function(_,b,i){"use strict";i.d(b,{FK:function(){return m},Gt:function(){return E},du:function(){return d}});var l=i(20552),f=i(14979),d;(function(C){C[C.literal=0]="literal",C[C.object=1]="object"})(d||(d={}));function g(C){return C.length<2?C:C.reduce(function(x,P){var T=x[x.length-1];return!T||T.type!==d.literal||P.type!==d.literal?x.push(P):T.value+=P.value,x},[])}function E(C){return typeof C=="function"}function m(C,x,P,T,O,w,R){if(C.length===1&&(0,l.O4)(C[0]))return[{type:d.literal,value:C[0].value}];for(var F=[],V=0,L=C;V<L.length;V++){var $=L[V];if((0,l.O4)($)){F.push({type:d.literal,value:$.value});continue}if((0,l.yx)($)){typeof w=="number"&&F.push({type:d.literal,value:P.getNumberFormat(x).format(w)});continue}var U=$.value;if(!(O&&U in O))throw new f.HR(U,R);var N=O[U];if((0,l.VG)($)){(!N||typeof N=="string"||typeof N=="number")&&(N=typeof N=="string"||typeof N=="number"?String(N):""),F.push({type:typeof N=="string"?d.literal:d.object,value:N});continue}if((0,l.rp)($)){var k=typeof $.style=="string"?T.date[$.style]:(0,l.Ii)($.style)?$.style.parsedOptions:void 0;F.push({type:d.literal,value:P.getDateTimeFormat(x,k).format(N)});continue}if((0,l.pe)($)){var k=typeof $.style=="string"?T.time[$.style]:(0,l.Ii)($.style)?$.style.parsedOptions:T.time.medium;F.push({type:d.literal,value:P.getDateTimeFormat(x,k).format(N)});continue}if((0,l.uf)($)){var k=typeof $.style=="string"?T.number[$.style]:(0,l.Wh)($.style)?$.style.parsedOptions:void 0;k&&k.scale&&(N=N*(k.scale||1)),F.push({type:d.literal,value:P.getNumberFormat(x,k).format(N)});continue}if((0,l.HI)($)){var j=$.children,z=$.value,K=O[z];if(!E(K))throw new f.YR(z,"function",R);var G=m(j,x,P,T,O,w),Y=K(G.map(function(J){return J.value}));Array.isArray(Y)||(Y=[Y]),F.push.apply(F,Y.map(function(J){return{type:typeof J=="string"?d.literal:d.object,value:J}}))}if((0,l.Wi)($)){var ae=$.options[N]||$.options.other;if(!ae)throw new f.C8($.value,N,Object.keys($.options),R);F.push.apply(F,m(ae.value,x,P,T,O));continue}if((0,l.Jo)($)){var ae=$.options["=".concat(N)];if(!ae){if(!Intl.PluralRules)throw new f.u_(`Intl.PluralRules is not available in this environment.
1133
1133
  Try polyfilling it using "@formatjs/intl-pluralrules"
1134
1134
  `,f.jK.MISSING_INTL_API,R);var Ce=P.getPluralRules(x,{type:$.pluralType}).select(N-($.offset||0));ae=$.options[Ce]||$.options.other}if(!ae)throw new f.C8($.value,N,Object.keys($.options),R);F.push.apply(F,m(ae.value,x,P,T,O,N-($.offset||0)));continue}}return g(F)}},56784:function(_){"use strict";var b=function(i,l,f,d,g,E,m,C){if(!i){var x;if(l===void 0)x=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var P=[f,d,g,E,m,C],T=0;x=new Error(l.replace(/%s/g,function(){return P[T++]})),x.name="Invariant Violation"}throw x.framesToPop=1,x}};_.exports=b},96095:function(_,b,i){var l=1/0,f="[object Symbol]",d=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,g="\\u0300-\\u036f\\ufe20-\\ufe23",E="\\u20d0-\\u20f0",m="["+g+E+"]",C=RegExp(m,"g"),x={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"ss"},P=typeof i.g=="object"&&i.g&&i.g.Object===Object&&i.g,T=typeof self=="object"&&self&&self.Object===Object&&self,O=P||T||Function("return this")();function w(G){return function(Y){return G?.[Y]}}var R=w(x),F=Object.prototype,V=F.toString,L=O.Symbol,$=L?L.prototype:void 0,U=$?$.toString:void 0;function N(G){if(typeof G=="string")return G;if(j(G))return U?U.call(G):"";var Y=G+"";return Y=="0"&&1/G==-l?"-0":Y}function k(G){return!!G&&typeof G=="object"}function j(G){return typeof G=="symbol"||k(G)&&V.call(G)==f}function z(G){return G==null?"":N(G)}function K(G){return G=z(G),G&&G.replace(d,R).replace(C,"")}_.exports=K},65549:function(_,b,i){var l=i(84457),f=i(70441),d=l(f,"DataView");_.exports=d},54613:function(_,b,i){var l=i(38145),f=i(69096),d=i(65239),g=i(78228),E=i(95920);function m(C){var x=-1,P=C==null?0:C.length;for(this.clear();++x<P;){var T=C[x];this.set(T[0],T[1])}}m.prototype.clear=l,m.prototype.delete=f,m.prototype.get=d,m.prototype.has=g,m.prototype.set=E,_.exports=m},70131:function(_,b,i){var l=i(17168),f=i(66582),d=i(13867),g=i(59557),E=i(22726);function m(C){var x=-1,P=C==null?0:C.length;for(this.clear();++x<P;){var T=C[x];this.set(T[0],T[1])}}m.prototype.clear=l,m.prototype.delete=f,m.prototype.get=d,m.prototype.has=g,m.prototype.set=E,_.exports=m},64438:function(_,b,i){var l=i(84457),f=i(70441),d=l(f,"Map");_.exports=d},90278:function(_,b,i){var l=i(67076),f=i(2530),d=i(44858),g=i(96265),E=i(59909);function m(C){var x=-1,P=C==null?0:C.length;for(this.clear();++x<P;){var T=C[x];this.set(T[0],T[1])}}m.prototype.clear=l,m.prototype.delete=f,m.prototype.get=d,m.prototype.has=g,m.prototype.set=E,_.exports=m},87076:function(_,b,i){var l=i(84457),f=i(70441),d=l(f,"Promise");_.exports=d},69902:function(_,b,i){var l=i(84457),f=i(70441),d=l(f,"Set");_.exports=d},61124:function(_,b,i){var l=i(90278),f=i(96718),d=i(66996);function g(E){var m=-1,C=E==null?0:E.length;for(this.__data__=new l;++m<C;)this.add(E[m])}g.prototype.add=g.prototype.push=f,g.prototype.has=d,_.exports=g},4281:function(_,b,i){var l=i(70131),f=i(30560),d=i(58282),g=i(46638),E=i(94270),m=i(3229);function C(x){var P=this.__data__=new l(x);this.size=P.size}C.prototype.clear=f,C.prototype.delete=d,C.prototype.get=g,C.prototype.has=E,C.prototype.set=m,_.exports=C},54690:function(_,b,i){var l=i(70441),f=l.Symbol;_.exports=f},5982:function(_,b,i){var l=i(70441),f=l.Uint8Array;_.exports=f},18965:function(_,b,i){var l=i(84457),f=i(70441),d=l(f,"WeakMap");_.exports=d},85198:function(_){function b(i,l,f){switch(f.length){case 0:return i.call(l);case 1:return i.call(l,f[0]);case 2:return i.call(l,f[0],f[1]);case 3:return i.call(l,f[0],f[1],f[2])}return i.apply(l,f)}_.exports=b},26758:function(_){function b(i,l){for(var f=-1,d=i==null?0:i.length;++f<d&&l(i[f],f,i)!==!1;);return i}_.exports=b},69037:function(_){function b(i,l){for(var f=-1,d=i==null?0:i.length,g=0,E=[];++f<d;){var m=i[f];l(m,f,i)&&(E[g++]=m)}return E}_.exports=b},16222:function(_,b,i){var l=i(55092),f=i(86981),d=i(77236),g=i(98752),E=i(74363),m=i(14812),C=Object.prototype,x=C.hasOwnProperty;function P(T,O){var w=d(T),R=!w&&f(T),F=!w&&!R&&g(T),V=!w&&!R&&!F&&m(T),L=w||R||F||V,$=L?l(T.length,String):[],U=$.length;for(var N in T)(O||x.call(T,N))&&!(L&&(N=="length"||F&&(N=="offset"||N=="parent")||V&&(N=="buffer"||N=="byteLength"||N=="byteOffset")||E(N,U)))&&$.push(N);return $}_.exports=P},26460:function(_){function b(i,l){for(var f=-1,d=i==null?0:i.length,g=Array(d);++f<d;)g[f]=l(i[f],f,i);return g}_.exports=b},63848:function(_){function b(i,l){for(var f=-1,d=l.length,g=i.length;++f<d;)i[g+f]=l[f];return i}_.exports=b},26974:function(_){function b(i,l,f,d){var g=-1,E=i==null?0:i.length;for(d&&E&&(f=i[++g]);++g<E;)f=l(f,i[g],g,i);return f}_.exports=b},44793:function(_){function b(i,l){for(var f=-1,d=i==null?0:i.length;++f<d;)if(l(i[f],f,i))return!0;return!1}_.exports=b},30804:function(_){function b(i){return i.split("")}_.exports=b},96051:function(_){var b=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function i(l){return l.match(b)||[]}_.exports=i},4373:function(_,b,i){var l=i(40999),f=i(26530);function d(g,E,m){(m!==void 0&&!f(g[E],m)||m===void 0&&!(E in g))&&l(g,E,m)}_.exports=d},47596:function(_,b,i){var l=i(40999),f=i(26530),d=Object.prototype,g=d.hasOwnProperty;function E(m,C,x){var P=m[C];(!(g.call(m,C)&&f(P,x))||x===void 0&&!(C in m))&&l(m,C,x)}_.exports=E},3833:function(_,b,i){var l=i(26530);function f(d,g){for(var E=d.length;E--;)if(l(d[E][0],g))return E;return-1}_.exports=f},5615:function(_,b,i){var l=i(11396),f=i(52635);function d(g,E){return g&&l(E,f(E),g)}_.exports=d},3238:function(_,b,i){var l=i(11396),f=i(5850);function d(g,E){return g&&l(E,f(E),g)}_.exports=d},40999:function(_,b,i){var l=i(9346);function f(d,g,E){g=="__proto__"&&l?l(d,g,{configurable:!0,enumerable:!0,value:E,writable:!0}):d[g]=E}_.exports=f},90778:function(_){function b(i,l,f){return i===i&&(f!==void 0&&(i=i<=f?i:f),l!==void 0&&(i=i>=l?i:l)),i}_.exports=b},42327:function(_,b,i){var l=i(4281),f=i(26758),d=i(47596),g=i(5615),E=i(3238),m=i(78172),C=i(66438),x=i(23746),P=i(93989),T=i(36094),O=i(15559),w=i(26686),R=i(26019),F=i(27621),V=i(73905),L=i(77236),$=i(98752),U=i(69656),N=i(85973),k=i(66925),j=i(52635),z=i(5850),K=1,G=2,Y=4,ae="[object Arguments]",Ce="[object Array]",J="[object Boolean]",le="[object Date]",be="[object Error]",te="[object Function]",q="[object GeneratorFunction]",ee="[object Map]",Se="[object Number]",tt="[object Object]",Ae="[object RegExp]",pe="[object Set]",Pe="[object String]",ye="[object Symbol]",Ee="[object WeakMap]",_e="[object ArrayBuffer]",We="[object DataView]",Ie="[object Float32Array]",Fe="[object Float64Array]",ut="[object Int8Array]",ht="[object Int16Array]",Ot="[object Int32Array]",Ue="[object Uint8Array]",at="[object Uint8ClampedArray]",Pt="[object Uint16Array]",lt="[object Uint32Array]",kt={};kt[ae]=kt[Ce]=kt[_e]=kt[We]=kt[J]=kt[le]=kt[Ie]=kt[Fe]=kt[ut]=kt[ht]=kt[Ot]=kt[ee]=kt[Se]=kt[tt]=kt[Ae]=kt[pe]=kt[Pe]=kt[ye]=kt[Ue]=kt[at]=kt[Pt]=kt[lt]=!0,kt[be]=kt[te]=kt[Ee]=!1;function nn(hn,Rn,kn,$t,yn,Yn){var cn,st=Rn&K,on=Rn&G,dt=Rn&Y;if(kn&&(cn=yn?kn(hn,$t,yn,Yn):kn(hn)),cn!==void 0)return cn;if(!N(hn))return hn;var Dt=L(hn);if(Dt){if(cn=R(hn),!st)return C(hn,cn)}else{var Ht=w(hn),rn=Ht==te||Ht==q;if($(hn))return m(hn,st);if(Ht==tt||Ht==ae||rn&&!yn){if(cn=on||rn?{}:V(hn),!st)return on?P(hn,E(cn,hn)):x(hn,g(cn,hn))}else{if(!kt[Ht])return yn?hn:{};cn=F(hn,Ht,st)}}Yn||(Yn=new l);var ke=Yn.get(hn);if(ke)return ke;Yn.set(hn,cn),k(hn)?hn.forEach(function(W){cn.add(nn(W,Rn,kn,W,hn,Yn))}):U(hn)&&hn.forEach(function(W,re){cn.set(re,nn(W,Rn,kn,re,hn,Yn))});var ct=dt?on?O:T:on?z:j,D=Dt?void 0:ct(hn);return f(D||hn,function(W,re){D&&(re=W,W=hn[re]),d(cn,re,nn(W,Rn,kn,re,hn,Yn))}),cn}_.exports=nn},67372:function(_,b,i){var l=i(85973),f=Object.create,d=function(){function g(){}return function(E){if(!l(E))return{};if(f)return f(E);g.prototype=E;var m=new g;return g.prototype=void 0,m}}();_.exports=d},40314:function(_,b,i){var l=i(63848),f=i(91754);function d(g,E,m,C,x){var P=-1,T=g.length;for(m||(m=f),x||(x=[]);++P<T;){var O=g[P];E>0&&m(O)?E>1?d(O,E-1,m,C,x):l(x,O):C||(x[x.length]=O)}return x}_.exports=d},60641:function(_,b,i){var l=i(32630),f=l();_.exports=f},35897:function(_,b,i){var l=i(60641),f=i(52635);function d(g,E){return g&&l(g,E,f)}_.exports=d},80166:function(_,b,i){var l=i(18422),f=i(18780);function d(g,E){E=l(E,g);for(var m=0,C=E.length;g!=null&&m<C;)g=g[f(E[m++])];return m&&m==C?g:void 0}_.exports=d},39329:function(_,b,i){var l=i(63848),f=i(77236);function d(g,E,m){var C=E(g);return f(g)?C:l(C,m(g))}_.exports=d},94318:function(_,b,i){var l=i(54690),f=i(47077),d=i(61954),g="[object Null]",E="[object Undefined]",m=l?l.toStringTag:void 0;function C(x){return x==null?x===void 0?E:g:m&&m in Object(x)?f(x):d(x)}_.exports=C},48402:function(_){var b=Object.prototype,i=b.hasOwnProperty;function l(f,d){return f!=null&&i.call(f,d)}_.exports=l},70007:function(_){function b(i,l){return i!=null&&l in Object(i)}_.exports=b},58520:function(_,b,i){var l=i(94318),f=i(3387),d="[object Arguments]";function g(E){return f(E)&&l(E)==d}_.exports=g},31071:function(_,b,i){var l=i(67229),f=i(3387);function d(g,E,m,C,x){return g===E?!0:g==null||E==null||!f(g)&&!f(E)?g!==g&&E!==E:l(g,E,m,C,d,x)}_.exports=d},67229:function(_,b,i){var l=i(4281),f=i(12503),d=i(6001),g=i(88784),E=i(26686),m=i(77236),C=i(98752),x=i(14812),P=1,T="[object Arguments]",O="[object Array]",w="[object Object]",R=Object.prototype,F=R.hasOwnProperty;function V(L,$,U,N,k,j){var z=m(L),K=m($),G=z?O:E(L),Y=K?O:E($);G=G==T?w:G,Y=Y==T?w:Y;var ae=G==w,Ce=Y==w,J=G==Y;if(J&&C(L)){if(!C($))return!1;z=!0,ae=!1}if(J&&!ae)return j||(j=new l),z||x(L)?f(L,$,U,N,k,j):d(L,$,G,U,N,k,j);if(!(U&P)){var le=ae&&F.call(L,"__wrapped__"),be=Ce&&F.call($,"__wrapped__");if(le||be){var te=le?L.value():L,q=be?$.value():$;return j||(j=new l),k(te,q,U,N,j)}}return J?(j||(j=new l),g(L,$,U,N,k,j)):!1}_.exports=V},4368:function(_,b,i){var l=i(26686),f=i(3387),d="[object Map]";function g(E){return f(E)&&l(E)==d}_.exports=g},9157:function(_,b,i){var l=i(4281),f=i(31071),d=1,g=2;function E(m,C,x,P){var T=x.length,O=T,w=!P;if(m==null)return!O;for(m=Object(m);T--;){var R=x[T];if(w&&R[2]?R[1]!==m[R[0]]:!(R[0]in m))return!1}for(;++T<O;){R=x[T];var F=R[0],V=m[F],L=R[1];if(w&&R[2]){if(V===void 0&&!(F in m))return!1}else{var $=new l;if(P)var U=P(V,L,F,m,C,$);if(!(U===void 0?f(L,V,d|g,P,$):U))return!1}}return!0}_.exports=E},62987:function(_,b,i){var l=i(93839),f=i(47275),d=i(85973),g=i(76822),E=/[\\^$.*+?()[\]{}|]/g,m=/^\[object .+?Constructor\]$/,C=Function.prototype,x=Object.prototype,P=C.toString,T=x.hasOwnProperty,O=RegExp("^"+P.call(T).replace(E,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function w(R){if(!d(R)||f(R))return!1;var F=l(R)?O:m;return F.test(g(R))}_.exports=w},4642:function(_,b,i){var l=i(26686),f=i(3387),d="[object Set]";function g(E){return f(E)&&l(E)==d}_.exports=g},73749:function(_,b,i){var l=i(94318),f=i(99216),d=i(3387),g="[object Arguments]",E="[object Array]",m="[object Boolean]",C="[object Date]",x="[object Error]",P="[object Function]",T="[object Map]",O="[object Number]",w="[object Object]",R="[object RegExp]",F="[object Set]",V="[object String]",L="[object WeakMap]",$="[object ArrayBuffer]",U="[object DataView]",N="[object Float32Array]",k="[object Float64Array]",j="[object Int8Array]",z="[object Int16Array]",K="[object Int32Array]",G="[object Uint8Array]",Y="[object Uint8ClampedArray]",ae="[object Uint16Array]",Ce="[object Uint32Array]",J={};J[N]=J[k]=J[j]=J[z]=J[K]=J[G]=J[Y]=J[ae]=J[Ce]=!0,J[g]=J[E]=J[$]=J[m]=J[U]=J[C]=J[x]=J[P]=J[T]=J[O]=J[w]=J[R]=J[F]=J[V]=J[L]=!1;function le(be){return d(be)&&f(be.length)&&!!J[l(be)]}_.exports=le},88904:function(_,b,i){var l=i(68418),f=i(54555),d=i(15362),g=i(77236),E=i(21651);function m(C){return typeof C=="function"?C:C==null?d:typeof C=="object"?g(C)?f(C[0],C[1]):l(C):E(C)}_.exports=m},78803:function(_,b,i){var l=i(65003),f=i(41466),d=Object.prototype,g=d.hasOwnProperty;function E(m){if(!l(m))return f(m);var C=[];for(var x in Object(m))g.call(m,x)&&x!="constructor"&&C.push(x);return C}_.exports=E},32578:function(_,b,i){var l=i(85973),f=i(65003),d=i(14904),g=Object.prototype,E=g.hasOwnProperty;function m(C){if(!l(C))return d(C);var x=f(C),P=[];for(var T in C)T=="constructor"&&(x||!E.call(C,T))||P.push(T);return P}_.exports=m},68418:function(_,b,i){var l=i(9157),f=i(59182),d=i(57375);function g(E){var m=f(E);return m.length==1&&m[0][2]?d(m[0][0],m[0][1]):function(C){return C===E||l(C,E,m)}}_.exports=g},54555:function(_,b,i){var l=i(31071),f=i(33795),d=i(33646),g=i(73266),E=i(41457),m=i(57375),C=i(18780),x=1,P=2;function T(O,w){return g(O)&&E(w)?m(C(O),w):function(R){var F=f(R,O);return F===void 0&&F===w?d(R,O):l(w,F,x|P)}}_.exports=T},63920:function(_,b,i){var l=i(4281),f=i(4373),d=i(60641),g=i(74810),E=i(85973),m=i(5850),C=i(85623);function x(P,T,O,w,R){P!==T&&d(T,function(F,V){if(R||(R=new l),E(F))g(P,T,V,O,x,w,R);else{var L=w?w(C(P,V),F,V+"",P,T,R):void 0;L===void 0&&(L=F),f(P,V,L)}},m)}_.exports=x},74810:function(_,b,i){var l=i(4373),f=i(78172),d=i(22215),g=i(66438),E=i(73905),m=i(86981),C=i(77236),x=i(99747),P=i(98752),T=i(93839),O=i(85973),w=i(9636),R=i(14812),F=i(85623),V=i(57464);function L($,U,N,k,j,z,K){var G=F($,N),Y=F(U,N),ae=K.get(Y);if(ae){l($,N,ae);return}var Ce=z?z(G,Y,N+"",$,U,K):void 0,J=Ce===void 0;if(J){var le=C(Y),be=!le&&P(Y),te=!le&&!be&&R(Y);Ce=Y,le||be||te?C(G)?Ce=G:x(G)?Ce=g(G):be?(J=!1,Ce=f(Y,!0)):te?(J=!1,Ce=d(Y,!0)):Ce=[]:w(Y)||m(Y)?(Ce=G,m(G)?Ce=V(G):(!O(G)||T(G))&&(Ce=E(Y))):J=!1}J&&(K.set(Y,Ce),j(Ce,Y,k,z,K),K.delete(Y)),l($,N,Ce)}_.exports=L},96621:function(_,b,i){var l=i(80166),f=i(58116),d=i(18422);function g(E,m,C){for(var x=-1,P=m.length,T={};++x<P;){var O=m[x],w=l(E,O);C(w,O)&&f(T,d(O,E),w)}return T}_.exports=g},61712:function(_){function b(i){return function(l){return l?.[i]}}_.exports=b},14815:function(_,b,i){var l=i(80166);function f(d){return function(g){return l(g,d)}}_.exports=f},40516:function(_){function b(i){return function(l){return i?.[l]}}_.exports=b},94569:function(_,b,i){var l=i(15362),f=i(94468),d=i(98756);function g(E,m){return d(f(E,m,l),E+"")}_.exports=g},58116:function(_,b,i){var l=i(47596),f=i(18422),d=i(74363),g=i(85973),E=i(18780);function m(C,x,P,T){if(!g(C))return C;x=f(x,C);for(var O=-1,w=x.length,R=w-1,F=C;F!=null&&++O<w;){var V=E(x[O]),L=P;if(V==="__proto__"||V==="constructor"||V==="prototype")return C;if(O!=R){var $=F[V];L=T?T($,V,F):void 0,L===void 0&&(L=g($)?$:d(x[O+1])?[]:{})}l(F,V,L),F=F[V]}return C}_.exports=m},81676:function(_,b,i){var l=i(88211),f=i(9346),d=i(15362),g=f?function(E,m){return f(E,"toString",{configurable:!0,enumerable:!1,value:l(m),writable:!0})}:d;_.exports=g},4293:function(_){function b(i,l,f){var d=-1,g=i.length;l<0&&(l=-l>g?0:g+l),f=f>g?g:f,f<0&&(f+=g),g=l>f?0:f-l>>>0,l>>>=0;for(var E=Array(g);++d<g;)E[d]=i[d+l];return E}_.exports=b},55092:function(_){function b(i,l){for(var f=-1,d=Array(i);++f<i;)d[f]=l(f);return d}_.exports=b},90454:function(_,b,i){var l=i(54690),f=i(26460),d=i(77236),g=i(22945),E=1/0,m=l?l.prototype:void 0,C=m?m.toString:void 0;function x(P){if(typeof P=="string")return P;if(d(P))return f(P,x)+"";if(g(P))return C?C.call(P):"";var T=P+"";return T=="0"&&1/P==-E?"-0":T}_.exports=x},63349:function(_,b,i){var l=i(5720),f=/^\s+/;function d(g){return g&&g.slice(0,l(g)+1).replace(f,"")}_.exports=d},76535:function(_){function b(i){return function(l){return i(l)}}_.exports=b},69386:function(_,b,i){var l=i(18422),f=i(22972),d=i(18293),g=i(18780);function E(m,C){return C=l(C,m),m=d(m,C),m==null||delete m[g(f(C))]}_.exports=E},30555:function(_){function b(i,l){return i.has(l)}_.exports=b},18422:function(_,b,i){var l=i(77236),f=i(73266),d=i(23879),g=i(41119);function E(m,C){return l(m)?m:f(m,C)?[m]:d(g(m))}_.exports=E},24793:function(_,b,i){var l=i(4293);function f(d,g,E){var m=d.length;return E=E===void 0?m:E,!g&&E>=m?d:l(d,g,E)}_.exports=f},13632:function(_,b,i){var l=i(5982);function f(d){var g=new d.constructor(d.byteLength);return new l(g).set(new l(d)),g}_.exports=f},78172:function(_,b,i){_=i.nmd(_);var l=i(70441),f=b&&!b.nodeType&&b,d=f&&!0&&_&&!_.nodeType&&_,g=d&&d.exports===f,E=g?l.Buffer:void 0,m=E?E.allocUnsafe:void 0;function C(x,P){if(P)return x.slice();var T=x.length,O=m?m(T):new x.constructor(T);return x.copy(O),O}_.exports=C},39841:function(_,b,i){var l=i(13632);function f(d,g){var E=g?l(d.buffer):d.buffer;return new d.constructor(E,d.byteOffset,d.byteLength)}_.exports=f},62769:function(_){var b=/\w*$/;function i(l){var f=new l.constructor(l.source,b.exec(l));return f.lastIndex=l.lastIndex,f}_.exports=i},49130:function(_,b,i){var l=i(54690),f=l?l.prototype:void 0,d=f?f.valueOf:void 0;function g(E){return d?Object(d.call(E)):{}}_.exports=g},22215:function(_,b,i){var l=i(13632);function f(d,g){var E=g?l(d.buffer):d.buffer;return new d.constructor(E,d.byteOffset,d.length)}_.exports=f},66438:function(_){function b(i,l){var f=-1,d=i.length;for(l||(l=Array(d));++f<d;)l[f]=i[f];return l}_.exports=b},11396:function(_,b,i){var l=i(47596),f=i(40999);function d(g,E,m,C){var x=!m;m||(m={});for(var P=-1,T=E.length;++P<T;){var O=E[P],w=C?C(m[O],g[O],O,m,g):void 0;w===void 0&&(w=g[O]),x?f(m,O,w):l(m,O,w)}return m}_.exports=d},23746:function(_,b,i){var l=i(11396),f=i(75904);function d(g,E){return l(g,f(g),E)}_.exports=d},93989:function(_,b,i){var l=i(11396),f=i(12511);function d(g,E){return l(g,f(g),E)}_.exports=d},38507:function(_,b,i){var l=i(70441),f=l["__core-js_shared__"];_.exports=f},32544:function(_,b,i){var l=i(94569),f=i(63108);function d(g){return l(function(E,m){var C=-1,x=m.length,P=x>1?m[x-1]:void 0,T=x>2?m[2]:void 0;for(P=g.length>3&&typeof P=="function"?(x--,P):void 0,T&&f(m[0],m[1],T)&&(P=x<3?void 0:P,x=1),E=Object(E);++C<x;){var O=m[C];O&&g(E,O,C,P)}return E})}_.exports=d},32630:function(_){function b(i){return function(l,f,d){for(var g=-1,E=Object(l),m=d(l),C=m.length;C--;){var x=m[i?C:++g];if(f(E[x],x,E)===!1)break}return l}}_.exports=b},54660:function(_,b,i){var l=i(24793),f=i(34327),d=i(51119),g=i(41119);function E(m){return function(C){C=g(C);var x=f(C)?d(C):void 0,P=x?x[0]:C.charAt(0),T=x?l(x,1).join(""):C.slice(1);return P[m]()+T}}_.exports=E},34958:function(_,b,i){var l=i(26974),f=i(58638),d=i(90280),g="['\u2019]",E=RegExp(g,"g");function m(C){return function(x){return l(d(f(x).replace(E,"")),C,"")}}_.exports=m},79294:function(_,b,i){var l=i(9636);function f(d){return l(d)?void 0:d}_.exports=f},80968:function(_,b,i){var l=i(40516),f={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},d=l(f);_.exports=d},9346:function(_,b,i){var l=i(84457),f=function(){try{var d=l(Object,"defineProperty");return d({},"",{}),d}catch{}}();_.exports=f},12503:function(_,b,i){var l=i(61124),f=i(44793),d=i(30555),g=1,E=2;function m(C,x,P,T,O,w){var R=P&g,F=C.length,V=x.length;if(F!=V&&!(R&&V>F))return!1;var L=w.get(C),$=w.get(x);if(L&&$)return L==x&&$==C;var U=-1,N=!0,k=P&E?new l:void 0;for(w.set(C,x),w.set(x,C);++U<F;){var j=C[U],z=x[U];if(T)var K=R?T(z,j,U,x,C,w):T(j,z,U,C,x,w);if(K!==void 0){if(K)continue;N=!1;break}if(k){if(!f(x,function(G,Y){if(!d(k,Y)&&(j===G||O(j,G,P,T,w)))return k.push(Y)})){N=!1;break}}else if(!(j===z||O(j,z,P,T,w))){N=!1;break}}return w.delete(C),w.delete(x),N}_.exports=m},6001:function(_,b,i){var l=i(54690),f=i(5982),d=i(26530),g=i(12503),E=i(52876),m=i(66350),C=1,x=2,P="[object Boolean]",T="[object Date]",O="[object Error]",w="[object Map]",R="[object Number]",F="[object RegExp]",V="[object Set]",L="[object String]",$="[object Symbol]",U="[object ArrayBuffer]",N="[object DataView]",k=l?l.prototype:void 0,j=k?k.valueOf:void 0;function z(K,G,Y,ae,Ce,J,le){switch(Y){case N:if(K.byteLength!=G.byteLength||K.byteOffset!=G.byteOffset)return!1;K=K.buffer,G=G.buffer;case U:return!(K.byteLength!=G.byteLength||!J(new f(K),new f(G)));case P:case T:case R:return d(+K,+G);case O:return K.name==G.name&&K.message==G.message;case F:case L:return K==G+"";case w:var be=E;case V:var te=ae&C;if(be||(be=m),K.size!=G.size&&!te)return!1;var q=le.get(K);if(q)return q==G;ae|=x,le.set(K,G);var ee=g(be(K),be(G),ae,Ce,J,le);return le.delete(K),ee;case $:if(j)return j.call(K)==j.call(G)}return!1}_.exports=z},88784:function(_,b,i){var l=i(36094),f=1,d=Object.prototype,g=d.hasOwnProperty;function E(m,C,x,P,T,O){var w=x&f,R=l(m),F=R.length,V=l(C),L=V.length;if(F!=L&&!w)return!1;for(var $=F;$--;){var U=R[$];if(!(w?U in C:g.call(C,U)))return!1}var N=O.get(m),k=O.get(C);if(N&&k)return N==C&&k==m;var j=!0;O.set(m,C),O.set(C,m);for(var z=w;++$<F;){U=R[$];var K=m[U],G=C[U];if(P)var Y=w?P(G,K,U,C,m,O):P(K,G,U,m,C,O);if(!(Y===void 0?K===G||T(K,G,x,P,O):Y)){j=!1;break}z||(z=U=="constructor")}if(j&&!z){var ae=m.constructor,Ce=C.constructor;ae!=Ce&&"constructor"in m&&"constructor"in C&&!(typeof ae=="function"&&ae instanceof ae&&typeof Ce=="function"&&Ce instanceof Ce)&&(j=!1)}return O.delete(m),O.delete(C),j}_.exports=E},83368:function(_,b,i){var l=i(75453),f=i(94468),d=i(98756);function g(E){return d(f(E,void 0,l),E+"")}_.exports=g},34414:function(_,b,i){var l=typeof i.g=="object"&&i.g&&i.g.Object===Object&&i.g;_.exports=l},36094:function(_,b,i){var l=i(39329),f=i(75904),d=i(52635);function g(E){return l(E,d,f)}_.exports=g},15559:function(_,b,i){var l=i(39329),f=i(12511),d=i(5850);function g(E){return l(E,d,f)}_.exports=g},72907:function(_,b,i){var l=i(87620);function f(d,g){var E=d.__data__;return l(g)?E[typeof g=="string"?"string":"hash"]:E.map}_.exports=f},59182:function(_,b,i){var l=i(41457),f=i(52635);function d(g){for(var E=f(g),m=E.length;m--;){var C=E[m],x=g[C];E[m]=[C,x,l(x)]}return E}_.exports=d},84457:function(_,b,i){var l=i(62987),f=i(79741);function d(g,E){var m=f(g,E);return l(m)?m:void 0}_.exports=d},71407:function(_,b,i){var l=i(53717),f=l(Object.getPrototypeOf,Object);_.exports=f},47077:function(_,b,i){var l=i(54690),f=Object.prototype,d=f.hasOwnProperty,g=f.toString,E=l?l.toStringTag:void 0;function m(C){var x=d.call(C,E),P=C[E];try{C[E]=void 0;var T=!0}catch{}var O=g.call(C);return T&&(x?C[E]=P:delete C[E]),O}_.exports=m},75904:function(_,b,i){var l=i(69037),f=i(27471),d=Object.prototype,g=d.propertyIsEnumerable,E=Object.getOwnPropertySymbols,m=E?function(C){return C==null?[]:(C=Object(C),l(E(C),function(x){return g.call(C,x)}))}:f;_.exports=m},12511:function(_,b,i){var l=i(63848),f=i(71407),d=i(75904),g=i(27471),E=Object.getOwnPropertySymbols,m=E?function(C){for(var x=[];C;)l(x,d(C)),C=f(C);return x}:g;_.exports=m},26686:function(_,b,i){var l=i(65549),f=i(64438),d=i(87076),g=i(69902),E=i(18965),m=i(94318),C=i(76822),x="[object Map]",P="[object Object]",T="[object Promise]",O="[object Set]",w="[object WeakMap]",R="[object DataView]",F=C(l),V=C(f),L=C(d),$=C(g),U=C(E),N=m;(l&&N(new l(new ArrayBuffer(1)))!=R||f&&N(new f)!=x||d&&N(d.resolve())!=T||g&&N(new g)!=O||E&&N(new E)!=w)&&(N=function(k){var j=m(k),z=j==P?k.constructor:void 0,K=z?C(z):"";if(K)switch(K){case F:return R;case V:return x;case L:return T;case $:return O;case U:return w}return j}),_.exports=N},79741:function(_){function b(i,l){return i?.[l]}_.exports=b},37383:function(_,b,i){var l=i(18422),f=i(86981),d=i(77236),g=i(74363),E=i(99216),m=i(18780);function C(x,P,T){P=l(P,x);for(var O=-1,w=P.length,R=!1;++O<w;){var F=m(P[O]);if(!(R=x!=null&&T(x,F)))break;x=x[F]}return R||++O!=w?R:(w=x==null?0:x.length,!!w&&E(w)&&g(F,w)&&(d(x)||f(x)))}_.exports=C},34327:function(_){var b="\\ud800-\\udfff",i="\\u0300-\\u036f",l="\\ufe20-\\ufe2f",f="\\u20d0-\\u20ff",d=i+l+f,g="\\ufe0e\\ufe0f",E="\\u200d",m=RegExp("["+E+b+d+g+"]");function C(x){return m.test(x)}_.exports=C},65471:function(_){var b=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function i(l){return b.test(l)}_.exports=i},38145:function(_,b,i){var l=i(75148);function f(){this.__data__=l?l(null):{},this.size=0}_.exports=f},69096:function(_){function b(i){var l=this.has(i)&&delete this.__data__[i];return this.size-=l?1:0,l}_.exports=b},65239:function(_,b,i){var l=i(75148),f="__lodash_hash_undefined__",d=Object.prototype,g=d.hasOwnProperty;function E(m){var C=this.__data__;if(l){var x=C[m];return x===f?void 0:x}return g.call(C,m)?C[m]:void 0}_.exports=E},78228:function(_,b,i){var l=i(75148),f=Object.prototype,d=f.hasOwnProperty;function g(E){var m=this.__data__;return l?m[E]!==void 0:d.call(m,E)}_.exports=g},95920:function(_,b,i){var l=i(75148),f="__lodash_hash_undefined__";function d(g,E){var m=this.__data__;return this.size+=this.has(g)?0:1,m[g]=l&&E===void 0?f:E,this}_.exports=d},26019:function(_){var b=Object.prototype,i=b.hasOwnProperty;function l(f){var d=f.length,g=new f.constructor(d);return d&&typeof f[0]=="string"&&i.call(f,"index")&&(g.index=f.index,g.input=f.input),g}_.exports=l},27621:function(_,b,i){var l=i(13632),f=i(39841),d=i(62769),g=i(49130),E=i(22215),m="[object Boolean]",C="[object Date]",x="[object Map]",P="[object Number]",T="[object RegExp]",O="[object Set]",w="[object String]",R="[object Symbol]",F="[object ArrayBuffer]",V="[object DataView]",L="[object Float32Array]",$="[object Float64Array]",U="[object Int8Array]",N="[object Int16Array]",k="[object Int32Array]",j="[object Uint8Array]",z="[object Uint8ClampedArray]",K="[object Uint16Array]",G="[object Uint32Array]";function Y(ae,Ce,J){var le=ae.constructor;switch(Ce){case F:return l(ae);case m:case C:return new le(+ae);case V:return f(ae,J);case L:case $:case U:case N:case k:case j:case z:case K:case G:return E(ae,J);case x:return new le;case P:case w:return new le(ae);case T:return d(ae);case O:return new le;case R:return g(ae)}}_.exports=Y},73905:function(_,b,i){var l=i(67372),f=i(71407),d=i(65003);function g(E){return typeof E.constructor=="function"&&!d(E)?l(f(E)):{}}_.exports=g},91754:function(_,b,i){var l=i(54690),f=i(86981),d=i(77236),g=l?l.isConcatSpreadable:void 0;function E(m){return d(m)||f(m)||!!(g&&m&&m[g])}_.exports=E},74363:function(_){var b=9007199254740991,i=/^(?:0|[1-9]\d*)$/;function l(f,d){var g=typeof f;return d=d??b,!!d&&(g=="number"||g!="symbol"&&i.test(f))&&f>-1&&f%1==0&&f<d}_.exports=l},63108:function(_,b,i){var l=i(26530),f=i(81580),d=i(74363),g=i(85973);function E(m,C,x){if(!g(x))return!1;var P=typeof C;return(P=="number"?f(x)&&d(C,x.length):P=="string"&&C in x)?l(x[C],m):!1}_.exports=E},73266:function(_,b,i){var l=i(77236),f=i(22945),d=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,g=/^\w*$/;function E(m,C){if(l(m))return!1;var x=typeof m;return x=="number"||x=="symbol"||x=="boolean"||m==null||f(m)?!0:g.test(m)||!d.test(m)||C!=null&&m in Object(C)}_.exports=E},87620:function(_){function b(i){var l=typeof i;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?i!=="__proto__":i===null}_.exports=b},47275:function(_,b,i){var l=i(38507),f=function(){var g=/[^.]+$/.exec(l&&l.keys&&l.keys.IE_PROTO||"");return g?"Symbol(src)_1."+g:""}();function d(g){return!!f&&f in g}_.exports=d},65003:function(_){var b=Object.prototype;function i(l){var f=l&&l.constructor,d=typeof f=="function"&&f.prototype||b;return l===d}_.exports=i},41457:function(_,b,i){var l=i(85973);function f(d){return d===d&&!l(d)}_.exports=f},17168:function(_){function b(){this.__data__=[],this.size=0}_.exports=b},66582:function(_,b,i){var l=i(3833),f=Array.prototype,d=f.splice;function g(E){var m=this.__data__,C=l(m,E);if(C<0)return!1;var x=m.length-1;return C==x?m.pop():d.call(m,C,1),--this.size,!0}_.exports=g},13867:function(_,b,i){var l=i(3833);function f(d){var g=this.__data__,E=l(g,d);return E<0?void 0:g[E][1]}_.exports=f},59557:function(_,b,i){var l=i(3833);function f(d){return l(this.__data__,d)>-1}_.exports=f},22726:function(_,b,i){var l=i(3833);function f(d,g){var E=this.__data__,m=l(E,d);return m<0?(++this.size,E.push([d,g])):E[m][1]=g,this}_.exports=f},67076:function(_,b,i){var l=i(54613),f=i(70131),d=i(64438);function g(){this.size=0,this.__data__={hash:new l,map:new(d||f),string:new l}}_.exports=g},2530:function(_,b,i){var l=i(72907);function f(d){var g=l(this,d).delete(d);return this.size-=g?1:0,g}_.exports=f},44858:function(_,b,i){var l=i(72907);function f(d){return l(this,d).get(d)}_.exports=f},96265:function(_,b,i){var l=i(72907);function f(d){return l(this,d).has(d)}_.exports=f},59909:function(_,b,i){var l=i(72907);function f(d,g){var E=l(this,d),m=E.size;return E.set(d,g),this.size+=E.size==m?0:1,this}_.exports=f},52876:function(_){function b(i){var l=-1,f=Array(i.size);return i.forEach(function(d,g){f[++l]=[g,d]}),f}_.exports=b},57375:function(_){function b(i,l){return function(f){return f==null?!1:f[i]===l&&(l!==void 0||i in Object(f))}}_.exports=b},97085:function(_,b,i){var l=i(30427),f=500;function d(g){var E=l(g,function(C){return m.size===f&&m.clear(),C}),m=E.cache;return E}_.exports=d},75148:function(_,b,i){var l=i(84457),f=l(Object,"create");_.exports=f},41466:function(_,b,i){var l=i(53717),f=l(Object.keys,Object);_.exports=f},14904:function(_){function b(i){var l=[];if(i!=null)for(var f in Object(i))l.push(f);return l}_.exports=b},91782:function(_,b,i){_=i.nmd(_);var l=i(34414),f=b&&!b.nodeType&&b,d=f&&!0&&_&&!_.nodeType&&_,g=d&&d.exports===f,E=g&&l.process,m=function(){try{var C=d&&d.require&&d.require("util").types;return C||E&&E.binding&&E.binding("util")}catch{}}();_.exports=m},61954:function(_){var b=Object.prototype,i=b.toString;function l(f){return i.call(f)}_.exports=l},53717:function(_){function b(i,l){return function(f){return i(l(f))}}_.exports=b},94468:function(_,b,i){var l=i(85198),f=Math.max;function d(g,E,m){return E=f(E===void 0?g.length-1:E,0),function(){for(var C=arguments,x=-1,P=f(C.length-E,0),T=Array(P);++x<P;)T[x]=C[E+x];x=-1;for(var O=Array(E+1);++x<E;)O[x]=C[x];return O[E]=m(T),l(g,this,O)}}_.exports=d},18293:function(_,b,i){var l=i(80166),f=i(4293);function d(g,E){return E.length<2?g:l(g,f(E,0,-1))}_.exports=d},70441:function(_,b,i){var l=i(34414),f=typeof self=="object"&&self&&self.Object===Object&&self,d=l||f||Function("return this")();_.exports=d},85623:function(_){function b(i,l){if(!(l==="constructor"&&typeof i[l]=="function")&&l!="__proto__")return i[l]}_.exports=b},96718:function(_){var b="__lodash_hash_undefined__";function i(l){return this.__data__.set(l,b),this}_.exports=i},66996:function(_){function b(i){return this.__data__.has(i)}_.exports=b},66350:function(_){function b(i){var l=-1,f=Array(i.size);return i.forEach(function(d){f[++l]=d}),f}_.exports=b},98756:function(_,b,i){var l=i(81676),f=i(79116),d=f(l);_.exports=d},79116:function(_){var b=800,i=16,l=Date.now;function f(d){var g=0,E=0;return function(){var m=l(),C=i-(m-E);if(E=m,C>0){if(++g>=b)return arguments[0]}else g=0;return d.apply(void 0,arguments)}}_.exports=f},30560:function(_,b,i){var l=i(70131);function f(){this.__data__=new l,this.size=0}_.exports=f},58282:function(_){function b(i){var l=this.__data__,f=l.delete(i);return this.size=l.size,f}_.exports=b},46638:function(_){function b(i){return this.__data__.get(i)}_.exports=b},94270:function(_){function b(i){return this.__data__.has(i)}_.exports=b},3229:function(_,b,i){var l=i(70131),f=i(64438),d=i(90278),g=200;function E(m,C){var x=this.__data__;if(x instanceof l){var P=x.__data__;if(!f||P.length<g-1)return P.push([m,C]),this.size=++x.size,this;x=this.__data__=new d(P)}return x.set(m,C),this.size=x.size,this}_.exports=E},51119:function(_,b,i){var l=i(30804),f=i(34327),d=i(64501);function g(E){return f(E)?d(E):l(E)}_.exports=g},23879:function(_,b,i){var l=i(97085),f=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d=/\\(\\)?/g,g=l(function(E){var m=[];return E.charCodeAt(0)===46&&m.push(""),E.replace(f,function(C,x,P,T){m.push(P?T.replace(d,"$1"):x||C)}),m});_.exports=g},18780:function(_,b,i){var l=i(22945),f=1/0;function d(g){if(typeof g=="string"||l(g))return g;var E=g+"";return E=="0"&&1/g==-f?"-0":E}_.exports=d},76822:function(_){var b=Function.prototype,i=b.toString;function l(f){if(f!=null){try{return i.call(f)}catch{}try{return f+""}catch{}}return""}_.exports=l},5720:function(_){var b=/\s/;function i(l){for(var f=l.length;f--&&b.test(l.charAt(f)););return f}_.exports=i},64501:function(_){var b="\\ud800-\\udfff",i="\\u0300-\\u036f",l="\\ufe20-\\ufe2f",f="\\u20d0-\\u20ff",d=i+l+f,g="\\ufe0e\\ufe0f",E="["+b+"]",m="["+d+"]",C="\\ud83c[\\udffb-\\udfff]",x="(?:"+m+"|"+C+")",P="[^"+b+"]",T="(?:\\ud83c[\\udde6-\\uddff]){2}",O="[\\ud800-\\udbff][\\udc00-\\udfff]",w="\\u200d",R=x+"?",F="["+g+"]?",V="(?:"+w+"(?:"+[P,T,O].join("|")+")"+F+R+")*",L=F+R+V,$="(?:"+[P+m+"?",m,T,O,E].join("|")+")",U=RegExp(C+"(?="+C+")|"+$+L,"g");function N(k){return k.match(U)||[]}_.exports=N},6645:function(_){var b="\\ud800-\\udfff",i="\\u0300-\\u036f",l="\\ufe20-\\ufe2f",f="\\u20d0-\\u20ff",d=i+l+f,g="\\u2700-\\u27bf",E="a-z\\xdf-\\xf6\\xf8-\\xff",m="\\xac\\xb1\\xd7\\xf7",C="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",x="\\u2000-\\u206f",P=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",T="A-Z\\xc0-\\xd6\\xd8-\\xde",O="\\ufe0e\\ufe0f",w=m+C+x+P,R="['\u2019]",F="["+w+"]",V="["+d+"]",L="\\d+",$="["+g+"]",U="["+E+"]",N="[^"+b+w+L+g+E+T+"]",k="\\ud83c[\\udffb-\\udfff]",j="(?:"+V+"|"+k+")",z="[^"+b+"]",K="(?:\\ud83c[\\udde6-\\uddff]){2}",G="[\\ud800-\\udbff][\\udc00-\\udfff]",Y="["+T+"]",ae="\\u200d",Ce="(?:"+U+"|"+N+")",J="(?:"+Y+"|"+N+")",le="(?:"+R+"(?:d|ll|m|re|s|t|ve))?",be="(?:"+R+"(?:D|LL|M|RE|S|T|VE))?",te=j+"?",q="["+O+"]?",ee="(?:"+ae+"(?:"+[z,K,G].join("|")+")"+q+te+")*",Se="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",tt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ae=q+te+ee,pe="(?:"+[$,K,G].join("|")+")"+Ae,Pe=RegExp([Y+"?"+U+"+"+le+"(?="+[F,Y,"$"].join("|")+")",J+"+"+be+"(?="+[F,Y+Ce,"$"].join("|")+")",Y+"?"+Ce+"+"+le,Y+"+"+be,tt,Se,L,pe].join("|"),"g");function ye(Ee){return Ee.match(Pe)||[]}_.exports=ye},39935:function(_,b,i){var l=i(73400),f=i(34958),d=f(function(g,E,m){return E=E.toLowerCase(),g+(m?l(E):E)});_.exports=d},73400:function(_,b,i){var l=i(41119),f=i(23940);function d(g){return f(l(g).toLowerCase())}_.exports=d},99381:function(_,b,i){var l=i(42327),f=1,d=4;function g(E){return l(E,f|d)}_.exports=g},88211:function(_){function b(i){return function(){return i}}_.exports=b},58638:function(_,b,i){var l=i(80968),f=i(41119),d=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,g="\\u0300-\\u036f",E="\\ufe20-\\ufe2f",m="\\u20d0-\\u20ff",C=g+E+m,x="["+C+"]",P=RegExp(x,"g");function T(O){return O=f(O),O&&O.replace(d,l).replace(P,"")}_.exports=T},26530:function(_){function b(i,l){return i===l||i!==i&&l!==l}_.exports=b},75453:function(_,b,i){var l=i(40314);function f(d){var g=d==null?0:d.length;return g?l(d,1):[]}_.exports=f},33795:function(_,b,i){var l=i(80166);function f(d,g,E){var m=d==null?void 0:l(d,g);return m===void 0?E:m}_.exports=f},23973:function(_,b,i){var l=i(48402),f=i(37383);function d(g,E){return g!=null&&f(g,E,l)}_.exports=d},33646:function(_,b,i){var l=i(70007),f=i(37383);function d(g,E){return g!=null&&f(g,E,l)}_.exports=d},15362:function(_){function b(i){return i}_.exports=b},86981:function(_,b,i){var l=i(58520),f=i(3387),d=Object.prototype,g=d.hasOwnProperty,E=d.propertyIsEnumerable,m=l(function(){return arguments}())?l:function(C){return f(C)&&g.call(C,"callee")&&!E.call(C,"callee")};_.exports=m},77236:function(_){var b=Array.isArray;_.exports=b},81580:function(_,b,i){var l=i(93839),f=i(99216);function d(g){return g!=null&&f(g.length)&&!l(g)}_.exports=d},99747:function(_,b,i){var l=i(81580),f=i(3387);function d(g){return f(g)&&l(g)}_.exports=d},98752:function(_,b,i){_=i.nmd(_);var l=i(70441),f=i(7149),d=b&&!b.nodeType&&b,g=d&&!0&&_&&!_.nodeType&&_,E=g&&g.exports===d,m=E?l.Buffer:void 0,C=m?m.isBuffer:void 0,x=C||f;_.exports=x},86834:function(_,b,i){var l=i(78803),f=i(26686),d=i(86981),g=i(77236),E=i(81580),m=i(98752),C=i(65003),x=i(14812),P="[object Map]",T="[object Set]",O=Object.prototype,w=O.hasOwnProperty;function R(F){if(F==null)return!0;if(E(F)&&(g(F)||typeof F=="string"||typeof F.splice=="function"||m(F)||x(F)||d(F)))return!F.length;var V=f(F);if(V==P||V==T)return!F.size;if(C(F))return!l(F).length;for(var L in F)if(w.call(F,L))return!1;return!0}_.exports=R},89793:function(_,b,i){var l=i(31071);function f(d,g){return l(d,g)}_.exports=f},93839:function(_,b,i){var l=i(94318),f=i(85973),d="[object AsyncFunction]",g="[object Function]",E="[object GeneratorFunction]",m="[object Proxy]";function C(x){if(!f(x))return!1;var P=l(x);return P==g||P==E||P==d||P==m}_.exports=C},99216:function(_){var b=9007199254740991;function i(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=b}_.exports=i},69656:function(_,b,i){var l=i(4368),f=i(76535),d=i(91782),g=d&&d.isMap,E=g?f(g):l;_.exports=E},36866:function(_){function b(i){return i==null}_.exports=b},85973:function(_){function b(i){var l=typeof i;return i!=null&&(l=="object"||l=="function")}_.exports=b},3387:function(_){function b(i){return i!=null&&typeof i=="object"}_.exports=b},9636:function(_,b,i){var l=i(94318),f=i(71407),d=i(3387),g="[object Object]",E=Function.prototype,m=Object.prototype,C=E.toString,x=m.hasOwnProperty,P=C.call(Object);function T(O){if(!d(O)||l(O)!=g)return!1;var w=f(O);if(w===null)return!0;var R=x.call(w,"constructor")&&w.constructor;return typeof R=="function"&&R instanceof R&&C.call(R)==P}_.exports=T},66925:function(_,b,i){var l=i(4642),f=i(76535),d=i(91782),g=d&&d.isSet,E=g?f(g):l;_.exports=E},22945:function(_,b,i){var l=i(94318),f=i(3387),d="[object Symbol]";function g(E){return typeof E=="symbol"||f(E)&&l(E)==d}_.exports=g},14812:function(_,b,i){var l=i(73749),f=i(76535),d=i(91782),g=d&&d.isTypedArray,E=g?f(g):l;_.exports=E},52635:function(_,b,i){var l=i(16222),f=i(78803),d=i(81580);function g(E){return d(E)?l(E):f(E)}_.exports=g},5850:function(_,b,i){var l=i(16222),f=i(32578),d=i(81580);function g(E){return d(E)?l(E,!0):f(E)}_.exports=g},22972:function(_){function b(i){var l=i==null?0:i.length;return l?i[l-1]:void 0}_.exports=b},52169:function(_,b,i){var l=i(40999),f=i(35897),d=i(88904);function g(E,m){var C={};return m=d(m,3),f(E,function(x,P,T){l(C,m(x,P,T),x)}),C}_.exports=g},53792:function(_,b,i){var l=i(40999),f=i(35897),d=i(88904);function g(E,m){var C={};return m=d(m,3),f(E,function(x,P,T){l(C,P,m(x,P,T))}),C}_.exports=g},30427:function(_,b,i){var l=i(90278),f="Expected a function";function d(g,E){if(typeof g!="function"||E!=null&&typeof E!="function")throw new TypeError(f);var m=function(){var C=arguments,x=E?E.apply(this,C):C[0],P=m.cache;if(P.has(x))return P.get(x);var T=g.apply(this,C);return m.cache=P.set(x,T)||P,T};return m.cache=new(d.Cache||l),m}d.Cache=l,_.exports=d},86349:function(_,b,i){var l=i(63920),f=i(32544),d=f(function(g,E,m){l(g,E,m)});_.exports=d},9086:function(_,b,i){var l=i(26460),f=i(42327),d=i(69386),g=i(18422),E=i(11396),m=i(79294),C=i(83368),x=i(15559),P=1,T=2,O=4,w=C(function(R,F){var V={};if(R==null)return V;var L=!1;F=l(F,function(U){return U=g(U,R),L||(L=U.length>1),U}),E(R,x(R),V),L&&(V=f(V,P|T|O,m));for(var $=F.length;$--;)d(V,F[$]);return V});_.exports=w},79922:function(_,b,i){var l=i(26460),f=i(88904),d=i(96621),g=i(15559);function E(m,C){if(m==null)return{};var x=l(g(m),function(P){return[P]});return C=f(C),d(m,x,function(P,T){return C(P,T[0])})}_.exports=E},21651:function(_,b,i){var l=i(61712),f=i(14815),d=i(73266),g=i(18780);function E(m){return d(m)?l(g(m)):f(m)}_.exports=E},3040:function(_,b,i){var l=i(58116);function f(d,g,E){return d==null?d:l(d,g,E)}_.exports=f},54002:function(_,b,i){var l=i(34958),f=l(function(d,g,E){return d+(E?"_":"")+g.toLowerCase()});_.exports=f},90748:function(_,b,i){var l=i(90778),f=i(90454),d=i(25225),g=i(41119);function E(m,C,x){return m=g(m),x=x==null?0:l(d(x),0,m.length),C=f(C),m.slice(x,x+C.length)==C}_.exports=E},27471:function(_){function b(){return[]}_.exports=b},7149:function(_){function b(){return!1}_.exports=b},90992:function(_,b,i){var l=i(78746),f=1/0,d=17976931348623157e292;function g(E){if(!E)return E===0?E:0;if(E=l(E),E===f||E===-f){var m=E<0?-1:1;return m*d}return E===E?E:0}_.exports=g},25225:function(_,b,i){var l=i(90992);function f(d){var g=l(d),E=g%1;return g===g?E?g-E:g:0}_.exports=f},78746:function(_,b,i){var l=i(63349),f=i(85973),d=i(22945),g=0/0,E=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,C=/^0o[0-7]+$/i,x=parseInt;function P(T){if(typeof T=="number")return T;if(d(T))return g;if(f(T)){var O=typeof T.valueOf=="function"?T.valueOf():T;T=f(O)?O+"":O}if(typeof T!="string")return T===0?T:+T;T=l(T);var w=m.test(T);return w||C.test(T)?x(T.slice(2),w?2:8):E.test(T)?g:+T}_.exports=P},57464:function(_,b,i){var l=i(11396),f=i(5850);function d(g){return l(g,f(g))}_.exports=d},41119:function(_,b,i){var l=i(90454);function f(d){return d==null?"":l(d)}_.exports=f},48344:function(_,b,i){var l=i(26758),f=i(67372),d=i(35897),g=i(88904),E=i(71407),m=i(77236),C=i(98752),x=i(93839),P=i(85973),T=i(14812);function O(w,R,F){var V=m(w),L=V||C(w)||T(w);if(R=g(R,4),F==null){var $=w&&w.constructor;L?F=V?new $:[]:P(w)?F=x($)?f(E(w)):{}:F={}}return(L?l:d)(w,function(U,N,k){return R(F,U,N,k)}),F}_.exports=O},23940:function(_,b,i){var l=i(54660),f=l("toUpperCase");_.exports=f},90280:function(_,b,i){var l=i(96051),f=i(65471),d=i(41119),g=i(6645);function E(m,C,x){return m=d(m),C=x?void 0:C,C===void 0?f(m)?g(m):l(m):m.match(C)||[]}_.exports=E},54516:function(_){"use strict";/*
1135
1135
  object-assign
@@ -1150,10 +1150,10 @@ object-assign
1150
1150
  `+Pe+c}var Ee=!1;function _e(c,h){if(!c||Ee)return"";Ee=!0;var M=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(h)if(h=function(){throw Error()},Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(ir){var I=ir}Reflect.construct(c,[],h)}else{try{h.call()}catch(ir){I=ir}c.call(h.prototype)}else{try{throw Error()}catch(ir){I=ir}c()}}catch(ir){if(ir&&I&&typeof ir.stack=="string"){for(var Q=ir.stack.split(`
1151
1151
  `),se=I.stack.split(`
1152
1152
  `),Ve=Q.length-1,Gt=se.length-1;1<=Ve&&0<=Gt&&Q[Ve]!==se[Gt];)Gt--;for(;1<=Ve&&0<=Gt;Ve--,Gt--)if(Q[Ve]!==se[Gt]){if(Ve!==1||Gt!==1)do if(Ve--,Gt--,0>Gt||Q[Ve]!==se[Gt]){var pn=`
1153
- `+Q[Ve].replace(" at new "," at ");return c.displayName&&pn.includes("<anonymous>")&&(pn=pn.replace("<anonymous>",c.displayName)),pn}while(1<=Ve&&0<=Gt);break}}}finally{Ee=!1,Error.prepareStackTrace=M}return(c=c?c.displayName||c.name:"")?ye(c):""}function We(c){switch(c.tag){case 5:return ye(c.type);case 16:return ye("Lazy");case 13:return ye("Suspense");case 19:return ye("SuspenseList");case 0:case 2:case 15:return c=_e(c.type,!1),c;case 11:return c=_e(c.type.render,!1),c;case 1:return c=_e(c.type,!0),c;default:return""}}function Ie(c){if(c==null)return null;if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case G:return"Fragment";case K:return"Portal";case ae:return"Profiler";case Y:return"StrictMode";case be:return"Suspense";case te:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case J:return(c.displayName||"Context")+".Consumer";case Ce:return(c._context.displayName||"Context")+".Provider";case le:var h=c.render;return c=c.displayName,c||(c=h.displayName||h.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case q:return h=c.displayName||null,h!==null?h:Ie(c.type)||"Memo";case ee:h=c._payload,c=c._init;try{return Ie(c(h))}catch{}}return null}function Fe(c){var h=c.type;switch(c.tag){case 24:return"Cache";case 9:return(h.displayName||"Context")+".Consumer";case 10:return(h._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return c=h.render,c=c.displayName||c.name||"",h.displayName||(c!==""?"ForwardRef("+c+")":"ForwardRef");case 7:return"Fragment";case 5:return h;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ie(h);case 8:return h===Y?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h}return null}function ut(c){switch(typeof c){case"boolean":case"number":case"string":case"undefined":return c;case"object":return c;default:return""}}function ht(c){var h=c.type;return(c=c.nodeName)&&c.toLowerCase()==="input"&&(h==="checkbox"||h==="radio")}function Ot(c){var h=ht(c)?"checked":"value",M=Object.getOwnPropertyDescriptor(c.constructor.prototype,h),I=""+c[h];if(!c.hasOwnProperty(h)&&typeof M<"u"&&typeof M.get=="function"&&typeof M.set=="function"){var Q=M.get,se=M.set;return Object.defineProperty(c,h,{configurable:!0,get:function(){return Q.call(this)},set:function(Ve){I=""+Ve,se.call(this,Ve)}}),Object.defineProperty(c,h,{enumerable:M.enumerable}),{getValue:function(){return I},setValue:function(Ve){I=""+Ve},stopTracking:function(){c._valueTracker=null,delete c[h]}}}}function Ue(c){c._valueTracker||(c._valueTracker=Ot(c))}function at(c){if(!c)return!1;var h=c._valueTracker;if(!h)return!0;var M=h.getValue(),I="";return c&&(I=ht(c)?c.checked?"true":"false":c.value),c=I,c!==M?(h.setValue(c),!0):!1}function Pt(c){if(c=c||(typeof document<"u"?document:void 0),typeof c>"u")return null;try{return c.activeElement||c.body}catch{return c.body}}function lt(c,h){var M=h.checked;return pe({},h,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:M??c._wrapperState.initialChecked})}function kt(c,h){var M=h.defaultValue==null?"":h.defaultValue,I=h.checked!=null?h.checked:h.defaultChecked;M=ut(h.value!=null?h.value:M),c._wrapperState={initialChecked:I,initialValue:M,controlled:h.type==="checkbox"||h.type==="radio"?h.checked!=null:h.value!=null}}function nn(c,h){h=h.checked,h!=null&&k(c,"checked",h,!1)}function hn(c,h){nn(c,h);var M=ut(h.value),I=h.type;if(M!=null)I==="number"?(M===0&&c.value===""||c.value!=M)&&(c.value=""+M):c.value!==""+M&&(c.value=""+M);else if(I==="submit"||I==="reset"){c.removeAttribute("value");return}h.hasOwnProperty("value")?kn(c,h.type,M):h.hasOwnProperty("defaultValue")&&kn(c,h.type,ut(h.defaultValue)),h.checked==null&&h.defaultChecked!=null&&(c.defaultChecked=!!h.defaultChecked)}function Rn(c,h,M){if(h.hasOwnProperty("value")||h.hasOwnProperty("defaultValue")){var I=h.type;if(!(I!=="submit"&&I!=="reset"||h.value!==void 0&&h.value!==null))return;h=""+c._wrapperState.initialValue,M||h===c.value||(c.value=h),c.defaultValue=h}M=c.name,M!==""&&(c.name=""),c.defaultChecked=!!c._wrapperState.initialChecked,M!==""&&(c.name=M)}function kn(c,h,M){(h!=="number"||Pt(c.ownerDocument)!==c)&&(M==null?c.defaultValue=""+c._wrapperState.initialValue:c.defaultValue!==""+M&&(c.defaultValue=""+M))}var $t=Array.isArray;function yn(c,h,M,I){if(c=c.options,h){h={};for(var Q=0;Q<M.length;Q++)h["$"+M[Q]]=!0;for(M=0;M<c.length;M++)Q=h.hasOwnProperty("$"+c[M].value),c[M].selected!==Q&&(c[M].selected=Q),Q&&I&&(c[M].defaultSelected=!0)}else{for(M=""+ut(M),h=null,Q=0;Q<c.length;Q++){if(c[Q].value===M){c[Q].selected=!0,I&&(c[Q].defaultSelected=!0);return}h!==null||c[Q].disabled||(h=c[Q])}h!==null&&(h.selected=!0)}}function Yn(c,h){if(h.dangerouslySetInnerHTML!=null)throw Error(d(91));return pe({},h,{value:void 0,defaultValue:void 0,children:""+c._wrapperState.initialValue})}function cn(c,h){var M=h.value;if(M==null){if(M=h.children,h=h.defaultValue,M!=null){if(h!=null)throw Error(d(92));if($t(M)){if(1<M.length)throw Error(d(93));M=M[0]}h=M}h==null&&(h=""),M=h}c._wrapperState={initialValue:ut(M)}}function st(c,h){var M=ut(h.value),I=ut(h.defaultValue);M!=null&&(M=""+M,M!==c.value&&(c.value=M),h.defaultValue==null&&c.defaultValue!==M&&(c.defaultValue=M)),I!=null&&(c.defaultValue=""+I)}function on(c){var h=c.textContent;h===c._wrapperState.initialValue&&h!==""&&h!==null&&(c.value=h)}function dt(c){switch(c){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Dt(c,h){return c==null||c==="http://www.w3.org/1999/xhtml"?dt(h):c==="http://www.w3.org/2000/svg"&&h==="foreignObject"?"http://www.w3.org/1999/xhtml":c}var Ht,rn=function(c){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(h,M,I,Q){MSApp.execUnsafeLocalFunction(function(){return c(h,M,I,Q)})}:c}(function(c,h){if(c.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in c)c.innerHTML=h;else{for(Ht=Ht||document.createElement("div"),Ht.innerHTML="<svg>"+h.valueOf().toString()+"</svg>",h=Ht.firstChild;c.firstChild;)c.removeChild(c.firstChild);for(;h.firstChild;)c.appendChild(h.firstChild)}});function ke(c,h){if(h){var M=c.firstChild;if(M&&M===c.lastChild&&M.nodeType===3){M.nodeValue=h;return}}c.textContent=h}var ct={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},D=["Webkit","ms","Moz","O"];Object.keys(ct).forEach(function(c){D.forEach(function(h){h=h+c.charAt(0).toUpperCase()+c.substring(1),ct[h]=ct[c]})});function W(c,h,M){return h==null||typeof h=="boolean"||h===""?"":M||typeof h!="number"||h===0||ct.hasOwnProperty(c)&&ct[c]?(""+h).trim():h+"px"}function re(c,h){c=c.style;for(var M in h)if(h.hasOwnProperty(M)){var I=M.indexOf("--")===0,Q=W(M,h[M],I);M==="float"&&(M="cssFloat"),I?c.setProperty(M,Q):c[M]=Q}}var Oe=pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ze(c,h){if(h){if(Oe[c]&&(h.children!=null||h.dangerouslySetInnerHTML!=null))throw Error(d(137,c));if(h.dangerouslySetInnerHTML!=null){if(h.children!=null)throw Error(d(60));if(typeof h.dangerouslySetInnerHTML!="object"||!("__html"in h.dangerouslySetInnerHTML))throw Error(d(61))}if(h.style!=null&&typeof h.style!="object")throw Error(d(62))}}function pt(c,h){if(c.indexOf("-")===-1)return typeof h.is=="string";switch(c){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $e=null;function Re(c){return c=c.target||c.srcElement||window,c.correspondingUseElement&&(c=c.correspondingUseElement),c.nodeType===3?c.parentNode:c}var Be=null,Ne=null,bt=null;function Kt(c){if(c=xl(c)){if(typeof Be!="function")throw Error(d(280));var h=c.stateNode;h&&(h=Da(h),Be(c.stateNode,c.type,h))}}function an(c){Ne?bt?bt.push(c):bt=[c]:Ne=c}function In(){if(Ne){var c=Ne,h=bt;if(bt=Ne=null,Kt(c),h)for(c=0;c<h.length;c++)Kt(h[c])}}function rr(c,h){return c(h)}function Wn(){}var gr=!1;function fr(c,h,M){if(gr)return c(h,M);gr=!0;try{return rr(c,h,M)}finally{gr=!1,(Ne!==null||bt!==null)&&(Wn(),In())}}function Rr(c,h){var M=c.stateNode;if(M===null)return null;var I=Da(M);if(I===null)return null;M=I[h];e:switch(h){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(I=!I.disabled)||(c=c.type,I=!(c==="button"||c==="input"||c==="select"||c==="textarea")),c=!I;break e;default:c=!1}if(c)return null;if(M&&typeof M!="function")throw Error(d(231,h,typeof M));return M}var Vr=!1;if(x)try{var ei={};Object.defineProperty(ei,"passive",{get:function(){Vr=!0}}),window.addEventListener("test",ei,ei),window.removeEventListener("test",ei,ei)}catch{Vr=!1}function Ct(c,h,M,I,Q,se,Ve,Gt,pn){var ir=Array.prototype.slice.call(arguments,3);try{h.apply(M,ir)}catch(zr){this.onError(zr)}}var St=!1,Pn=null,Qt=!1,qn=null,Tt={onError:function(c){St=!0,Pn=c}};function fe(c,h,M,I,Q,se,Ve,Gt,pn){St=!1,Pn=null,Ct.apply(Tt,arguments)}function ve(c,h,M,I,Q,se,Ve,Gt,pn){if(fe.apply(this,arguments),St){if(St){var ir=Pn;St=!1,Pn=null}else throw Error(d(198));Qt||(Qt=!0,qn=ir)}}function Qe(c){var h=c,M=c;if(c.alternate)for(;h.return;)h=h.return;else{c=h;do h=c,h.flags&4098&&(M=h.return),c=h.return;while(c)}return h.tag===3?M:null}function jt(c){if(c.tag===13){var h=c.memoizedState;if(h===null&&(c=c.alternate,c!==null&&(h=c.memoizedState)),h!==null)return h.dehydrated}return null}function bn(c){if(Qe(c)!==c)throw Error(d(188))}function zn(c){var h=c.alternate;if(!h){if(h=Qe(c),h===null)throw Error(d(188));return h!==c?null:c}for(var M=c,I=h;;){var Q=M.return;if(Q===null)break;var se=Q.alternate;if(se===null){if(I=Q.return,I!==null){M=I;continue}break}if(Q.child===se.child){for(se=Q.child;se;){if(se===M)return bn(Q),c;if(se===I)return bn(Q),h;se=se.sibling}throw Error(d(188))}if(M.return!==I.return)M=Q,I=se;else{for(var Ve=!1,Gt=Q.child;Gt;){if(Gt===M){Ve=!0,M=Q,I=se;break}if(Gt===I){Ve=!0,I=Q,M=se;break}Gt=Gt.sibling}if(!Ve){for(Gt=se.child;Gt;){if(Gt===M){Ve=!0,M=se,I=Q;break}if(Gt===I){Ve=!0,I=se,M=Q;break}Gt=Gt.sibling}if(!Ve)throw Error(d(189))}}if(M.alternate!==I)throw Error(d(190))}if(M.tag!==3)throw Error(d(188));return M.stateNode.current===M?c:h}function Cr(c){return c=zn(c),c!==null?Zr(c):null}function Zr(c){if(c.tag===5||c.tag===6)return c;for(c=c.child;c!==null;){var h=Zr(c);if(h!==null)return h;c=c.sibling}return null}var Jr=f.unstable_scheduleCallback,_r=f.unstable_cancelCallback,Xn=f.unstable_shouldYield,mt=f.unstable_requestPaint,Ke=f.unstable_now,Mt=f.unstable_getCurrentPriorityLevel,tn=f.unstable_ImmediatePriority,Fn=f.unstable_UserBlockingPriority,Cn=f.unstable_NormalPriority,Bn=f.unstable_LowPriority,Ge=f.unstable_IdlePriority,At=null,Bt=null;function Zt(c){if(Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(At,c,void 0,(c.current.flags&128)===128)}catch{}}var Yt=Math.clz32?Math.clz32:tr,vn=Math.log,Un=Math.LN2;function tr(c){return c>>>=0,c===0?32:31-(vn(c)/Un|0)|0}var Nn=64,Vn=4194304;function Ye(c){switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function de(c,h){var M=c.pendingLanes;if(M===0)return 0;var I=0,Q=c.suspendedLanes,se=c.pingedLanes,Ve=M&268435455;if(Ve!==0){var Gt=Ve&~Q;Gt!==0?I=Ye(Gt):(se&=Ve,se!==0&&(I=Ye(se)))}else Ve=M&~Q,Ve!==0?I=Ye(Ve):se!==0&&(I=Ye(se));if(I===0)return 0;if(h!==0&&h!==I&&!(h&Q)&&(Q=I&-I,se=h&-h,Q>=se||Q===16&&(se&4194240)!==0))return h;if(I&4&&(I|=M&16),h=c.entangledLanes,h!==0)for(c=c.entanglements,h&=I;0<h;)M=31-Yt(h),Q=1<<M,I|=c[M],h&=~Q;return I}function ne(c,h){switch(c){case 1:case 2:case 4:return h+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ge(c,h){for(var M=c.suspendedLanes,I=c.pingedLanes,Q=c.expirationTimes,se=c.pendingLanes;0<se;){var Ve=31-Yt(se),Gt=1<<Ve,pn=Q[Ve];pn===-1?(!(Gt&M)||Gt&I)&&(Q[Ve]=ne(Gt,h)):pn<=h&&(c.expiredLanes|=Gt),se&=~Gt}}function je(c){return c=c.pendingLanes&-1073741825,c!==0?c:c&1073741824?1073741824:0}function He(){var c=Nn;return Nn<<=1,!(Nn&4194240)&&(Nn=64),c}function it(c){for(var h=[],M=0;31>M;M++)h.push(c);return h}function Rt(c,h,M){c.pendingLanes|=h,h!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,h=31-Yt(h),c[h]=M}function fn(c,h){var M=c.pendingLanes&~h;c.pendingLanes=h,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=h,c.mutableReadLanes&=h,c.entangledLanes&=h,h=c.entanglements;var I=c.eventTimes;for(c=c.expirationTimes;0<M;){var Q=31-Yt(M),se=1<<Q;h[Q]=0,I[Q]=-1,c[Q]=-1,M&=~se}}function qt(c,h){var M=c.entangledLanes|=h;for(c=c.entanglements;M;){var I=31-Yt(M),Q=1<<I;Q&h|c[I]&h&&(c[I]|=h),M&=~Q}}var Vt=0;function Jt(c){return c&=-c,1<c?4<c?c&268435455?16:536870912:4:1}var dn,Jn,Hn,Ir,vr,yr=!1,Er=[],Or=null,we=null,ue=null,Te=new Map,ze=new Map,ft=[],yt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ln(c,h){switch(c){case"focusin":case"focusout":Or=null;break;case"dragenter":case"dragleave":we=null;break;case"mouseover":case"mouseout":ue=null;break;case"pointerover":case"pointerout":Te.delete(h.pointerId);break;case"gotpointercapture":case"lostpointercapture":ze.delete(h.pointerId)}}function En(c,h,M,I,Q,se){return c===null||c.nativeEvent!==se?(c={blockedOn:h,domEventName:M,eventSystemFlags:I,nativeEvent:se,targetContainers:[Q]},h!==null&&(h=xl(h),h!==null&&Jn(h)),c):(c.eventSystemFlags|=I,h=c.targetContainers,Q!==null&&h.indexOf(Q)===-1&&h.push(Q),c)}function jr(c,h,M,I,Q){switch(h){case"focusin":return Or=En(Or,c,h,M,I,Q),!0;case"dragenter":return we=En(we,c,h,M,I,Q),!0;case"mouseover":return ue=En(ue,c,h,M,I,Q),!0;case"pointerover":var se=Q.pointerId;return Te.set(se,En(Te.get(se)||null,c,h,M,I,Q)),!0;case"gotpointercapture":return se=Q.pointerId,ze.set(se,En(ze.get(se)||null,c,h,M,I,Q)),!0}return!1}function ot(c){var h=Xa(c.target);if(h!==null){var M=Qe(h);if(M!==null){if(h=M.tag,h===13){if(h=jt(M),h!==null){c.blockedOn=h,vr(c.priority,function(){Hn(M)});return}}else if(h===3&&M.stateNode.current.memoizedState.isDehydrated){c.blockedOn=M.tag===3?M.stateNode.containerInfo:null;return}}}c.blockedOn=null}function zt(c){if(c.blockedOn!==null)return!1;for(var h=c.targetContainers;0<h.length;){var M=ai(c.domEventName,c.eventSystemFlags,h[0],c.nativeEvent);if(M===null){M=c.nativeEvent;var I=new M.constructor(M.type,M);$e=I,M.target.dispatchEvent(I),$e=null}else return h=xl(M),h!==null&&Jn(h),c.blockedOn=M,!1;h.shift()}return!0}function Ut(c,h,M){zt(c)&&M.delete(h)}function Ln(){yr=!1,Or!==null&&zt(Or)&&(Or=null),we!==null&&zt(we)&&(we=null),ue!==null&&zt(ue)&&(ue=null),Te.forEach(Ut),ze.forEach(Ut)}function Gn(c,h){c.blockedOn===h&&(c.blockedOn=null,yr||(yr=!0,f.unstable_scheduleCallback(f.unstable_NormalPriority,Ln)))}function xn(c){function h(Q){return Gn(Q,c)}if(0<Er.length){Gn(Er[0],c);for(var M=1;M<Er.length;M++){var I=Er[M];I.blockedOn===c&&(I.blockedOn=null)}}for(Or!==null&&Gn(Or,c),we!==null&&Gn(we,c),ue!==null&&Gn(ue,c),Te.forEach(h),ze.forEach(h),M=0;M<ft.length;M++)I=ft[M],I.blockedOn===c&&(I.blockedOn=null);for(;0<ft.length&&(M=ft[0],M.blockedOn===null);)ot(M),M.blockedOn===null&&ft.shift()}var ur=j.ReactCurrentBatchConfig,Sr=!0;function Fr(c,h,M,I){var Q=Vt,se=ur.transition;ur.transition=null;try{Vt=1,di(c,h,M,I)}finally{Vt=Q,ur.transition=se}}function ni(c,h,M,I){var Q=Vt,se=ur.transition;ur.transition=null;try{Vt=4,di(c,h,M,I)}finally{Vt=Q,ur.transition=se}}function di(c,h,M,I){if(Sr){var Q=ai(c,h,M,I);if(Q===null)Gs(c,h,I,Ar,M),ln(c,I);else if(jr(Q,c,h,M,I))I.stopPropagation();else if(ln(c,I),h&4&&-1<yt.indexOf(c)){for(;Q!==null;){var se=xl(Q);if(se!==null&&dn(se),se=ai(c,h,M,I),se===null&&Gs(c,h,I,Ar,M),se===Q)break;Q=se}Q!==null&&I.stopPropagation()}else Gs(c,h,I,null,M)}}var Ar=null;function ai(c,h,M,I){if(Ar=null,c=Re(I),c=Xa(c),c!==null)if(h=Qe(c),h===null)c=null;else if(M=h.tag,M===13){if(c=jt(h),c!==null)return c;c=null}else if(M===3){if(h.stateNode.current.memoizedState.isDehydrated)return h.tag===3?h.stateNode.containerInfo:null;c=null}else h!==c&&(c=null);return Ar=c,null}function Oi(c){switch(c){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Mt()){case tn:return 1;case Fn:return 4;case Cn:case Bn:return 16;case Ge:return 536870912;default:return 16}default:return 16}}var $r=null,_i=null,Wi=null;function so(){if(Wi)return Wi;var c,h=_i,M=h.length,I,Q="value"in $r?$r.value:$r.textContent,se=Q.length;for(c=0;c<M&&h[c]===Q[c];c++);var Ve=M-c;for(I=1;I<=Ve&&h[M-I]===Q[se-I];I++);return Wi=Q.slice(c,1<I?1-I:void 0)}function yo(c){var h=c.keyCode;return"charCode"in c?(c=c.charCode,c===0&&h===13&&(c=13)):c=h,c===10&&(c=13),32<=c||c===13?c:0}function to(){return!0}function Xe(){return!1}function De(c){function h(M,I,Q,se,Ve){this._reactName=M,this._targetInst=Q,this.type=I,this.nativeEvent=se,this.target=Ve,this.currentTarget=null;for(var Gt in c)c.hasOwnProperty(Gt)&&(M=c[Gt],this[Gt]=M?M(se):se[Gt]);return this.isDefaultPrevented=(se.defaultPrevented!=null?se.defaultPrevented:se.returnValue===!1)?to:Xe,this.isPropagationStopped=Xe,this}return pe(h.prototype,{preventDefault:function(){this.defaultPrevented=!0;var M=this.nativeEvent;M&&(M.preventDefault?M.preventDefault():typeof M.returnValue!="unknown"&&(M.returnValue=!1),this.isDefaultPrevented=to)},stopPropagation:function(){var M=this.nativeEvent;M&&(M.stopPropagation?M.stopPropagation():typeof M.cancelBubble!="unknown"&&(M.cancelBubble=!0),this.isPropagationStopped=to)},persist:function(){},isPersistent:to}),h}var _t={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(c){return c.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Et=De(_t),Xt=pe({},_t,{view:0,detail:0}),Sn=De(Xt),On,jn,cr,ii=pe({},Xt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wo,button:0,buttons:0,relatedTarget:function(c){return c.relatedTarget===void 0?c.fromElement===c.srcElement?c.toElement:c.fromElement:c.relatedTarget},movementX:function(c){return"movementX"in c?c.movementX:(c!==cr&&(cr&&c.type==="mousemove"?(On=c.screenX-cr.screenX,jn=c.screenY-cr.screenY):jn=On=0,cr=c),On)},movementY:function(c){return"movementY"in c?c.movementY:jn}}),li=De(ii),Yr=pe({},ii,{dataTransfer:0}),oi=De(Yr),qr=pe({},Xt,{relatedTarget:0}),gi=De(qr),Qi=pe({},_t,{animationName:0,elapsedTime:0,pseudoElement:0}),zi=De(Qi),Li=pe({},_t,{clipboardData:function(c){return"clipboardData"in c?c.clipboardData:window.clipboardData}}),ui=De(Li),Vi=pe({},_t,{data:0}),Bi=De(Vi),ho={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hi={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Eo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hi(c){var h=this.nativeEvent;return h.getModifierState?h.getModifierState(c):(c=Eo[c])?!!h[c]:!1}function wo(){return hi}var Uo=pe({},Xt,{key:function(c){if(c.key){var h=ho[c.key]||c.key;if(h!=="Unidentified")return h}return c.type==="keypress"?(c=yo(c),c===13?"Enter":String.fromCharCode(c)):c.type==="keydown"||c.type==="keyup"?Hi[c.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wo,charCode:function(c){return c.type==="keypress"?yo(c):0},keyCode:function(c){return c.type==="keydown"||c.type==="keyup"?c.keyCode:0},which:function(c){return c.type==="keypress"?yo(c):c.type==="keydown"||c.type==="keyup"?c.keyCode:0}}),ie=De(Uo),B=pe({},ii,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),he=De(B),xe=pe({},Xt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wo}),rt=De(xe),Lt=pe({},_t,{propertyName:0,elapsedTime:0,pseudoElement:0}),en=De(Lt),An=pe({},ii,{deltaX:function(c){return"deltaX"in c?c.deltaX:"wheelDeltaX"in c?-c.wheelDeltaX:0},deltaY:function(c){return"deltaY"in c?c.deltaY:"wheelDeltaY"in c?-c.wheelDeltaY:"wheelDelta"in c?-c.wheelDelta:0},deltaZ:0,deltaMode:0}),_n=De(An),Mr=[9,13,27,32],Ur=x&&"CompositionEvent"in window,Pr=null;x&&"documentMode"in document&&(Pr=document.documentMode);var Kr=x&&"TextEvent"in window&&!Pr,Qr=x&&(!Ur||Pr&&8<Pr&&11>=Pr),Wr=String.fromCharCode(32),ci=!1;function pr(c,h){switch(c){case"keyup":return Mr.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xr(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var Br=!1;function Mn(c,h){switch(c){case"compositionend":return Xr(h);case"keypress":return h.which!==32?null:(ci=!0,Wr);case"textInput":return c=h.data,c===Wr&&ci?null:c;default:return null}}function qi(c,h){if(Br)return c==="compositionend"||!Ur&&pr(c,h)?(c=so(),Wi=_i=$r=null,Br=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1<h.char.length)return h.char;if(h.which)return String.fromCharCode(h.which)}return null;case"compositionend":return Qr&&h.locale!=="ko"?null:h.data;default:return null}}var Po={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function mo(c){var h=c&&c.nodeName&&c.nodeName.toLowerCase();return h==="input"?!!Po[c.type]:h==="textarea"}function Ko(c,h,M,I){an(I),h=Ea(h,"onChange"),0<h.length&&(M=new Et("onChange","change",null,M,I),c.push({event:M,listeners:h}))}var Co=null,No=null;function Ao(c){bo(c,0)}function vt(c){var h=Yl(c);if(at(h))return c}function la(c,h){if(c==="change")return h}var Es=!1;if(x){var Qn;if(x){var ms="oninput"in document;if(!ms){var ua=document.createElement("div");ua.setAttribute("oninput","return;"),ms=typeof ua.oninput=="function"}Qn=ms}else Qn=!1;Es=Qn&&(!document.documentMode||9<document.documentMode)}function co(){Co&&(Co.detachEvent("onpropertychange",Zs),No=Co=null)}function Zs(c){if(c.propertyName==="value"&&vt(No)){var h=[];Ko(h,No,c,Re(c)),fr(Ao,h)}}function ya(c,h,M){c==="focusin"?(co(),Co=h,No=M,Co.attachEvent("onpropertychange",Zs)):c==="focusout"&&co()}function qe(c){if(c==="selectionchange"||c==="keyup"||c==="keydown")return vt(No)}function Oa(c,h){if(c==="click")return vt(h)}function ul(c,h){if(c==="input"||c==="change")return vt(h)}function Mo(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var bs=typeof Object.is=="function"?Object.is:Mo;function ca(c,h){if(bs(c,h))return!0;if(typeof c!="object"||c===null||typeof h!="object"||h===null)return!1;var M=Object.keys(c),I=Object.keys(h);if(M.length!==I.length)return!1;for(I=0;I<M.length;I++){var Q=M[I];if(!P.call(h,Q)||!bs(c[Q],h[Q]))return!1}return!0}function El(c){for(;c&&c.firstChild;)c=c.firstChild;return c}function Ds(c,h){var M=El(c);c=0;for(var I;M;){if(M.nodeType===3){if(I=c+M.textContent.length,c<=h&&I>=h)return{node:M,offset:h-c};c=I}e:{for(;M;){if(M.nextSibling){M=M.nextSibling;break e}M=M.parentNode}M=void 0}M=El(M)}}function Zi(c,h){return c&&h?c===h?!0:c&&c.nodeType===3?!1:h&&h.nodeType===3?Zi(c,h.parentNode):"contains"in c?c.contains(h):c.compareDocumentPosition?!!(c.compareDocumentPosition(h)&16):!1:!1}function Xo(){for(var c=window,h=Pt();h instanceof c.HTMLIFrameElement;){try{var M=typeof h.contentWindow.location.href=="string"}catch{M=!1}if(M)c=h.contentWindow;else break;h=Pt(c.document)}return h}function po(c){var h=c&&c.nodeName&&c.nodeName.toLowerCase();return h&&(h==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||h==="textarea"||c.contentEditable==="true")}function go(c){var h=Xo(),M=c.focusedElem,I=c.selectionRange;if(h!==M&&M&&M.ownerDocument&&Zi(M.ownerDocument.documentElement,M)){if(I!==null&&po(M)){if(h=I.start,c=I.end,c===void 0&&(c=h),"selectionStart"in M)M.selectionStart=h,M.selectionEnd=Math.min(c,M.value.length);else if(c=(h=M.ownerDocument||document)&&h.defaultView||window,c.getSelection){c=c.getSelection();var Q=M.textContent.length,se=Math.min(I.start,Q);I=I.end===void 0?se:Math.min(I.end,Q),!c.extend&&se>I&&(Q=I,I=se,se=Q),Q=Ds(M,se);var Ve=Ds(M,I);Q&&Ve&&(c.rangeCount!==1||c.anchorNode!==Q.node||c.anchorOffset!==Q.offset||c.focusNode!==Ve.node||c.focusOffset!==Ve.offset)&&(h=h.createRange(),h.setStart(Q.node,Q.offset),c.removeAllRanges(),se>I?(c.addRange(h),c.extend(Ve.node,Ve.offset)):(h.setEnd(Ve.node,Ve.offset),c.addRange(h)))}}for(h=[],c=M;c=c.parentNode;)c.nodeType===1&&h.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<h.length;M++)c=h[M],c.element.scrollLeft=c.left,c.element.scrollTop=c.top}}var Fo=x&&"documentMode"in document&&11>=document.documentMode,xs=null,fa=null,$a=null,us=!1;function bl(c,h,M){var I=M.window===M?M.document:M.nodeType===9?M:M.ownerDocument;us||xs==null||xs!==Pt(I)||(I=xs,"selectionStart"in I&&po(I)?I={start:I.selectionStart,end:I.selectionEnd}:(I=(I.ownerDocument&&I.ownerDocument.defaultView||window).getSelection(),I={anchorNode:I.anchorNode,anchorOffset:I.anchorOffset,focusNode:I.focusNode,focusOffset:I.focusOffset}),$a&&ca($a,I)||($a=I,I=Ea(fa,"onSelect"),0<I.length&&(h=new Et("onSelect","select",null,h,M),c.push({event:h,listeners:I}),h.target=xs)))}function Go(c,h){var M={};return M[c.toLowerCase()]=h.toLowerCase(),M["Webkit"+c]="webkit"+h,M["Moz"+c]="moz"+h,M}var xt={animationend:Go("Animation","AnimationEnd"),animationiteration:Go("Animation","AnimationIteration"),animationstart:Go("Animation","AnimationStart"),transitionend:Go("Transition","TransitionEnd")},Tn={},$n={};x&&($n=document.createElement("div").style,"AnimationEvent"in window||(delete xt.animationend.animation,delete xt.animationiteration.animation,delete xt.animationstart.animation),"TransitionEvent"in window||delete xt.transitionend.transition);function lr(c){if(Tn[c])return Tn[c];if(!xt[c])return c;var h=xt[c],M;for(M in h)if(h.hasOwnProperty(M)&&M in $n)return Tn[c]=h[M];return c}var br=lr("animationend"),Gr=lr("animationiteration"),vi=lr("animationstart"),xi=lr("transitionend"),Ti=new Map,bi="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function wi(c,h){Ti.set(c,h),m(h,[c])}for(var fi=0;fi<bi.length;fi++){var ji=bi[fi],lo=ji.toLowerCase(),uo=ji[0].toUpperCase()+ji.slice(1);wi(lo,"on"+uo)}wi(br,"onAnimationEnd"),wi(Gr,"onAnimationIteration"),wi(vi,"onAnimationStart"),wi("dblclick","onDoubleClick"),wi("focusin","onFocus"),wi("focusout","onBlur"),wi(xi,"onTransitionEnd"),C("onMouseEnter",["mouseout","mouseover"]),C("onMouseLeave",["mouseout","mouseover"]),C("onPointerEnter",["pointerout","pointerover"]),C("onPointerLeave",["pointerout","pointerover"]),m("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),m("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),m("onBeforeInput",["compositionend","keypress","textInput","paste"]),m("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),m("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),m("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),So=new Set("cancel close invalid load scroll toggle".split(" ").concat(xr));function Do(c,h,M){var I=c.type||"unknown-event";c.currentTarget=M,ve(I,h,void 0,c),c.currentTarget=null}function bo(c,h){h=(h&4)!==0;for(var M=0;M<c.length;M++){var I=c[M],Q=I.event;I=I.listeners;e:{var se=void 0;if(h)for(var Ve=I.length-1;0<=Ve;Ve--){var Gt=I[Ve],pn=Gt.instance,ir=Gt.currentTarget;if(Gt=Gt.listener,pn!==se&&Q.isPropagationStopped())break e;Do(Q,Gt,ir),se=pn}else for(Ve=0;Ve<I.length;Ve++){if(Gt=I[Ve],pn=Gt.instance,ir=Gt.currentTarget,Gt=Gt.listener,pn!==se&&Q.isPropagationStopped())break e;Do(Q,Gt,ir),se=pn}}}if(Qt)throw c=qn,Qt=!1,qn=null,c}function no(c,h){var M=h[Gl];M===void 0&&(M=h[Gl]=new Set);var I=c+"__bubble";M.has(I)||(qo(h,c,2,!1),M.add(I))}function Yo(c,h,M){var I=0;h&&(I|=4),qo(M,c,I,h)}var as="_reactListening"+Math.random().toString(36).slice(2);function Ks(c){if(!c[as]){c[as]=!0,g.forEach(function(M){M!=="selectionchange"&&(So.has(M)||Yo(M,!1,c),Yo(M,!0,c))});var h=c.nodeType===9?c:c.ownerDocument;h===null||h[as]||(h[as]=!0,Yo("selectionchange",!1,h))}}function qo(c,h,M,I){switch(Oi(h)){case 1:var Q=Fr;break;case 4:Q=ni;break;default:Q=di}M=Q.bind(null,h,M,c),Q=void 0,!Vr||h!=="touchstart"&&h!=="touchmove"&&h!=="wheel"||(Q=!0),I?Q!==void 0?c.addEventListener(h,M,{capture:!0,passive:Q}):c.addEventListener(h,M,!0):Q!==void 0?c.addEventListener(h,M,{passive:Q}):c.addEventListener(h,M,!1)}function Gs(c,h,M,I,Q){var se=I;if(!(h&1)&&!(h&2)&&I!==null)e:for(;;){if(I===null)return;var Ve=I.tag;if(Ve===3||Ve===4){var Gt=I.stateNode.containerInfo;if(Gt===Q||Gt.nodeType===8&&Gt.parentNode===Q)break;if(Ve===4)for(Ve=I.return;Ve!==null;){var pn=Ve.tag;if((pn===3||pn===4)&&(pn=Ve.stateNode.containerInfo,pn===Q||pn.nodeType===8&&pn.parentNode===Q))return;Ve=Ve.return}for(;Gt!==null;){if(Ve=Xa(Gt),Ve===null)return;if(pn=Ve.tag,pn===5||pn===6){I=se=Ve;continue e}Gt=Gt.parentNode}}I=I.return}fr(function(){var ir=se,zr=Re(M),kr=[];e:{var Hr=Ti.get(c);if(Hr!==void 0){var Ei=Et,Ii=c;switch(c){case"keypress":if(yo(M)===0)break e;case"keydown":case"keyup":Ei=ie;break;case"focusin":Ii="focus",Ei=gi;break;case"focusout":Ii="blur",Ei=gi;break;case"beforeblur":case"afterblur":Ei=gi;break;case"click":if(M.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ei=li;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ei=oi;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ei=rt;break;case br:case Gr:case vi:Ei=zi;break;case xi:Ei=en;break;case"scroll":Ei=Sn;break;case"wheel":Ei=_n;break;case"copy":case"cut":case"paste":Ei=ui;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ei=he}var Ni=(h&4)!==0,ia=!Ni&&c==="scroll",Zn=Ni?Hr!==null?Hr+"Capture":null:Hr;Ni=[];for(var wn=ir,er;wn!==null;){er=wn;var si=er.stateNode;if(er.tag===5&&si!==null&&(er=si,Zn!==null&&(si=Rr(wn,Zn),si!=null&&Ni.push(Ys(wn,si,er)))),ia)break;wn=wn.return}0<Ni.length&&(Hr=new Ei(Hr,Ii,null,M,zr),kr.push({event:Hr,listeners:Ni}))}}if(!(h&7)){e:{if(Hr=c==="mouseover"||c==="pointerover",Ei=c==="mouseout"||c==="pointerout",Hr&&M!==$e&&(Ii=M.relatedTarget||M.fromElement)&&(Xa(Ii)||Ii[fl]))break e;if((Ei||Hr)&&(Hr=zr.window===zr?zr:(Hr=zr.ownerDocument)?Hr.defaultView||Hr.parentWindow:window,Ei?(Ii=M.relatedTarget||M.toElement,Ei=ir,Ii=Ii?Xa(Ii):null,Ii!==null&&(ia=Qe(Ii),Ii!==ia||Ii.tag!==5&&Ii.tag!==6)&&(Ii=null)):(Ei=null,Ii=ir),Ei!==Ii)){if(Ni=li,si="onMouseLeave",Zn="onMouseEnter",wn="mouse",(c==="pointerout"||c==="pointerover")&&(Ni=he,si="onPointerLeave",Zn="onPointerEnter",wn="pointer"),ia=Ei==null?Hr:Yl(Ei),er=Ii==null?Hr:Yl(Ii),Hr=new Ni(si,wn+"leave",Ei,M,zr),Hr.target=ia,Hr.relatedTarget=er,si=null,Xa(zr)===ir&&(Ni=new Ni(Zn,wn+"enter",Ii,M,zr),Ni.target=er,Ni.relatedTarget=ia,si=Ni),ia=si,Ei&&Ii)t:{for(Ni=Ei,Zn=Ii,wn=0,er=Ni;er;er=Na(er))wn++;for(er=0,si=Zn;si;si=Na(si))er++;for(;0<wn-er;)Ni=Na(Ni),wn--;for(;0<er-wn;)Zn=Na(Zn),er--;for(;wn--;){if(Ni===Zn||Zn!==null&&Ni===Zn.alternate)break t;Ni=Na(Ni),Zn=Na(Zn)}Ni=null}else Ni=null;Ei!==null&&Ta(kr,Hr,Ei,Ni,!1),Ii!==null&&ia!==null&&Ta(kr,ia,Ii,Ni,!0)}}e:{if(Hr=ir?Yl(ir):window,Ei=Hr.nodeName&&Hr.nodeName.toLowerCase(),Ei==="select"||Ei==="input"&&Hr.type==="file")var Ui=la;else if(mo(Hr))if(Es)Ui=ul;else{Ui=qe;var io=ya}else(Ei=Hr.nodeName)&&Ei.toLowerCase()==="input"&&(Hr.type==="checkbox"||Hr.type==="radio")&&(Ui=Oa);if(Ui&&(Ui=Ui(c,ir))){Ko(kr,Ui,M,zr);break e}io&&io(c,Hr,ir),c==="focusout"&&(io=Hr._wrapperState)&&io.controlled&&Hr.type==="number"&&kn(Hr,"number",Hr.value)}switch(io=ir?Yl(ir):window,c){case"focusin":(mo(io)||io.contentEditable==="true")&&(xs=io,fa=ir,$a=null);break;case"focusout":$a=fa=xs=null;break;case"mousedown":us=!0;break;case"contextmenu":case"mouseup":case"dragend":us=!1,bl(kr,M,zr);break;case"selectionchange":if(Fo)break;case"keydown":case"keyup":bl(kr,M,zr)}var ro;if(Ur)e:{switch(c){case"compositionstart":var fo="onCompositionStart";break e;case"compositionend":fo="onCompositionEnd";break e;case"compositionupdate":fo="onCompositionUpdate";break e}fo=void 0}else Br?pr(c,M)&&(fo="onCompositionEnd"):c==="keydown"&&M.keyCode===229&&(fo="onCompositionStart");fo&&(Qr&&M.locale!=="ko"&&(Br||fo!=="onCompositionStart"?fo==="onCompositionEnd"&&Br&&(ro=so()):($r=zr,_i="value"in $r?$r.value:$r.textContent,Br=!0)),io=Ea(ir,fo),0<io.length&&(fo=new Bi(fo,c,null,M,zr),kr.push({event:fo,listeners:io}),ro?fo.data=ro:(ro=Xr(M),ro!==null&&(fo.data=ro)))),(ro=Kr?Mn(c,M):qi(c,M))&&(ir=Ea(ir,"onBeforeInput"),0<ir.length&&(zr=new Bi("onBeforeInput","beforeinput",null,M,zr),kr.push({event:zr,listeners:ir}),zr.data=ro))}bo(kr,h)})}function Ys(c,h,M){return{instance:c,listener:h,currentTarget:M}}function Ea(c,h){for(var M=h+"Capture",I=[];c!==null;){var Q=c,se=Q.stateNode;Q.tag===5&&se!==null&&(Q=se,se=Rr(c,M),se!=null&&I.unshift(Ys(c,se,Q)),se=Rr(c,h),se!=null&&I.push(Ys(c,se,Q))),c=c.return}return I}function Na(c){if(c===null)return null;do c=c.return;while(c&&c.tag!==5);return c||null}function Ta(c,h,M,I,Q){for(var se=h._reactName,Ve=[];M!==null&&M!==I;){var Gt=M,pn=Gt.alternate,ir=Gt.stateNode;if(pn!==null&&pn===I)break;Gt.tag===5&&ir!==null&&(Gt=ir,Q?(pn=Rr(M,se),pn!=null&&Ve.unshift(Ys(M,pn,Gt))):Q||(pn=Rr(M,se),pn!=null&&Ve.push(Ys(M,pn,Gt)))),M=M.return}Ve.length!==0&&c.push({event:h,listeners:Ve})}var Ms=/\r\n?/g,Fl=/\u0000|\uFFFD/g;function wa(c){return(typeof c=="string"?c:""+c).replace(Ms,`
1154
- `).replace(Fl,"")}function Bl(c,h,M){if(h=wa(h),wa(c)!==h&&M)throw Error(d(425))}function ba(){}var Ro=null,Lr=null;function es(c,h){return c==="textarea"||c==="noscript"||typeof h.children=="string"||typeof h.children=="number"||typeof h.dangerouslySetInnerHTML=="object"&&h.dangerouslySetInnerHTML!==null&&h.dangerouslySetInnerHTML.__html!=null}var Ws=typeof setTimeout=="function"?setTimeout:void 0,ta=typeof clearTimeout=="function"?clearTimeout:void 0,Ja=typeof Promise=="function"?Promise:void 0,kl=typeof queueMicrotask=="function"?queueMicrotask:typeof Ja<"u"?function(c){return Ja.resolve(null).then(c).catch(ou)}:Ws;function ou(c){setTimeout(function(){throw c})}function gs(c,h){var M=h,I=0;do{var Q=M.nextSibling;if(c.removeChild(M),Q&&Q.nodeType===8)if(M=Q.data,M==="/$"){if(I===0){c.removeChild(Q),xn(h);return}I--}else M!=="$"&&M!=="$?"&&M!=="$!"||I++;M=Q}while(M);xn(h)}function Is(c){for(;c!=null;c=c.nextSibling){var h=c.nodeType;if(h===1||h===3)break;if(h===8){if(h=c.data,h==="$"||h==="$!"||h==="$?")break;if(h==="/$")return null}}return c}function cl(c){c=c.previousSibling;for(var h=0;c;){if(c.nodeType===8){var M=c.data;if(M==="$"||M==="$!"||M==="$?"){if(h===0)return c;h--}else M==="/$"&&h++}c=c.previousSibling}return null}var _s=Math.random().toString(36).slice(2),Fa="__reactFiber$"+_s,Ss="__reactProps$"+_s,fl="__reactContainer$"+_s,Gl="__reactEvents$"+_s,Xu="__reactListeners$"+_s,qu="__reactHandles$"+_s;function Xa(c){var h=c[Fa];if(h)return h;for(var M=c.parentNode;M;){if(h=M[fl]||M[Fa]){if(M=h.alternate,h.child!==null||M!==null&&M.child!==null)for(c=cl(c);c!==null;){if(M=c[Fa])return M;c=cl(c)}return h}c=M,M=c.parentNode}return null}function xl(c){return c=c[Fa]||c[fl],!c||c.tag!==5&&c.tag!==6&&c.tag!==13&&c.tag!==3?null:c}function Yl(c){if(c.tag===5||c.tag===6)return c.stateNode;throw Error(d(33))}function Da(c){return c[Ss]||null}var Cl=[],Ls=-1;function Ba(c){return{current:c}}function ds(c){0>Ls||(c.current=Cl[Ls],Cl[Ls]=null,Ls--)}function Bo(c,h){Ls++,Cl[Ls]=c.current,c.current=h}var Wo={},$s=Ba(Wo),da=Ba(!1),Ml=Wo;function qa(c,h){var M=c.type.contextTypes;if(!M)return Wo;var I=c.stateNode;if(I&&I.__reactInternalMemoizedUnmaskedChildContext===h)return I.__reactInternalMemoizedMaskedChildContext;var Q={},se;for(se in M)Q[se]=h[se];return I&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=h,c.__reactInternalMemoizedMaskedChildContext=Q),Q}function na(c){return c=c.childContextTypes,c!=null}function su(){ds(da),ds($s)}function Sl(c,h,M){if($s.current!==Wo)throw Error(d(168));Bo($s,h),Bo(da,M)}function Ps(c,h,M){var I=c.stateNode;if(h=h.childContextTypes,typeof I.getChildContext!="function")return M;I=I.getChildContext();for(var Q in I)if(!(Q in h))throw Error(d(108,Fe(c)||"Unknown",Q));return pe({},M,I)}function au(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||Wo,Ml=$s.current,Bo($s,c),Bo(da,da.current),!0}function ts(c,h,M){var I=c.stateNode;if(!I)throw Error(d(169));M?(c=Ps(c,h,Ml),I.__reactInternalMemoizedMergedChildContext=c,ds(da),ds($s),Bo($s,c)):ds(da),Bo(da,M)}var el=null,Ql=!1,lu=!1;function wc(c){el===null?el=[c]:el.push(c)}function of(c){Ql=!0,wc(c)}function dl(){if(!lu&&el!==null){lu=!0;var c=0,h=Vt;try{var M=el;for(Vt=1;c<M.length;c++){var I=M[c];do I=I(!0);while(I!==null)}el=null,Ql=!1}catch(Q){throw el!==null&&(el=el.slice(c+1)),Jr(tn,dl),Q}finally{Vt=h,lu=!1}}return null}var Os=[],uu=0,ec=null,Ol=0,_o=[],ka=0,Tl=null,tl=1,nl="";function Pa(c,h){Os[uu++]=Ol,Os[uu++]=ec,ec=c,Ol=h}function Dc(c,h,M){_o[ka++]=tl,_o[ka++]=nl,_o[ka++]=Tl,Tl=c;var I=tl;c=nl;var Q=32-Yt(I)-1;I&=~(1<<Q),M+=1;var se=32-Yt(h)+Q;if(30<se){var Ve=Q-Q%5;se=(I&(1<<Ve)-1).toString(32),I>>=Ve,Q-=Ve,tl=1<<32-Yt(h)+Q|M<<Q|I,nl=se+c}else tl=1<<se|M<<Q|I,nl=c}function Tu(c){c.return!==null&&(Pa(c,1),Dc(c,1,0))}function Pc(c){for(;c===ec;)ec=Os[--uu],Os[uu]=null,Ol=Os[--uu],Os[uu]=null;for(;c===Tl;)Tl=_o[--ka],_o[ka]=null,nl=_o[--ka],_o[ka]=null,tl=_o[--ka],_o[ka]=null}var ha=null,xa=null,hs=!1,hl=null;function sf(c,h){var M=Ft(5,null,null,0);M.elementType="DELETED",M.stateNode=h,M.return=c,h=c.deletions,h===null?(c.deletions=[M],c.flags|=16):h.push(M)}function Ac(c,h){switch(c.tag){case 5:var M=c.type;return h=h.nodeType!==1||M.toLowerCase()!==h.nodeName.toLowerCase()?null:h,h!==null?(c.stateNode=h,ha=c,xa=Is(h.firstChild),!0):!1;case 6:return h=c.pendingProps===""||h.nodeType!==3?null:h,h!==null?(c.stateNode=h,ha=c,xa=null,!0):!1;case 13:return h=h.nodeType!==8?null:h,h!==null?(M=Tl!==null?{id:tl,overflow:nl}:null,c.memoizedState={dehydrated:h,treeContext:M,retryLane:1073741824},M=Ft(18,null,null,0),M.stateNode=h,M.return=c,c.child=M,ha=c,xa=null,!0):!1;default:return!1}}function Rc(c){return(c.mode&1)!==0&&(c.flags&128)===0}function wu(c){if(hs){var h=xa;if(h){var M=h;if(!Ac(c,h)){if(Rc(c))throw Error(d(418));h=Is(M.nextSibling);var I=ha;h&&Ac(c,h)?sf(I,M):(c.flags=c.flags&-4097|2,hs=!1,ha=c)}}else{if(Rc(c))throw Error(d(418));c.flags=c.flags&-4097|2,hs=!1,ha=c}}}function Ic(c){for(c=c.return;c!==null&&c.tag!==5&&c.tag!==3&&c.tag!==13;)c=c.return;ha=c}function _c(c){if(c!==ha)return!1;if(!hs)return Ic(c),hs=!0,!1;var h;if((h=c.tag!==3)&&!(h=c.tag!==5)&&(h=c.type,h=h!=="head"&&h!=="body"&&!es(c.type,c.memoizedProps)),h&&(h=xa)){if(Rc(c))throw Qf(),Error(d(418));for(;h;)sf(c,h),h=Is(h.nextSibling)}if(Ic(c),c.tag===13){if(c=c.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(d(317));e:{for(c=c.nextSibling,h=0;c;){if(c.nodeType===8){var M=c.data;if(M==="/$"){if(h===0){xa=Is(c.nextSibling);break e}h--}else M!=="$"&&M!=="$!"&&M!=="$?"||h++}c=c.nextSibling}xa=null}}else xa=ha?Is(c.stateNode.nextSibling):null;return!0}function Qf(){for(var c=xa;c;)c=Is(c.nextSibling)}function cu(){xa=ha=null,hs=!1}function af(c){hl===null?hl=[c]:hl.push(c)}var Jf=j.ReactCurrentBatchConfig;function ja(c,h){if(c&&c.defaultProps){h=pe({},h),c=c.defaultProps;for(var M in c)h[M]===void 0&&(h[M]=c[M]);return h}return h}var Du=Ba(null),Pu=null,jl=null,pa=null;function Au(){pa=jl=Pu=null}function Ru(c){var h=Du.current;ds(Du),c._currentValue=h}function tc(c,h,M){for(;c!==null;){var I=c.alternate;if((c.childLanes&h)!==h?(c.childLanes|=h,I!==null&&(I.childLanes|=h)):I!==null&&(I.childLanes&h)!==h&&(I.childLanes|=h),c===M)break;c=c.return}}function fu(c,h){Pu=c,pa=jl=null,c=c.dependencies,c!==null&&c.firstContext!==null&&(c.lanes&h&&(Js=!0),c.firstContext=null)}function Ua(c){var h=c._currentValue;if(pa!==c)if(c={context:c,memoizedValue:h,next:null},jl===null){if(Pu===null)throw Error(d(308));jl=c,Pu.dependencies={lanes:0,firstContext:c}}else jl=jl.next=c;return h}var Jl=null;function lf(c){Jl===null?Jl=[c]:Jl.push(c)}function Lc(c,h,M,I){var Q=h.interleaved;return Q===null?(M.next=M,lf(h)):(M.next=Q.next,Q.next=M),h.interleaved=M,rl(c,I)}function rl(c,h){c.lanes|=h;var M=c.alternate;for(M!==null&&(M.lanes|=h),M=c,c=c.return;c!==null;)c.childLanes|=h,M=c.alternate,M!==null&&(M.childLanes|=h),M=c,c=c.return;return M.tag===3?M.stateNode:null}var wl=!1;function $c(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Nc(c,h){c=c.updateQueue,h.updateQueue===c&&(h.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,effects:c.effects})}function il(c,h){return{eventTime:c,lane:h,tag:0,payload:null,callback:null,next:null}}function Aa(c,h,M){var I=c.updateQueue;if(I===null)return null;if(I=I.shared,$o&2){var Q=I.pending;return Q===null?h.next=h:(h.next=Q.next,Q.next=h),I.pending=h,rl(c,M)}return Q=I.interleaved,Q===null?(h.next=h,lf(I)):(h.next=Q.next,Q.next=h),I.interleaved=h,rl(c,M)}function Fc(c,h,M){if(h=h.updateQueue,h!==null&&(h=h.shared,(M&4194240)!==0)){var I=h.lanes;I&=c.pendingLanes,M|=I,h.lanes=M,qt(c,M)}}function Xf(c,h){var M=c.updateQueue,I=c.alternate;if(I!==null&&(I=I.updateQueue,M===I)){var Q=null,se=null;if(M=M.firstBaseUpdate,M!==null){do{var Ve={eventTime:M.eventTime,lane:M.lane,tag:M.tag,payload:M.payload,callback:M.callback,next:null};se===null?Q=se=Ve:se=se.next=Ve,M=M.next}while(M!==null);se===null?Q=se=h:se=se.next=h}else Q=se=h;M={baseState:I.baseState,firstBaseUpdate:Q,lastBaseUpdate:se,shared:I.shared,effects:I.effects},c.updateQueue=M;return}c=M.lastBaseUpdate,c===null?M.firstBaseUpdate=h:c.next=h,M.lastBaseUpdate=h}function nc(c,h,M,I){var Q=c.updateQueue;wl=!1;var se=Q.firstBaseUpdate,Ve=Q.lastBaseUpdate,Gt=Q.shared.pending;if(Gt!==null){Q.shared.pending=null;var pn=Gt,ir=pn.next;pn.next=null,Ve===null?se=ir:Ve.next=ir,Ve=pn;var zr=c.alternate;zr!==null&&(zr=zr.updateQueue,Gt=zr.lastBaseUpdate,Gt!==Ve&&(Gt===null?zr.firstBaseUpdate=ir:Gt.next=ir,zr.lastBaseUpdate=pn))}if(se!==null){var kr=Q.baseState;Ve=0,zr=ir=pn=null,Gt=se;do{var Hr=Gt.lane,Ei=Gt.eventTime;if((I&Hr)===Hr){zr!==null&&(zr=zr.next={eventTime:Ei,lane:0,tag:Gt.tag,payload:Gt.payload,callback:Gt.callback,next:null});e:{var Ii=c,Ni=Gt;switch(Hr=h,Ei=M,Ni.tag){case 1:if(Ii=Ni.payload,typeof Ii=="function"){kr=Ii.call(Ei,kr,Hr);break e}kr=Ii;break e;case 3:Ii.flags=Ii.flags&-65537|128;case 0:if(Ii=Ni.payload,Hr=typeof Ii=="function"?Ii.call(Ei,kr,Hr):Ii,Hr==null)break e;kr=pe({},kr,Hr);break e;case 2:wl=!0}}Gt.callback!==null&&Gt.lane!==0&&(c.flags|=64,Hr=Q.effects,Hr===null?Q.effects=[Gt]:Hr.push(Gt))}else Ei={eventTime:Ei,lane:Hr,tag:Gt.tag,payload:Gt.payload,callback:Gt.callback,next:null},zr===null?(ir=zr=Ei,pn=kr):zr=zr.next=Ei,Ve|=Hr;if(Gt=Gt.next,Gt===null){if(Gt=Q.shared.pending,Gt===null)break;Hr=Gt,Gt=Hr.next,Hr.next=null,Q.lastBaseUpdate=Hr,Q.shared.pending=null}}while(1);if(zr===null&&(pn=kr),Q.baseState=pn,Q.firstBaseUpdate=ir,Q.lastBaseUpdate=zr,h=Q.shared.interleaved,h!==null){Q=h;do Ve|=Q.lane,Q=Q.next;while(Q!==h)}else se===null&&(Q.shared.lanes=0);zu|=Ve,c.lanes=Ve,c.memoizedState=kr}}function rc(c,h,M){if(c=h.effects,h.effects=null,c!==null)for(h=0;h<c.length;h++){var I=c[h],Q=I.callback;if(Q!==null){if(I.callback=null,I=M,typeof Q!="function")throw Error(d(191,Q));Q.call(I)}}}var Bc=new l.Component().refs;function As(c,h,M,I){h=c.memoizedState,M=M(I,h),M=M==null?h:pe({},h,M),c.memoizedState=M,c.lanes===0&&(c.updateQueue.baseState=M)}var Iu={isMounted:function(c){return(c=c._reactInternals)?Qe(c)===c:!1},enqueueSetState:function(c,h,M){c=c._reactInternals;var I=va(),Q=Hl(c),se=il(I,Q);se.payload=h,M!=null&&(se.callback=M),h=Aa(c,se,Q),h!==null&&(Zl(h,c,Q,I),Fc(h,c,Q))},enqueueReplaceState:function(c,h,M){c=c._reactInternals;var I=va(),Q=Hl(c),se=il(I,Q);se.tag=1,se.payload=h,M!=null&&(se.callback=M),h=Aa(c,se,Q),h!==null&&(Zl(h,c,Q,I),Fc(h,c,Q))},enqueueForceUpdate:function(c,h){c=c._reactInternals;var M=va(),I=Hl(c),Q=il(M,I);Q.tag=2,h!=null&&(Q.callback=h),h=Aa(c,Q,I),h!==null&&(Zl(h,c,I,M),Fc(h,c,I))}};function uf(c,h,M,I,Q,se,Ve){return c=c.stateNode,typeof c.shouldComponentUpdate=="function"?c.shouldComponentUpdate(I,se,Ve):h.prototype&&h.prototype.isPureReactComponent?!ca(M,I)||!ca(Q,se):!0}function _f(c,h,M){var I=!1,Q=Wo,se=h.contextType;return typeof se=="object"&&se!==null?se=Ua(se):(Q=na(h)?Ml:$s.current,I=h.contextTypes,se=(I=I!=null)?qa(c,Q):Wo),h=new h(M,se),c.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Iu,c.stateNode=h,h._reactInternals=c,I&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=Q,c.__reactInternalMemoizedMaskedChildContext=se),h}function cf(c,h,M,I){c=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(M,I),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(M,I),h.state!==c&&Iu.enqueueReplaceState(h,h.state,null)}function ff(c,h,M,I){var Q=c.stateNode;Q.props=M,Q.state=c.memoizedState,Q.refs=Bc,$c(c);var se=h.contextType;typeof se=="object"&&se!==null?Q.context=Ua(se):(se=na(h)?Ml:$s.current,Q.context=qa(c,se)),Q.state=c.memoizedState,se=h.getDerivedStateFromProps,typeof se=="function"&&(As(c,h,se,M),Q.state=c.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof Q.getSnapshotBeforeUpdate=="function"||typeof Q.UNSAFE_componentWillMount!="function"&&typeof Q.componentWillMount!="function"||(h=Q.state,typeof Q.componentWillMount=="function"&&Q.componentWillMount(),typeof Q.UNSAFE_componentWillMount=="function"&&Q.UNSAFE_componentWillMount(),h!==Q.state&&Iu.enqueueReplaceState(Q,Q.state,null),nc(c,M,Q,I),Q.state=c.memoizedState),typeof Q.componentDidMount=="function"&&(c.flags|=4194308)}function du(c,h,M){if(c=M.ref,c!==null&&typeof c!="function"&&typeof c!="object"){if(M._owner){if(M=M._owner,M){if(M.tag!==1)throw Error(d(309));var I=M.stateNode}if(!I)throw Error(d(147,c));var Q=I,se=""+c;return h!==null&&h.ref!==null&&typeof h.ref=="function"&&h.ref._stringRef===se?h.ref:(h=function(Ve){var Gt=Q.refs;Gt===Bc&&(Gt=Q.refs={}),Ve===null?delete Gt[se]:Gt[se]=Ve},h._stringRef=se,h)}if(typeof c!="string")throw Error(d(284));if(!M._owner)throw Error(d(290,c))}return c}function hu(c,h){throw c=Object.prototype.toString.call(h),Error(d(31,c==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":c))}function kc(c){var h=c._init;return h(c._payload)}function df(c){function h(Zn,wn){if(c){var er=Zn.deletions;er===null?(Zn.deletions=[wn],Zn.flags|=16):er.push(wn)}}function M(Zn,wn){if(!c)return null;for(;wn!==null;)h(Zn,wn),wn=wn.sibling;return null}function I(Zn,wn){for(Zn=new Map;wn!==null;)wn.key!==null?Zn.set(wn.key,wn):Zn.set(wn.index,wn),wn=wn.sibling;return Zn}function Q(Zn,wn){return Zn=sn(Zn,wn),Zn.index=0,Zn.sibling=null,Zn}function se(Zn,wn,er){return Zn.index=er,c?(er=Zn.alternate,er!==null?(er=er.index,er<wn?(Zn.flags|=2,wn):er):(Zn.flags|=2,wn)):(Zn.flags|=1048576,wn)}function Ve(Zn){return c&&Zn.alternate===null&&(Zn.flags|=2),Zn}function Gt(Zn,wn,er,si){return wn===null||wn.tag!==6?(wn=mr(er,Zn.mode,si),wn.return=Zn,wn):(wn=Q(wn,er),wn.return=Zn,wn)}function pn(Zn,wn,er,si){var Ui=er.type;return Ui===G?zr(Zn,wn,er.props.children,si,er.key):wn!==null&&(wn.elementType===Ui||typeof Ui=="object"&&Ui!==null&&Ui.$$typeof===ee&&kc(Ui)===wn.type)?(si=Q(wn,er.props),si.ref=du(Zn,wn,er),si.return=Zn,si):(si=Dn(er.type,er.key,er.props,null,Zn.mode,si),si.ref=du(Zn,wn,er),si.return=Zn,si)}function ir(Zn,wn,er,si){return wn===null||wn.tag!==4||wn.stateNode.containerInfo!==er.containerInfo||wn.stateNode.implementation!==er.implementation?(wn=Nr(er,Zn.mode,si),wn.return=Zn,wn):(wn=Q(wn,er.children||[]),wn.return=Zn,wn)}function zr(Zn,wn,er,si,Ui){return wn===null||wn.tag!==7?(wn=Kn(er,Zn.mode,si,Ui),wn.return=Zn,wn):(wn=Q(wn,er),wn.return=Zn,wn)}function kr(Zn,wn,er){if(typeof wn=="string"&&wn!==""||typeof wn=="number")return wn=mr(""+wn,Zn.mode,er),wn.return=Zn,wn;if(typeof wn=="object"&&wn!==null){switch(wn.$$typeof){case z:return er=Dn(wn.type,wn.key,wn.props,null,Zn.mode,er),er.ref=du(Zn,null,wn),er.return=Zn,er;case K:return wn=Nr(wn,Zn.mode,er),wn.return=Zn,wn;case ee:var si=wn._init;return kr(Zn,si(wn._payload),er)}if($t(wn)||Ae(wn))return wn=Kn(wn,Zn.mode,er,null),wn.return=Zn,wn;hu(Zn,wn)}return null}function Hr(Zn,wn,er,si){var Ui=wn!==null?wn.key:null;if(typeof er=="string"&&er!==""||typeof er=="number")return Ui!==null?null:Gt(Zn,wn,""+er,si);if(typeof er=="object"&&er!==null){switch(er.$$typeof){case z:return er.key===Ui?pn(Zn,wn,er,si):null;case K:return er.key===Ui?ir(Zn,wn,er,si):null;case ee:return Ui=er._init,Hr(Zn,wn,Ui(er._payload),si)}if($t(er)||Ae(er))return Ui!==null?null:zr(Zn,wn,er,si,null);hu(Zn,er)}return null}function Ei(Zn,wn,er,si,Ui){if(typeof si=="string"&&si!==""||typeof si=="number")return Zn=Zn.get(er)||null,Gt(wn,Zn,""+si,Ui);if(typeof si=="object"&&si!==null){switch(si.$$typeof){case z:return Zn=Zn.get(si.key===null?er:si.key)||null,pn(wn,Zn,si,Ui);case K:return Zn=Zn.get(si.key===null?er:si.key)||null,ir(wn,Zn,si,Ui);case ee:var io=si._init;return Ei(Zn,wn,er,io(si._payload),Ui)}if($t(si)||Ae(si))return Zn=Zn.get(er)||null,zr(wn,Zn,si,Ui,null);hu(wn,si)}return null}function Ii(Zn,wn,er,si){for(var Ui=null,io=null,ro=wn,fo=wn=0,Sa=null;ro!==null&&fo<er.length;fo++){ro.index>fo?(Sa=ro,ro=null):Sa=ro.sibling;var ss=Hr(Zn,ro,er[fo],si);if(ss===null){ro===null&&(ro=Sa);break}c&&ro&&ss.alternate===null&&h(Zn,ro),wn=se(ss,wn,fo),io===null?Ui=ss:io.sibling=ss,io=ss,ro=Sa}if(fo===er.length)return M(Zn,ro),hs&&Pa(Zn,fo),Ui;if(ro===null){for(;fo<er.length;fo++)ro=kr(Zn,er[fo],si),ro!==null&&(wn=se(ro,wn,fo),io===null?Ui=ro:io.sibling=ro,io=ro);return hs&&Pa(Zn,fo),Ui}for(ro=I(Zn,ro);fo<er.length;fo++)Sa=Ei(ro,Zn,fo,er[fo],si),Sa!==null&&(c&&Sa.alternate!==null&&ro.delete(Sa.key===null?fo:Sa.key),wn=se(Sa,wn,fo),io===null?Ui=Sa:io.sibling=Sa,io=Sa);return c&&ro.forEach(function(Gu){return h(Zn,Gu)}),hs&&Pa(Zn,fo),Ui}function Ni(Zn,wn,er,si){var Ui=Ae(er);if(typeof Ui!="function")throw Error(d(150));if(er=Ui.call(er),er==null)throw Error(d(151));for(var io=Ui=null,ro=wn,fo=wn=0,Sa=null,ss=er.next();ro!==null&&!ss.done;fo++,ss=er.next()){ro.index>fo?(Sa=ro,ro=null):Sa=ro.sibling;var Gu=Hr(Zn,ro,ss.value,si);if(Gu===null){ro===null&&(ro=Sa);break}c&&ro&&Gu.alternate===null&&h(Zn,ro),wn=se(Gu,wn,fo),io===null?Ui=Gu:io.sibling=Gu,io=Gu,ro=Sa}if(ss.done)return M(Zn,ro),hs&&Pa(Zn,fo),Ui;if(ro===null){for(;!ss.done;fo++,ss=er.next())ss=kr(Zn,ss.value,si),ss!==null&&(wn=se(ss,wn,fo),io===null?Ui=ss:io.sibling=ss,io=ss);return hs&&Pa(Zn,fo),Ui}for(ro=I(Zn,ro);!ss.done;fo++,ss=er.next())ss=Ei(ro,Zn,fo,ss.value,si),ss!==null&&(c&&ss.alternate!==null&&ro.delete(ss.key===null?fo:ss.key),wn=se(ss,wn,fo),io===null?Ui=ss:io.sibling=ss,io=ss);return c&&ro.forEach(function(yh){return h(Zn,yh)}),hs&&Pa(Zn,fo),Ui}function ia(Zn,wn,er,si){if(typeof er=="object"&&er!==null&&er.type===G&&er.key===null&&(er=er.props.children),typeof er=="object"&&er!==null){switch(er.$$typeof){case z:e:{for(var Ui=er.key,io=wn;io!==null;){if(io.key===Ui){if(Ui=er.type,Ui===G){if(io.tag===7){M(Zn,io.sibling),wn=Q(io,er.props.children),wn.return=Zn,Zn=wn;break e}}else if(io.elementType===Ui||typeof Ui=="object"&&Ui!==null&&Ui.$$typeof===ee&&kc(Ui)===io.type){M(Zn,io.sibling),wn=Q(io,er.props),wn.ref=du(Zn,io,er),wn.return=Zn,Zn=wn;break e}M(Zn,io);break}else h(Zn,io);io=io.sibling}er.type===G?(wn=Kn(er.props.children,Zn.mode,si,er.key),wn.return=Zn,Zn=wn):(si=Dn(er.type,er.key,er.props,null,Zn.mode,si),si.ref=du(Zn,wn,er),si.return=Zn,Zn=si)}return Ve(Zn);case K:e:{for(io=er.key;wn!==null;){if(wn.key===io)if(wn.tag===4&&wn.stateNode.containerInfo===er.containerInfo&&wn.stateNode.implementation===er.implementation){M(Zn,wn.sibling),wn=Q(wn,er.children||[]),wn.return=Zn,Zn=wn;break e}else{M(Zn,wn);break}else h(Zn,wn);wn=wn.sibling}wn=Nr(er,Zn.mode,si),wn.return=Zn,Zn=wn}return Ve(Zn);case ee:return io=er._init,ia(Zn,wn,io(er._payload),si)}if($t(er))return Ii(Zn,wn,er,si);if(Ae(er))return Ni(Zn,wn,er,si);hu(Zn,er)}return typeof er=="string"&&er!==""||typeof er=="number"?(er=""+er,wn!==null&&wn.tag===6?(M(Zn,wn.sibling),wn=Q(wn,er),wn.return=Zn,Zn=wn):(M(Zn,wn),wn=mr(er,Zn.mode,si),wn.return=Zn,Zn=wn),Ve(Zn)):M(Zn,wn)}return ia}var ic=df(!0),hf=df(!1),pu={},pl=Ba(pu),Xl=Ba(pu),Vo=Ba(pu);function Dl(c){if(c===pu)throw Error(d(174));return c}function oc(c,h){switch(Bo(Vo,h),Bo(Xl,c),Bo(pl,pu),c=h.nodeType,c){case 9:case 11:h=(h=h.documentElement)?h.namespaceURI:Dt(null,"");break;default:c=c===8?h.parentNode:h,h=c.namespaceURI||null,c=c.tagName,h=Dt(h,c)}ds(pl),Bo(pl,h)}function sc(){ds(pl),ds(Xl),ds(Vo)}function pf(c){Dl(Vo.current);var h=Dl(pl.current),M=Dt(h,c.type);h!==M&&(Bo(Xl,c),Bo(pl,M))}function ql(c){Xl.current===c&&(ds(pl),ds(Xl))}var vs=Ba(0);function mu(c){for(var h=c;h!==null;){if(h.tag===13){var M=h.memoizedState;if(M!==null&&(M=M.dehydrated,M===null||M.data==="$?"||M.data==="$!"))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if(h.flags&128)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===c)break;for(;h.sibling===null;){if(h.return===null||h.return===c)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var ac=[];function jc(){for(var c=0;c<ac.length;c++)ac[c]._workInProgressVersionPrimary=null;ac.length=0}var Wa=j.ReactCurrentDispatcher,rs=j.ReactCurrentBatchConfig,za=0,Oo=null,Ts=null,Ho=null,Ns=!1,gu=!1,eu=0,qf=0;function Fs(){throw Error(d(321))}function Uc(c,h){if(h===null)return!1;for(var M=0;M<h.length&&M<c.length;M++)if(!bs(c[M],h[M]))return!1;return!0}function mf(c,h,M,I,Q,se){if(za=se,Oo=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,Wa.current=c===null||c.memoizedState===null?pc:Ff,c=M(I,Q),gu){se=0;do{if(gu=!1,eu=0,25<=se)throw Error(d(301));se+=1,Ho=Ts=null,h.updateQueue=null,Wa.current=Hc,c=M(I,Q)}while(gu)}if(Wa.current=hc,h=Ts!==null&&Ts.next!==null,za=0,Ho=Ts=Oo=null,Ns=!1,h)throw Error(d(300));return c}function lc(){var c=eu!==0;return eu=0,c}function ml(){var c={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ho===null?Oo.memoizedState=Ho=c:Ho=Ho.next=c,Ho}function Ca(){if(Ts===null){var c=Oo.alternate;c=c!==null?c.memoizedState:null}else c=Ts.next;var h=Ho===null?Oo.memoizedState:Ho.next;if(h!==null)Ho=h,Ts=c;else{if(c===null)throw Error(d(310));Ts=c,c={memoizedState:Ts.memoizedState,baseState:Ts.baseState,baseQueue:Ts.baseQueue,queue:Ts.queue,next:null},Ho===null?Oo.memoizedState=Ho=c:Ho=Ho.next=c}return Ho}function _u(c,h){return typeof h=="function"?h(c):h}function uc(c){var h=Ca(),M=h.queue;if(M===null)throw Error(d(311));M.lastRenderedReducer=c;var I=Ts,Q=I.baseQueue,se=M.pending;if(se!==null){if(Q!==null){var Ve=Q.next;Q.next=se.next,se.next=Ve}I.baseQueue=Q=se,M.pending=null}if(Q!==null){se=Q.next,I=I.baseState;var Gt=Ve=null,pn=null,ir=se;do{var zr=ir.lane;if((za&zr)===zr)pn!==null&&(pn=pn.next={lane:0,action:ir.action,hasEagerState:ir.hasEagerState,eagerState:ir.eagerState,next:null}),I=ir.hasEagerState?ir.eagerState:c(I,ir.action);else{var kr={lane:zr,action:ir.action,hasEagerState:ir.hasEagerState,eagerState:ir.eagerState,next:null};pn===null?(Gt=pn=kr,Ve=I):pn=pn.next=kr,Oo.lanes|=zr,zu|=zr}ir=ir.next}while(ir!==null&&ir!==se);pn===null?Ve=I:pn.next=Gt,bs(I,h.memoizedState)||(Js=!0),h.memoizedState=I,h.baseState=Ve,h.baseQueue=pn,M.lastRenderedState=I}if(c=M.interleaved,c!==null){Q=c;do se=Q.lane,Oo.lanes|=se,zu|=se,Q=Q.next;while(Q!==c)}else Q===null&&(M.lanes=0);return[h.memoizedState,M.dispatch]}function vu(c){var h=Ca(),M=h.queue;if(M===null)throw Error(d(311));M.lastRenderedReducer=c;var I=M.dispatch,Q=M.pending,se=h.memoizedState;if(Q!==null){M.pending=null;var Ve=Q=Q.next;do se=c(se,Ve.action),Ve=Ve.next;while(Ve!==Q);bs(se,h.memoizedState)||(Js=!0),h.memoizedState=se,h.baseQueue===null&&(h.baseState=se),M.lastRenderedState=se}return[se,I]}function gf(){}function yu(c,h){var M=Oo,I=Ca(),Q=h(),se=!bs(I.memoizedState,Q);if(se&&(I.memoizedState=Q,Js=!0),I=I.queue,zo(yf.bind(null,M,I,c),[c]),I.getSnapshot!==h||se||Ho!==null&&Ho.memoizedState.tag&1){if(M.flags|=2048,tu(9,vf.bind(null,M,I,Q,h),void 0,null),Bs===null)throw Error(d(349));za&30||cc(M,h,Q)}return Q}function cc(c,h,M){c.flags|=16384,c={getSnapshot:h,value:M},h=Oo.updateQueue,h===null?(h={lastEffect:null,stores:null},Oo.updateQueue=h,h.stores=[c]):(M=h.stores,M===null?h.stores=[c]:M.push(c))}function vf(c,h,M,I){h.value=M,h.getSnapshot=I,Lf(h)&&Pl(c)}function yf(c,h,M){return M(function(){Lf(h)&&Pl(c)})}function Lf(c){var h=c.getSnapshot;c=c.value;try{var M=h();return!bs(c,M)}catch{return!0}}function Pl(c){var h=rl(c,1);h!==null&&Zl(h,c,1,-1)}function Lu(c){var h=ml();return typeof c=="function"&&(c=c()),h.memoizedState=h.baseState=c,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_u,lastRenderedState:c},h.queue=c,c=c.dispatch=Di.bind(null,Oo,c),[h.memoizedState,c]}function tu(c,h,M,I){return c={tag:c,create:h,destroy:M,deps:I,next:null},h=Oo.updateQueue,h===null?(h={lastEffect:null,stores:null},Oo.updateQueue=h,h.lastEffect=c.next=c):(M=h.lastEffect,M===null?h.lastEffect=c.next=c:(I=M.next,M.next=c,c.next=I,h.lastEffect=c)),c}function Wc(){return Ca().memoizedState}function fc(c,h,M,I){var Q=ml();Oo.flags|=c,Q.memoizedState=tu(1|h,M,void 0,I===void 0?null:I)}function dc(c,h,M,I){var Q=Ca();I=I===void 0?null:I;var se=void 0;if(Ts!==null){var Ve=Ts.memoizedState;if(se=Ve.destroy,I!==null&&Uc(I,Ve.deps)){Q.memoizedState=tu(h,M,se,I);return}}Oo.flags|=c,Q.memoizedState=tu(1|h,M,se,I)}function Ef(c,h){return fc(8390656,8,c,h)}function zo(c,h){return dc(2048,8,c,h)}function $f(c,h){return dc(4,2,c,h)}function Al(c,h){return dc(4,4,c,h)}function zc(c,h){if(typeof h=="function")return c=c(),h(c),function(){h(null)};if(h!=null)return c=c(),h.current=c,function(){h.current=null}}function bf(c,h,M){return M=M!=null?M.concat([c]):null,dc(4,4,zc.bind(null,h,c),M)}function Qs(){}function Ul(c,h){var M=Ca();h=h===void 0?null:h;var I=M.memoizedState;return I!==null&&h!==null&&Uc(h,I[1])?I[0]:(M.memoizedState=[c,h],c)}function Nf(c,h){var M=Ca();h=h===void 0?null:h;var I=M.memoizedState;return I!==null&&h!==null&&Uc(h,I[1])?I[0]:(c=c(),M.memoizedState=[c,h],c)}function $u(c,h,M){return za&21?(bs(M,h)||(M=He(),Oo.lanes|=M,zu|=M,c.baseState=!0),h):(c.baseState&&(c.baseState=!1,Js=!0),c.memoizedState=M)}function fd(c,h){var M=Vt;Vt=M!==0&&4>M?M:4,c(!0);var I=rs.transition;rs.transition={};try{c(!1),h()}finally{Vt=M,rs.transition=I}}function Vc(){return Ca().memoizedState}function xf(c,h,M){var I=Hl(c);if(M={lane:I,action:M,hasEagerState:!1,eagerState:null,next:null},dd(c))cs(h,M);else if(M=Lc(c,h,M,I),M!==null){var Q=va();Zl(M,c,I,Q),Ra(M,h,I)}}function Di(c,h,M){var I=Hl(c),Q={lane:I,action:M,hasEagerState:!1,eagerState:null,next:null};if(dd(c))cs(h,Q);else{var se=c.alternate;if(c.lanes===0&&(se===null||se.lanes===0)&&(se=h.lastRenderedReducer,se!==null))try{var Ve=h.lastRenderedState,Gt=se(Ve,M);if(Q.hasEagerState=!0,Q.eagerState=Gt,bs(Gt,Ve)){var pn=h.interleaved;pn===null?(Q.next=Q,lf(h)):(Q.next=pn.next,pn.next=Q),h.interleaved=Q;return}}catch{}finally{}M=Lc(c,h,Q,I),M!==null&&(Q=va(),Zl(M,c,I,Q),Ra(M,h,I))}}function dd(c){var h=c.alternate;return c===Oo||h!==null&&h===Oo}function cs(c,h){gu=Ns=!0;var M=c.pending;M===null?h.next=h:(h.next=M.next,M.next=h),c.pending=h}function Ra(c,h,M){if(M&4194240){var I=h.lanes;I&=c.pendingLanes,M|=I,h.lanes=M,qt(c,M)}}var hc={readContext:Ua,useCallback:Fs,useContext:Fs,useEffect:Fs,useImperativeHandle:Fs,useInsertionEffect:Fs,useLayoutEffect:Fs,useMemo:Fs,useReducer:Fs,useRef:Fs,useState:Fs,useDebugValue:Fs,useDeferredValue:Fs,useTransition:Fs,useMutableSource:Fs,useSyncExternalStore:Fs,useId:Fs,unstable_isNewReconciler:!1},pc={readContext:Ua,useCallback:function(c,h){return ml().memoizedState=[c,h===void 0?null:h],c},useContext:Ua,useEffect:Ef,useImperativeHandle:function(c,h,M){return M=M!=null?M.concat([c]):null,fc(4194308,4,zc.bind(null,h,c),M)},useLayoutEffect:function(c,h){return fc(4194308,4,c,h)},useInsertionEffect:function(c,h){return fc(4,2,c,h)},useMemo:function(c,h){var M=ml();return h=h===void 0?null:h,c=c(),M.memoizedState=[c,h],c},useReducer:function(c,h,M){var I=ml();return h=M!==void 0?M(h):h,I.memoizedState=I.baseState=h,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:h},I.queue=c,c=c.dispatch=xf.bind(null,Oo,c),[I.memoizedState,c]},useRef:function(c){var h=ml();return c={current:c},h.memoizedState=c},useState:Lu,useDebugValue:Qs,useDeferredValue:function(c){return ml().memoizedState=c},useTransition:function(){var c=Lu(!1),h=c[0];return c=fd.bind(null,c[1]),ml().memoizedState=c,[h,c]},useMutableSource:function(){},useSyncExternalStore:function(c,h,M){var I=Oo,Q=ml();if(hs){if(M===void 0)throw Error(d(407));M=M()}else{if(M=h(),Bs===null)throw Error(d(349));za&30||cc(I,h,M)}Q.memoizedState=M;var se={value:M,getSnapshot:h};return Q.queue=se,Ef(yf.bind(null,I,se,c),[c]),I.flags|=2048,tu(9,vf.bind(null,I,se,M,h),void 0,null),M},useId:function(){var c=ml(),h=Bs.identifierPrefix;if(hs){var M=nl,I=tl;M=(I&~(1<<32-Yt(I)-1)).toString(32)+M,h=":"+h+"R"+M,M=eu++,0<M&&(h+="H"+M.toString(32)),h+=":"}else M=qf++,h=":"+h+"r"+M.toString(32)+":";return c.memoizedState=h},unstable_isNewReconciler:!1},Ff={readContext:Ua,useCallback:Ul,useContext:Ua,useEffect:zo,useImperativeHandle:bf,useInsertionEffect:$f,useLayoutEffect:Al,useMemo:Nf,useReducer:uc,useRef:Wc,useState:function(){return uc(_u)},useDebugValue:Qs,useDeferredValue:function(c){var h=Ca();return $u(h,Ts.memoizedState,c)},useTransition:function(){var c=uc(_u)[0],h=Ca().memoizedState;return[c,h]},useMutableSource:gf,useSyncExternalStore:yu,useId:Vc,unstable_isNewReconciler:!1},Hc={readContext:Ua,useCallback:Ul,useContext:Ua,useEffect:zo,useImperativeHandle:bf,useInsertionEffect:$f,useLayoutEffect:Al,useMemo:Nf,useReducer:vu,useRef:Wc,useState:function(){return vu(_u)},useDebugValue:Qs,useDeferredValue:function(c){var h=Ca();return Ts===null?h.memoizedState=c:$u(h,Ts.memoizedState,c)},useTransition:function(){var c=vu(_u)[0],h=Ca().memoizedState;return[c,h]},useMutableSource:gf,useSyncExternalStore:yu,useId:Vc,unstable_isNewReconciler:!1};function Wl(c,h){try{var M="",I=h;do M+=We(I),I=I.return;while(I);var Q=M}catch(se){Q=`
1153
+ `+Q[Ve].replace(" at new "," at ");return c.displayName&&pn.includes("<anonymous>")&&(pn=pn.replace("<anonymous>",c.displayName)),pn}while(1<=Ve&&0<=Gt);break}}}finally{Ee=!1,Error.prepareStackTrace=M}return(c=c?c.displayName||c.name:"")?ye(c):""}function We(c){switch(c.tag){case 5:return ye(c.type);case 16:return ye("Lazy");case 13:return ye("Suspense");case 19:return ye("SuspenseList");case 0:case 2:case 15:return c=_e(c.type,!1),c;case 11:return c=_e(c.type.render,!1),c;case 1:return c=_e(c.type,!0),c;default:return""}}function Ie(c){if(c==null)return null;if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case G:return"Fragment";case K:return"Portal";case ae:return"Profiler";case Y:return"StrictMode";case be:return"Suspense";case te:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case J:return(c.displayName||"Context")+".Consumer";case Ce:return(c._context.displayName||"Context")+".Provider";case le:var h=c.render;return c=c.displayName,c||(c=h.displayName||h.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case q:return h=c.displayName||null,h!==null?h:Ie(c.type)||"Memo";case ee:h=c._payload,c=c._init;try{return Ie(c(h))}catch{}}return null}function Fe(c){var h=c.type;switch(c.tag){case 24:return"Cache";case 9:return(h.displayName||"Context")+".Consumer";case 10:return(h._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return c=h.render,c=c.displayName||c.name||"",h.displayName||(c!==""?"ForwardRef("+c+")":"ForwardRef");case 7:return"Fragment";case 5:return h;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ie(h);case 8:return h===Y?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h}return null}function ut(c){switch(typeof c){case"boolean":case"number":case"string":case"undefined":return c;case"object":return c;default:return""}}function ht(c){var h=c.type;return(c=c.nodeName)&&c.toLowerCase()==="input"&&(h==="checkbox"||h==="radio")}function Ot(c){var h=ht(c)?"checked":"value",M=Object.getOwnPropertyDescriptor(c.constructor.prototype,h),I=""+c[h];if(!c.hasOwnProperty(h)&&typeof M<"u"&&typeof M.get=="function"&&typeof M.set=="function"){var Q=M.get,se=M.set;return Object.defineProperty(c,h,{configurable:!0,get:function(){return Q.call(this)},set:function(Ve){I=""+Ve,se.call(this,Ve)}}),Object.defineProperty(c,h,{enumerable:M.enumerable}),{getValue:function(){return I},setValue:function(Ve){I=""+Ve},stopTracking:function(){c._valueTracker=null,delete c[h]}}}}function Ue(c){c._valueTracker||(c._valueTracker=Ot(c))}function at(c){if(!c)return!1;var h=c._valueTracker;if(!h)return!0;var M=h.getValue(),I="";return c&&(I=ht(c)?c.checked?"true":"false":c.value),c=I,c!==M?(h.setValue(c),!0):!1}function Pt(c){if(c=c||(typeof document<"u"?document:void 0),typeof c>"u")return null;try{return c.activeElement||c.body}catch{return c.body}}function lt(c,h){var M=h.checked;return pe({},h,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:M??c._wrapperState.initialChecked})}function kt(c,h){var M=h.defaultValue==null?"":h.defaultValue,I=h.checked!=null?h.checked:h.defaultChecked;M=ut(h.value!=null?h.value:M),c._wrapperState={initialChecked:I,initialValue:M,controlled:h.type==="checkbox"||h.type==="radio"?h.checked!=null:h.value!=null}}function nn(c,h){h=h.checked,h!=null&&k(c,"checked",h,!1)}function hn(c,h){nn(c,h);var M=ut(h.value),I=h.type;if(M!=null)I==="number"?(M===0&&c.value===""||c.value!=M)&&(c.value=""+M):c.value!==""+M&&(c.value=""+M);else if(I==="submit"||I==="reset"){c.removeAttribute("value");return}h.hasOwnProperty("value")?kn(c,h.type,M):h.hasOwnProperty("defaultValue")&&kn(c,h.type,ut(h.defaultValue)),h.checked==null&&h.defaultChecked!=null&&(c.defaultChecked=!!h.defaultChecked)}function Rn(c,h,M){if(h.hasOwnProperty("value")||h.hasOwnProperty("defaultValue")){var I=h.type;if(!(I!=="submit"&&I!=="reset"||h.value!==void 0&&h.value!==null))return;h=""+c._wrapperState.initialValue,M||h===c.value||(c.value=h),c.defaultValue=h}M=c.name,M!==""&&(c.name=""),c.defaultChecked=!!c._wrapperState.initialChecked,M!==""&&(c.name=M)}function kn(c,h,M){(h!=="number"||Pt(c.ownerDocument)!==c)&&(M==null?c.defaultValue=""+c._wrapperState.initialValue:c.defaultValue!==""+M&&(c.defaultValue=""+M))}var $t=Array.isArray;function yn(c,h,M,I){if(c=c.options,h){h={};for(var Q=0;Q<M.length;Q++)h["$"+M[Q]]=!0;for(M=0;M<c.length;M++)Q=h.hasOwnProperty("$"+c[M].value),c[M].selected!==Q&&(c[M].selected=Q),Q&&I&&(c[M].defaultSelected=!0)}else{for(M=""+ut(M),h=null,Q=0;Q<c.length;Q++){if(c[Q].value===M){c[Q].selected=!0,I&&(c[Q].defaultSelected=!0);return}h!==null||c[Q].disabled||(h=c[Q])}h!==null&&(h.selected=!0)}}function Yn(c,h){if(h.dangerouslySetInnerHTML!=null)throw Error(d(91));return pe({},h,{value:void 0,defaultValue:void 0,children:""+c._wrapperState.initialValue})}function cn(c,h){var M=h.value;if(M==null){if(M=h.children,h=h.defaultValue,M!=null){if(h!=null)throw Error(d(92));if($t(M)){if(1<M.length)throw Error(d(93));M=M[0]}h=M}h==null&&(h=""),M=h}c._wrapperState={initialValue:ut(M)}}function st(c,h){var M=ut(h.value),I=ut(h.defaultValue);M!=null&&(M=""+M,M!==c.value&&(c.value=M),h.defaultValue==null&&c.defaultValue!==M&&(c.defaultValue=M)),I!=null&&(c.defaultValue=""+I)}function on(c){var h=c.textContent;h===c._wrapperState.initialValue&&h!==""&&h!==null&&(c.value=h)}function dt(c){switch(c){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Dt(c,h){return c==null||c==="http://www.w3.org/1999/xhtml"?dt(h):c==="http://www.w3.org/2000/svg"&&h==="foreignObject"?"http://www.w3.org/1999/xhtml":c}var Ht,rn=function(c){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(h,M,I,Q){MSApp.execUnsafeLocalFunction(function(){return c(h,M,I,Q)})}:c}(function(c,h){if(c.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in c)c.innerHTML=h;else{for(Ht=Ht||document.createElement("div"),Ht.innerHTML="<svg>"+h.valueOf().toString()+"</svg>",h=Ht.firstChild;c.firstChild;)c.removeChild(c.firstChild);for(;h.firstChild;)c.appendChild(h.firstChild)}});function ke(c,h){if(h){var M=c.firstChild;if(M&&M===c.lastChild&&M.nodeType===3){M.nodeValue=h;return}}c.textContent=h}var ct={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},D=["Webkit","ms","Moz","O"];Object.keys(ct).forEach(function(c){D.forEach(function(h){h=h+c.charAt(0).toUpperCase()+c.substring(1),ct[h]=ct[c]})});function W(c,h,M){return h==null||typeof h=="boolean"||h===""?"":M||typeof h!="number"||h===0||ct.hasOwnProperty(c)&&ct[c]?(""+h).trim():h+"px"}function re(c,h){c=c.style;for(var M in h)if(h.hasOwnProperty(M)){var I=M.indexOf("--")===0,Q=W(M,h[M],I);M==="float"&&(M="cssFloat"),I?c.setProperty(M,Q):c[M]=Q}}var Oe=pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ze(c,h){if(h){if(Oe[c]&&(h.children!=null||h.dangerouslySetInnerHTML!=null))throw Error(d(137,c));if(h.dangerouslySetInnerHTML!=null){if(h.children!=null)throw Error(d(60));if(typeof h.dangerouslySetInnerHTML!="object"||!("__html"in h.dangerouslySetInnerHTML))throw Error(d(61))}if(h.style!=null&&typeof h.style!="object")throw Error(d(62))}}function pt(c,h){if(c.indexOf("-")===-1)return typeof h.is=="string";switch(c){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $e=null;function Re(c){return c=c.target||c.srcElement||window,c.correspondingUseElement&&(c=c.correspondingUseElement),c.nodeType===3?c.parentNode:c}var Be=null,Ne=null,bt=null;function Kt(c){if(c=xl(c)){if(typeof Be!="function")throw Error(d(280));var h=c.stateNode;h&&(h=Da(h),Be(c.stateNode,c.type,h))}}function an(c){Ne?bt?bt.push(c):bt=[c]:Ne=c}function In(){if(Ne){var c=Ne,h=bt;if(bt=Ne=null,Kt(c),h)for(c=0;c<h.length;c++)Kt(h[c])}}function rr(c,h){return c(h)}function Wn(){}var gr=!1;function fr(c,h,M){if(gr)return c(h,M);gr=!0;try{return rr(c,h,M)}finally{gr=!1,(Ne!==null||bt!==null)&&(Wn(),In())}}function Rr(c,h){var M=c.stateNode;if(M===null)return null;var I=Da(M);if(I===null)return null;M=I[h];e:switch(h){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(I=!I.disabled)||(c=c.type,I=!(c==="button"||c==="input"||c==="select"||c==="textarea")),c=!I;break e;default:c=!1}if(c)return null;if(M&&typeof M!="function")throw Error(d(231,h,typeof M));return M}var Vr=!1;if(x)try{var ei={};Object.defineProperty(ei,"passive",{get:function(){Vr=!0}}),window.addEventListener("test",ei,ei),window.removeEventListener("test",ei,ei)}catch{Vr=!1}function Ct(c,h,M,I,Q,se,Ve,Gt,pn){var ir=Array.prototype.slice.call(arguments,3);try{h.apply(M,ir)}catch(zr){this.onError(zr)}}var St=!1,Pn=null,Qt=!1,qn=null,Tt={onError:function(c){St=!0,Pn=c}};function fe(c,h,M,I,Q,se,Ve,Gt,pn){St=!1,Pn=null,Ct.apply(Tt,arguments)}function ve(c,h,M,I,Q,se,Ve,Gt,pn){if(fe.apply(this,arguments),St){if(St){var ir=Pn;St=!1,Pn=null}else throw Error(d(198));Qt||(Qt=!0,qn=ir)}}function Qe(c){var h=c,M=c;if(c.alternate)for(;h.return;)h=h.return;else{c=h;do h=c,h.flags&4098&&(M=h.return),c=h.return;while(c)}return h.tag===3?M:null}function jt(c){if(c.tag===13){var h=c.memoizedState;if(h===null&&(c=c.alternate,c!==null&&(h=c.memoizedState)),h!==null)return h.dehydrated}return null}function bn(c){if(Qe(c)!==c)throw Error(d(188))}function zn(c){var h=c.alternate;if(!h){if(h=Qe(c),h===null)throw Error(d(188));return h!==c?null:c}for(var M=c,I=h;;){var Q=M.return;if(Q===null)break;var se=Q.alternate;if(se===null){if(I=Q.return,I!==null){M=I;continue}break}if(Q.child===se.child){for(se=Q.child;se;){if(se===M)return bn(Q),c;if(se===I)return bn(Q),h;se=se.sibling}throw Error(d(188))}if(M.return!==I.return)M=Q,I=se;else{for(var Ve=!1,Gt=Q.child;Gt;){if(Gt===M){Ve=!0,M=Q,I=se;break}if(Gt===I){Ve=!0,I=Q,M=se;break}Gt=Gt.sibling}if(!Ve){for(Gt=se.child;Gt;){if(Gt===M){Ve=!0,M=se,I=Q;break}if(Gt===I){Ve=!0,I=se,M=Q;break}Gt=Gt.sibling}if(!Ve)throw Error(d(189))}}if(M.alternate!==I)throw Error(d(190))}if(M.tag!==3)throw Error(d(188));return M.stateNode.current===M?c:h}function Cr(c){return c=zn(c),c!==null?Zr(c):null}function Zr(c){if(c.tag===5||c.tag===6)return c;for(c=c.child;c!==null;){var h=Zr(c);if(h!==null)return h;c=c.sibling}return null}var Jr=f.unstable_scheduleCallback,_r=f.unstable_cancelCallback,Xn=f.unstable_shouldYield,mt=f.unstable_requestPaint,Ke=f.unstable_now,Mt=f.unstable_getCurrentPriorityLevel,tn=f.unstable_ImmediatePriority,Fn=f.unstable_UserBlockingPriority,Cn=f.unstable_NormalPriority,Bn=f.unstable_LowPriority,Ge=f.unstable_IdlePriority,At=null,Bt=null;function Zt(c){if(Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(At,c,void 0,(c.current.flags&128)===128)}catch{}}var Yt=Math.clz32?Math.clz32:tr,vn=Math.log,Un=Math.LN2;function tr(c){return c>>>=0,c===0?32:31-(vn(c)/Un|0)|0}var Nn=64,Vn=4194304;function Ye(c){switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function de(c,h){var M=c.pendingLanes;if(M===0)return 0;var I=0,Q=c.suspendedLanes,se=c.pingedLanes,Ve=M&268435455;if(Ve!==0){var Gt=Ve&~Q;Gt!==0?I=Ye(Gt):(se&=Ve,se!==0&&(I=Ye(se)))}else Ve=M&~Q,Ve!==0?I=Ye(Ve):se!==0&&(I=Ye(se));if(I===0)return 0;if(h!==0&&h!==I&&!(h&Q)&&(Q=I&-I,se=h&-h,Q>=se||Q===16&&(se&4194240)!==0))return h;if(I&4&&(I|=M&16),h=c.entangledLanes,h!==0)for(c=c.entanglements,h&=I;0<h;)M=31-Yt(h),Q=1<<M,I|=c[M],h&=~Q;return I}function ne(c,h){switch(c){case 1:case 2:case 4:return h+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ge(c,h){for(var M=c.suspendedLanes,I=c.pingedLanes,Q=c.expirationTimes,se=c.pendingLanes;0<se;){var Ve=31-Yt(se),Gt=1<<Ve,pn=Q[Ve];pn===-1?(!(Gt&M)||Gt&I)&&(Q[Ve]=ne(Gt,h)):pn<=h&&(c.expiredLanes|=Gt),se&=~Gt}}function je(c){return c=c.pendingLanes&-1073741825,c!==0?c:c&1073741824?1073741824:0}function He(){var c=Nn;return Nn<<=1,!(Nn&4194240)&&(Nn=64),c}function it(c){for(var h=[],M=0;31>M;M++)h.push(c);return h}function Rt(c,h,M){c.pendingLanes|=h,h!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,h=31-Yt(h),c[h]=M}function fn(c,h){var M=c.pendingLanes&~h;c.pendingLanes=h,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=h,c.mutableReadLanes&=h,c.entangledLanes&=h,h=c.entanglements;var I=c.eventTimes;for(c=c.expirationTimes;0<M;){var Q=31-Yt(M),se=1<<Q;h[Q]=0,I[Q]=-1,c[Q]=-1,M&=~se}}function qt(c,h){var M=c.entangledLanes|=h;for(c=c.entanglements;M;){var I=31-Yt(M),Q=1<<I;Q&h|c[I]&h&&(c[I]|=h),M&=~Q}}var Vt=0;function Jt(c){return c&=-c,1<c?4<c?c&268435455?16:536870912:4:1}var dn,Jn,Hn,Ir,vr,yr=!1,Er=[],Or=null,we=null,ue=null,Te=new Map,ze=new Map,ft=[],yt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ln(c,h){switch(c){case"focusin":case"focusout":Or=null;break;case"dragenter":case"dragleave":we=null;break;case"mouseover":case"mouseout":ue=null;break;case"pointerover":case"pointerout":Te.delete(h.pointerId);break;case"gotpointercapture":case"lostpointercapture":ze.delete(h.pointerId)}}function En(c,h,M,I,Q,se){return c===null||c.nativeEvent!==se?(c={blockedOn:h,domEventName:M,eventSystemFlags:I,nativeEvent:se,targetContainers:[Q]},h!==null&&(h=xl(h),h!==null&&Jn(h)),c):(c.eventSystemFlags|=I,h=c.targetContainers,Q!==null&&h.indexOf(Q)===-1&&h.push(Q),c)}function jr(c,h,M,I,Q){switch(h){case"focusin":return Or=En(Or,c,h,M,I,Q),!0;case"dragenter":return we=En(we,c,h,M,I,Q),!0;case"mouseover":return ue=En(ue,c,h,M,I,Q),!0;case"pointerover":var se=Q.pointerId;return Te.set(se,En(Te.get(se)||null,c,h,M,I,Q)),!0;case"gotpointercapture":return se=Q.pointerId,ze.set(se,En(ze.get(se)||null,c,h,M,I,Q)),!0}return!1}function ot(c){var h=Xa(c.target);if(h!==null){var M=Qe(h);if(M!==null){if(h=M.tag,h===13){if(h=jt(M),h!==null){c.blockedOn=h,vr(c.priority,function(){Hn(M)});return}}else if(h===3&&M.stateNode.current.memoizedState.isDehydrated){c.blockedOn=M.tag===3?M.stateNode.containerInfo:null;return}}}c.blockedOn=null}function zt(c){if(c.blockedOn!==null)return!1;for(var h=c.targetContainers;0<h.length;){var M=ai(c.domEventName,c.eventSystemFlags,h[0],c.nativeEvent);if(M===null){M=c.nativeEvent;var I=new M.constructor(M.type,M);$e=I,M.target.dispatchEvent(I),$e=null}else return h=xl(M),h!==null&&Jn(h),c.blockedOn=M,!1;h.shift()}return!0}function Ut(c,h,M){zt(c)&&M.delete(h)}function Ln(){yr=!1,Or!==null&&zt(Or)&&(Or=null),we!==null&&zt(we)&&(we=null),ue!==null&&zt(ue)&&(ue=null),Te.forEach(Ut),ze.forEach(Ut)}function Gn(c,h){c.blockedOn===h&&(c.blockedOn=null,yr||(yr=!0,f.unstable_scheduleCallback(f.unstable_NormalPriority,Ln)))}function xn(c){function h(Q){return Gn(Q,c)}if(0<Er.length){Gn(Er[0],c);for(var M=1;M<Er.length;M++){var I=Er[M];I.blockedOn===c&&(I.blockedOn=null)}}for(Or!==null&&Gn(Or,c),we!==null&&Gn(we,c),ue!==null&&Gn(ue,c),Te.forEach(h),ze.forEach(h),M=0;M<ft.length;M++)I=ft[M],I.blockedOn===c&&(I.blockedOn=null);for(;0<ft.length&&(M=ft[0],M.blockedOn===null);)ot(M),M.blockedOn===null&&ft.shift()}var ur=j.ReactCurrentBatchConfig,Sr=!0;function Fr(c,h,M,I){var Q=Vt,se=ur.transition;ur.transition=null;try{Vt=1,di(c,h,M,I)}finally{Vt=Q,ur.transition=se}}function ni(c,h,M,I){var Q=Vt,se=ur.transition;ur.transition=null;try{Vt=4,di(c,h,M,I)}finally{Vt=Q,ur.transition=se}}function di(c,h,M,I){if(Sr){var Q=ai(c,h,M,I);if(Q===null)Gs(c,h,I,Ar,M),ln(c,I);else if(jr(Q,c,h,M,I))I.stopPropagation();else if(ln(c,I),h&4&&-1<yt.indexOf(c)){for(;Q!==null;){var se=xl(Q);if(se!==null&&dn(se),se=ai(c,h,M,I),se===null&&Gs(c,h,I,Ar,M),se===Q)break;Q=se}Q!==null&&I.stopPropagation()}else Gs(c,h,I,null,M)}}var Ar=null;function ai(c,h,M,I){if(Ar=null,c=Re(I),c=Xa(c),c!==null)if(h=Qe(c),h===null)c=null;else if(M=h.tag,M===13){if(c=jt(h),c!==null)return c;c=null}else if(M===3){if(h.stateNode.current.memoizedState.isDehydrated)return h.tag===3?h.stateNode.containerInfo:null;c=null}else h!==c&&(c=null);return Ar=c,null}function Oi(c){switch(c){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Mt()){case tn:return 1;case Fn:return 4;case Cn:case Bn:return 16;case Ge:return 536870912;default:return 16}default:return 16}}var $r=null,_i=null,Wi=null;function so(){if(Wi)return Wi;var c,h=_i,M=h.length,I,Q="value"in $r?$r.value:$r.textContent,se=Q.length;for(c=0;c<M&&h[c]===Q[c];c++);var Ve=M-c;for(I=1;I<=Ve&&h[M-I]===Q[se-I];I++);return Wi=Q.slice(c,1<I?1-I:void 0)}function yo(c){var h=c.keyCode;return"charCode"in c?(c=c.charCode,c===0&&h===13&&(c=13)):c=h,c===10&&(c=13),32<=c||c===13?c:0}function to(){return!0}function Xe(){return!1}function De(c){function h(M,I,Q,se,Ve){this._reactName=M,this._targetInst=Q,this.type=I,this.nativeEvent=se,this.target=Ve,this.currentTarget=null;for(var Gt in c)c.hasOwnProperty(Gt)&&(M=c[Gt],this[Gt]=M?M(se):se[Gt]);return this.isDefaultPrevented=(se.defaultPrevented!=null?se.defaultPrevented:se.returnValue===!1)?to:Xe,this.isPropagationStopped=Xe,this}return pe(h.prototype,{preventDefault:function(){this.defaultPrevented=!0;var M=this.nativeEvent;M&&(M.preventDefault?M.preventDefault():typeof M.returnValue!="unknown"&&(M.returnValue=!1),this.isDefaultPrevented=to)},stopPropagation:function(){var M=this.nativeEvent;M&&(M.stopPropagation?M.stopPropagation():typeof M.cancelBubble!="unknown"&&(M.cancelBubble=!0),this.isPropagationStopped=to)},persist:function(){},isPersistent:to}),h}var _t={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(c){return c.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Et=De(_t),Xt=pe({},_t,{view:0,detail:0}),Sn=De(Xt),On,jn,cr,ii=pe({},Xt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wo,button:0,buttons:0,relatedTarget:function(c){return c.relatedTarget===void 0?c.fromElement===c.srcElement?c.toElement:c.fromElement:c.relatedTarget},movementX:function(c){return"movementX"in c?c.movementX:(c!==cr&&(cr&&c.type==="mousemove"?(On=c.screenX-cr.screenX,jn=c.screenY-cr.screenY):jn=On=0,cr=c),On)},movementY:function(c){return"movementY"in c?c.movementY:jn}}),li=De(ii),Yr=pe({},ii,{dataTransfer:0}),oi=De(Yr),qr=pe({},Xt,{relatedTarget:0}),gi=De(qr),Qi=pe({},_t,{animationName:0,elapsedTime:0,pseudoElement:0}),zi=De(Qi),Li=pe({},_t,{clipboardData:function(c){return"clipboardData"in c?c.clipboardData:window.clipboardData}}),ui=De(Li),Vi=pe({},_t,{data:0}),Bi=De(Vi),ho={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hi={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Eo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hi(c){var h=this.nativeEvent;return h.getModifierState?h.getModifierState(c):(c=Eo[c])?!!h[c]:!1}function wo(){return hi}var Uo=pe({},Xt,{key:function(c){if(c.key){var h=ho[c.key]||c.key;if(h!=="Unidentified")return h}return c.type==="keypress"?(c=yo(c),c===13?"Enter":String.fromCharCode(c)):c.type==="keydown"||c.type==="keyup"?Hi[c.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wo,charCode:function(c){return c.type==="keypress"?yo(c):0},keyCode:function(c){return c.type==="keydown"||c.type==="keyup"?c.keyCode:0},which:function(c){return c.type==="keypress"?yo(c):c.type==="keydown"||c.type==="keyup"?c.keyCode:0}}),ie=De(Uo),B=pe({},ii,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),he=De(B),xe=pe({},Xt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wo}),rt=De(xe),Lt=pe({},_t,{propertyName:0,elapsedTime:0,pseudoElement:0}),en=De(Lt),An=pe({},ii,{deltaX:function(c){return"deltaX"in c?c.deltaX:"wheelDeltaX"in c?-c.wheelDeltaX:0},deltaY:function(c){return"deltaY"in c?c.deltaY:"wheelDeltaY"in c?-c.wheelDeltaY:"wheelDelta"in c?-c.wheelDelta:0},deltaZ:0,deltaMode:0}),_n=De(An),Mr=[9,13,27,32],Ur=x&&"CompositionEvent"in window,Pr=null;x&&"documentMode"in document&&(Pr=document.documentMode);var Kr=x&&"TextEvent"in window&&!Pr,Qr=x&&(!Ur||Pr&&8<Pr&&11>=Pr),Wr=String.fromCharCode(32),ci=!1;function pr(c,h){switch(c){case"keyup":return Mr.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xr(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var Br=!1;function Mn(c,h){switch(c){case"compositionend":return Xr(h);case"keypress":return h.which!==32?null:(ci=!0,Wr);case"textInput":return c=h.data,c===Wr&&ci?null:c;default:return null}}function qi(c,h){if(Br)return c==="compositionend"||!Ur&&pr(c,h)?(c=so(),Wi=_i=$r=null,Br=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1<h.char.length)return h.char;if(h.which)return String.fromCharCode(h.which)}return null;case"compositionend":return Qr&&h.locale!=="ko"?null:h.data;default:return null}}var Po={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function mo(c){var h=c&&c.nodeName&&c.nodeName.toLowerCase();return h==="input"?!!Po[c.type]:h==="textarea"}function Ko(c,h,M,I){an(I),h=Ea(h,"onChange"),0<h.length&&(M=new Et("onChange","change",null,M,I),c.push({event:M,listeners:h}))}var Co=null,No=null;function Ao(c){bo(c,0)}function vt(c){var h=jl(c);if(at(h))return c}function la(c,h){if(c==="change")return h}var Es=!1;if(x){var Qn;if(x){var ms="oninput"in document;if(!ms){var ua=document.createElement("div");ua.setAttribute("oninput","return;"),ms=typeof ua.oninput=="function"}Qn=ms}else Qn=!1;Es=Qn&&(!document.documentMode||9<document.documentMode)}function co(){Co&&(Co.detachEvent("onpropertychange",Zs),No=Co=null)}function Zs(c){if(c.propertyName==="value"&&vt(No)){var h=[];Ko(h,No,c,Re(c)),fr(Ao,h)}}function ya(c,h,M){c==="focusin"?(co(),Co=h,No=M,Co.attachEvent("onpropertychange",Zs)):c==="focusout"&&co()}function qe(c){if(c==="selectionchange"||c==="keyup"||c==="keydown")return vt(No)}function Oa(c,h){if(c==="click")return vt(h)}function ul(c,h){if(c==="input"||c==="change")return vt(h)}function Mo(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var bs=typeof Object.is=="function"?Object.is:Mo;function ca(c,h){if(bs(c,h))return!0;if(typeof c!="object"||c===null||typeof h!="object"||h===null)return!1;var M=Object.keys(c),I=Object.keys(h);if(M.length!==I.length)return!1;for(I=0;I<M.length;I++){var Q=M[I];if(!P.call(h,Q)||!bs(c[Q],h[Q]))return!1}return!0}function El(c){for(;c&&c.firstChild;)c=c.firstChild;return c}function Ds(c,h){var M=El(c);c=0;for(var I;M;){if(M.nodeType===3){if(I=c+M.textContent.length,c<=h&&I>=h)return{node:M,offset:h-c};c=I}e:{for(;M;){if(M.nextSibling){M=M.nextSibling;break e}M=M.parentNode}M=void 0}M=El(M)}}function Zi(c,h){return c&&h?c===h?!0:c&&c.nodeType===3?!1:h&&h.nodeType===3?Zi(c,h.parentNode):"contains"in c?c.contains(h):c.compareDocumentPosition?!!(c.compareDocumentPosition(h)&16):!1:!1}function Xo(){for(var c=window,h=Pt();h instanceof c.HTMLIFrameElement;){try{var M=typeof h.contentWindow.location.href=="string"}catch{M=!1}if(M)c=h.contentWindow;else break;h=Pt(c.document)}return h}function po(c){var h=c&&c.nodeName&&c.nodeName.toLowerCase();return h&&(h==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||h==="textarea"||c.contentEditable==="true")}function go(c){var h=Xo(),M=c.focusedElem,I=c.selectionRange;if(h!==M&&M&&M.ownerDocument&&Zi(M.ownerDocument.documentElement,M)){if(I!==null&&po(M)){if(h=I.start,c=I.end,c===void 0&&(c=h),"selectionStart"in M)M.selectionStart=h,M.selectionEnd=Math.min(c,M.value.length);else if(c=(h=M.ownerDocument||document)&&h.defaultView||window,c.getSelection){c=c.getSelection();var Q=M.textContent.length,se=Math.min(I.start,Q);I=I.end===void 0?se:Math.min(I.end,Q),!c.extend&&se>I&&(Q=I,I=se,se=Q),Q=Ds(M,se);var Ve=Ds(M,I);Q&&Ve&&(c.rangeCount!==1||c.anchorNode!==Q.node||c.anchorOffset!==Q.offset||c.focusNode!==Ve.node||c.focusOffset!==Ve.offset)&&(h=h.createRange(),h.setStart(Q.node,Q.offset),c.removeAllRanges(),se>I?(c.addRange(h),c.extend(Ve.node,Ve.offset)):(h.setEnd(Ve.node,Ve.offset),c.addRange(h)))}}for(h=[],c=M;c=c.parentNode;)c.nodeType===1&&h.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<h.length;M++)c=h[M],c.element.scrollLeft=c.left,c.element.scrollTop=c.top}}var Fo=x&&"documentMode"in document&&11>=document.documentMode,xs=null,fa=null,$a=null,us=!1;function bl(c,h,M){var I=M.window===M?M.document:M.nodeType===9?M:M.ownerDocument;us||xs==null||xs!==Pt(I)||(I=xs,"selectionStart"in I&&po(I)?I={start:I.selectionStart,end:I.selectionEnd}:(I=(I.ownerDocument&&I.ownerDocument.defaultView||window).getSelection(),I={anchorNode:I.anchorNode,anchorOffset:I.anchorOffset,focusNode:I.focusNode,focusOffset:I.focusOffset}),$a&&ca($a,I)||($a=I,I=Ea(fa,"onSelect"),0<I.length&&(h=new Et("onSelect","select",null,h,M),c.push({event:h,listeners:I}),h.target=xs)))}function Go(c,h){var M={};return M[c.toLowerCase()]=h.toLowerCase(),M["Webkit"+c]="webkit"+h,M["Moz"+c]="moz"+h,M}var xt={animationend:Go("Animation","AnimationEnd"),animationiteration:Go("Animation","AnimationIteration"),animationstart:Go("Animation","AnimationStart"),transitionend:Go("Transition","TransitionEnd")},Tn={},$n={};x&&($n=document.createElement("div").style,"AnimationEvent"in window||(delete xt.animationend.animation,delete xt.animationiteration.animation,delete xt.animationstart.animation),"TransitionEvent"in window||delete xt.transitionend.transition);function lr(c){if(Tn[c])return Tn[c];if(!xt[c])return c;var h=xt[c],M;for(M in h)if(h.hasOwnProperty(M)&&M in $n)return Tn[c]=h[M];return c}var br=lr("animationend"),Gr=lr("animationiteration"),vi=lr("animationstart"),xi=lr("transitionend"),Ti=new Map,bi="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function wi(c,h){Ti.set(c,h),m(h,[c])}for(var fi=0;fi<bi.length;fi++){var ji=bi[fi],lo=ji.toLowerCase(),uo=ji[0].toUpperCase()+ji.slice(1);wi(lo,"on"+uo)}wi(br,"onAnimationEnd"),wi(Gr,"onAnimationIteration"),wi(vi,"onAnimationStart"),wi("dblclick","onDoubleClick"),wi("focusin","onFocus"),wi("focusout","onBlur"),wi(xi,"onTransitionEnd"),C("onMouseEnter",["mouseout","mouseover"]),C("onMouseLeave",["mouseout","mouseover"]),C("onPointerEnter",["pointerout","pointerover"]),C("onPointerLeave",["pointerout","pointerover"]),m("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),m("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),m("onBeforeInput",["compositionend","keypress","textInput","paste"]),m("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),m("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),m("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),So=new Set("cancel close invalid load scroll toggle".split(" ").concat(xr));function Do(c,h,M){var I=c.type||"unknown-event";c.currentTarget=M,ve(I,h,void 0,c),c.currentTarget=null}function bo(c,h){h=(h&4)!==0;for(var M=0;M<c.length;M++){var I=c[M],Q=I.event;I=I.listeners;e:{var se=void 0;if(h)for(var Ve=I.length-1;0<=Ve;Ve--){var Gt=I[Ve],pn=Gt.instance,ir=Gt.currentTarget;if(Gt=Gt.listener,pn!==se&&Q.isPropagationStopped())break e;Do(Q,Gt,ir),se=pn}else for(Ve=0;Ve<I.length;Ve++){if(Gt=I[Ve],pn=Gt.instance,ir=Gt.currentTarget,Gt=Gt.listener,pn!==se&&Q.isPropagationStopped())break e;Do(Q,Gt,ir),se=pn}}}if(Qt)throw c=qn,Qt=!1,qn=null,c}function no(c,h){var M=h[Yl];M===void 0&&(M=h[Yl]=new Set);var I=c+"__bubble";M.has(I)||(qo(h,c,2,!1),M.add(I))}function Yo(c,h,M){var I=0;h&&(I|=4),qo(M,c,I,h)}var as="_reactListening"+Math.random().toString(36).slice(2);function Ks(c){if(!c[as]){c[as]=!0,g.forEach(function(M){M!=="selectionchange"&&(So.has(M)||Yo(M,!1,c),Yo(M,!0,c))});var h=c.nodeType===9?c:c.ownerDocument;h===null||h[as]||(h[as]=!0,Yo("selectionchange",!1,h))}}function qo(c,h,M,I){switch(Oi(h)){case 1:var Q=Fr;break;case 4:Q=ni;break;default:Q=di}M=Q.bind(null,h,M,c),Q=void 0,!Vr||h!=="touchstart"&&h!=="touchmove"&&h!=="wheel"||(Q=!0),I?Q!==void 0?c.addEventListener(h,M,{capture:!0,passive:Q}):c.addEventListener(h,M,!0):Q!==void 0?c.addEventListener(h,M,{passive:Q}):c.addEventListener(h,M,!1)}function Gs(c,h,M,I,Q){var se=I;if(!(h&1)&&!(h&2)&&I!==null)e:for(;;){if(I===null)return;var Ve=I.tag;if(Ve===3||Ve===4){var Gt=I.stateNode.containerInfo;if(Gt===Q||Gt.nodeType===8&&Gt.parentNode===Q)break;if(Ve===4)for(Ve=I.return;Ve!==null;){var pn=Ve.tag;if((pn===3||pn===4)&&(pn=Ve.stateNode.containerInfo,pn===Q||pn.nodeType===8&&pn.parentNode===Q))return;Ve=Ve.return}for(;Gt!==null;){if(Ve=Xa(Gt),Ve===null)return;if(pn=Ve.tag,pn===5||pn===6){I=se=Ve;continue e}Gt=Gt.parentNode}}I=I.return}fr(function(){var ir=se,zr=Re(M),kr=[];e:{var Hr=Ti.get(c);if(Hr!==void 0){var Ei=Et,Ii=c;switch(c){case"keypress":if(yo(M)===0)break e;case"keydown":case"keyup":Ei=ie;break;case"focusin":Ii="focus",Ei=gi;break;case"focusout":Ii="blur",Ei=gi;break;case"beforeblur":case"afterblur":Ei=gi;break;case"click":if(M.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ei=li;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ei=oi;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ei=rt;break;case br:case Gr:case vi:Ei=zi;break;case xi:Ei=en;break;case"scroll":Ei=Sn;break;case"wheel":Ei=_n;break;case"copy":case"cut":case"paste":Ei=ui;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ei=he}var Ni=(h&4)!==0,ia=!Ni&&c==="scroll",Zn=Ni?Hr!==null?Hr+"Capture":null:Hr;Ni=[];for(var wn=ir,er;wn!==null;){er=wn;var si=er.stateNode;if(er.tag===5&&si!==null&&(er=si,Zn!==null&&(si=Rr(wn,Zn),si!=null&&Ni.push(Ys(wn,si,er)))),ia)break;wn=wn.return}0<Ni.length&&(Hr=new Ei(Hr,Ii,null,M,zr),kr.push({event:Hr,listeners:Ni}))}}if(!(h&7)){e:{if(Hr=c==="mouseover"||c==="pointerover",Ei=c==="mouseout"||c==="pointerout",Hr&&M!==$e&&(Ii=M.relatedTarget||M.fromElement)&&(Xa(Ii)||Ii[fl]))break e;if((Ei||Hr)&&(Hr=zr.window===zr?zr:(Hr=zr.ownerDocument)?Hr.defaultView||Hr.parentWindow:window,Ei?(Ii=M.relatedTarget||M.toElement,Ei=ir,Ii=Ii?Xa(Ii):null,Ii!==null&&(ia=Qe(Ii),Ii!==ia||Ii.tag!==5&&Ii.tag!==6)&&(Ii=null)):(Ei=null,Ii=ir),Ei!==Ii)){if(Ni=li,si="onMouseLeave",Zn="onMouseEnter",wn="mouse",(c==="pointerout"||c==="pointerover")&&(Ni=he,si="onPointerLeave",Zn="onPointerEnter",wn="pointer"),ia=Ei==null?Hr:jl(Ei),er=Ii==null?Hr:jl(Ii),Hr=new Ni(si,wn+"leave",Ei,M,zr),Hr.target=ia,Hr.relatedTarget=er,si=null,Xa(zr)===ir&&(Ni=new Ni(Zn,wn+"enter",Ii,M,zr),Ni.target=er,Ni.relatedTarget=ia,si=Ni),ia=si,Ei&&Ii)t:{for(Ni=Ei,Zn=Ii,wn=0,er=Ni;er;er=Na(er))wn++;for(er=0,si=Zn;si;si=Na(si))er++;for(;0<wn-er;)Ni=Na(Ni),wn--;for(;0<er-wn;)Zn=Na(Zn),er--;for(;wn--;){if(Ni===Zn||Zn!==null&&Ni===Zn.alternate)break t;Ni=Na(Ni),Zn=Na(Zn)}Ni=null}else Ni=null;Ei!==null&&Ta(kr,Hr,Ei,Ni,!1),Ii!==null&&ia!==null&&Ta(kr,ia,Ii,Ni,!0)}}e:{if(Hr=ir?jl(ir):window,Ei=Hr.nodeName&&Hr.nodeName.toLowerCase(),Ei==="select"||Ei==="input"&&Hr.type==="file")var Ui=la;else if(mo(Hr))if(Es)Ui=ul;else{Ui=qe;var io=ya}else(Ei=Hr.nodeName)&&Ei.toLowerCase()==="input"&&(Hr.type==="checkbox"||Hr.type==="radio")&&(Ui=Oa);if(Ui&&(Ui=Ui(c,ir))){Ko(kr,Ui,M,zr);break e}io&&io(c,Hr,ir),c==="focusout"&&(io=Hr._wrapperState)&&io.controlled&&Hr.type==="number"&&kn(Hr,"number",Hr.value)}switch(io=ir?jl(ir):window,c){case"focusin":(mo(io)||io.contentEditable==="true")&&(xs=io,fa=ir,$a=null);break;case"focusout":$a=fa=xs=null;break;case"mousedown":us=!0;break;case"contextmenu":case"mouseup":case"dragend":us=!1,bl(kr,M,zr);break;case"selectionchange":if(Fo)break;case"keydown":case"keyup":bl(kr,M,zr)}var ro;if(Ur)e:{switch(c){case"compositionstart":var fo="onCompositionStart";break e;case"compositionend":fo="onCompositionEnd";break e;case"compositionupdate":fo="onCompositionUpdate";break e}fo=void 0}else Br?pr(c,M)&&(fo="onCompositionEnd"):c==="keydown"&&M.keyCode===229&&(fo="onCompositionStart");fo&&(Qr&&M.locale!=="ko"&&(Br||fo!=="onCompositionStart"?fo==="onCompositionEnd"&&Br&&(ro=so()):($r=zr,_i="value"in $r?$r.value:$r.textContent,Br=!0)),io=Ea(ir,fo),0<io.length&&(fo=new Bi(fo,c,null,M,zr),kr.push({event:fo,listeners:io}),ro?fo.data=ro:(ro=Xr(M),ro!==null&&(fo.data=ro)))),(ro=Kr?Mn(c,M):qi(c,M))&&(ir=Ea(ir,"onBeforeInput"),0<ir.length&&(zr=new Bi("onBeforeInput","beforeinput",null,M,zr),kr.push({event:zr,listeners:ir}),zr.data=ro))}bo(kr,h)})}function Ys(c,h,M){return{instance:c,listener:h,currentTarget:M}}function Ea(c,h){for(var M=h+"Capture",I=[];c!==null;){var Q=c,se=Q.stateNode;Q.tag===5&&se!==null&&(Q=se,se=Rr(c,M),se!=null&&I.unshift(Ys(c,se,Q)),se=Rr(c,h),se!=null&&I.push(Ys(c,se,Q))),c=c.return}return I}function Na(c){if(c===null)return null;do c=c.return;while(c&&c.tag!==5);return c||null}function Ta(c,h,M,I,Q){for(var se=h._reactName,Ve=[];M!==null&&M!==I;){var Gt=M,pn=Gt.alternate,ir=Gt.stateNode;if(pn!==null&&pn===I)break;Gt.tag===5&&ir!==null&&(Gt=ir,Q?(pn=Rr(M,se),pn!=null&&Ve.unshift(Ys(M,pn,Gt))):Q||(pn=Rr(M,se),pn!=null&&Ve.push(Ys(M,pn,Gt)))),M=M.return}Ve.length!==0&&c.push({event:h,listeners:Ve})}var Ms=/\r\n?/g,Fl=/\u0000|\uFFFD/g;function wa(c){return(typeof c=="string"?c:""+c).replace(Ms,`
1154
+ `).replace(Fl,"")}function Bl(c,h,M){if(h=wa(h),wa(c)!==h&&M)throw Error(d(425))}function ba(){}var Ro=null,Lr=null;function es(c,h){return c==="textarea"||c==="noscript"||typeof h.children=="string"||typeof h.children=="number"||typeof h.dangerouslySetInnerHTML=="object"&&h.dangerouslySetInnerHTML!==null&&h.dangerouslySetInnerHTML.__html!=null}var Ws=typeof setTimeout=="function"?setTimeout:void 0,ta=typeof clearTimeout=="function"?clearTimeout:void 0,Ja=typeof Promise=="function"?Promise:void 0,kl=typeof queueMicrotask=="function"?queueMicrotask:typeof Ja<"u"?function(c){return Ja.resolve(null).then(c).catch(ou)}:Ws;function ou(c){setTimeout(function(){throw c})}function gs(c,h){var M=h,I=0;do{var Q=M.nextSibling;if(c.removeChild(M),Q&&Q.nodeType===8)if(M=Q.data,M==="/$"){if(I===0){c.removeChild(Q),xn(h);return}I--}else M!=="$"&&M!=="$?"&&M!=="$!"||I++;M=Q}while(M);xn(h)}function Is(c){for(;c!=null;c=c.nextSibling){var h=c.nodeType;if(h===1||h===3)break;if(h===8){if(h=c.data,h==="$"||h==="$!"||h==="$?")break;if(h==="/$")return null}}return c}function cl(c){c=c.previousSibling;for(var h=0;c;){if(c.nodeType===8){var M=c.data;if(M==="$"||M==="$!"||M==="$?"){if(h===0)return c;h--}else M==="/$"&&h++}c=c.previousSibling}return null}var _s=Math.random().toString(36).slice(2),Fa="__reactFiber$"+_s,Ss="__reactProps$"+_s,fl="__reactContainer$"+_s,Yl="__reactEvents$"+_s,Xu="__reactListeners$"+_s,qu="__reactHandles$"+_s;function Xa(c){var h=c[Fa];if(h)return h;for(var M=c.parentNode;M;){if(h=M[fl]||M[Fa]){if(M=h.alternate,h.child!==null||M!==null&&M.child!==null)for(c=cl(c);c!==null;){if(M=c[Fa])return M;c=cl(c)}return h}c=M,M=c.parentNode}return null}function xl(c){return c=c[Fa]||c[fl],!c||c.tag!==5&&c.tag!==6&&c.tag!==13&&c.tag!==3?null:c}function jl(c){if(c.tag===5||c.tag===6)return c.stateNode;throw Error(d(33))}function Da(c){return c[Ss]||null}var Cl=[],Ls=-1;function Ba(c){return{current:c}}function ds(c){0>Ls||(c.current=Cl[Ls],Cl[Ls]=null,Ls--)}function Bo(c,h){Ls++,Cl[Ls]=c.current,c.current=h}var Wo={},$s=Ba(Wo),da=Ba(!1),Ml=Wo;function qa(c,h){var M=c.type.contextTypes;if(!M)return Wo;var I=c.stateNode;if(I&&I.__reactInternalMemoizedUnmaskedChildContext===h)return I.__reactInternalMemoizedMaskedChildContext;var Q={},se;for(se in M)Q[se]=h[se];return I&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=h,c.__reactInternalMemoizedMaskedChildContext=Q),Q}function na(c){return c=c.childContextTypes,c!=null}function su(){ds(da),ds($s)}function Sl(c,h,M){if($s.current!==Wo)throw Error(d(168));Bo($s,h),Bo(da,M)}function Ps(c,h,M){var I=c.stateNode;if(h=h.childContextTypes,typeof I.getChildContext!="function")return M;I=I.getChildContext();for(var Q in I)if(!(Q in h))throw Error(d(108,Fe(c)||"Unknown",Q));return pe({},M,I)}function au(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||Wo,Ml=$s.current,Bo($s,c),Bo(da,da.current),!0}function ts(c,h,M){var I=c.stateNode;if(!I)throw Error(d(169));M?(c=Ps(c,h,Ml),I.__reactInternalMemoizedMergedChildContext=c,ds(da),ds($s),Bo($s,c)):ds(da),Bo(da,M)}var el=null,Ql=!1,lu=!1;function wc(c){el===null?el=[c]:el.push(c)}function of(c){Ql=!0,wc(c)}function dl(){if(!lu&&el!==null){lu=!0;var c=0,h=Vt;try{var M=el;for(Vt=1;c<M.length;c++){var I=M[c];do I=I(!0);while(I!==null)}el=null,Ql=!1}catch(Q){throw el!==null&&(el=el.slice(c+1)),Jr(tn,dl),Q}finally{Vt=h,lu=!1}}return null}var Os=[],uu=0,ec=null,Ol=0,_o=[],ka=0,Tl=null,tl=1,nl="";function Pa(c,h){Os[uu++]=Ol,Os[uu++]=ec,ec=c,Ol=h}function Dc(c,h,M){_o[ka++]=tl,_o[ka++]=nl,_o[ka++]=Tl,Tl=c;var I=tl;c=nl;var Q=32-Yt(I)-1;I&=~(1<<Q),M+=1;var se=32-Yt(h)+Q;if(30<se){var Ve=Q-Q%5;se=(I&(1<<Ve)-1).toString(32),I>>=Ve,Q-=Ve,tl=1<<32-Yt(h)+Q|M<<Q|I,nl=se+c}else tl=1<<se|M<<Q|I,nl=c}function Tu(c){c.return!==null&&(Pa(c,1),Dc(c,1,0))}function Pc(c){for(;c===ec;)ec=Os[--uu],Os[uu]=null,Ol=Os[--uu],Os[uu]=null;for(;c===Tl;)Tl=_o[--ka],_o[ka]=null,nl=_o[--ka],_o[ka]=null,tl=_o[--ka],_o[ka]=null}var ha=null,xa=null,hs=!1,hl=null;function sf(c,h){var M=Ft(5,null,null,0);M.elementType="DELETED",M.stateNode=h,M.return=c,h=c.deletions,h===null?(c.deletions=[M],c.flags|=16):h.push(M)}function Ac(c,h){switch(c.tag){case 5:var M=c.type;return h=h.nodeType!==1||M.toLowerCase()!==h.nodeName.toLowerCase()?null:h,h!==null?(c.stateNode=h,ha=c,xa=Is(h.firstChild),!0):!1;case 6:return h=c.pendingProps===""||h.nodeType!==3?null:h,h!==null?(c.stateNode=h,ha=c,xa=null,!0):!1;case 13:return h=h.nodeType!==8?null:h,h!==null?(M=Tl!==null?{id:tl,overflow:nl}:null,c.memoizedState={dehydrated:h,treeContext:M,retryLane:1073741824},M=Ft(18,null,null,0),M.stateNode=h,M.return=c,c.child=M,ha=c,xa=null,!0):!1;default:return!1}}function Rc(c){return(c.mode&1)!==0&&(c.flags&128)===0}function wu(c){if(hs){var h=xa;if(h){var M=h;if(!Ac(c,h)){if(Rc(c))throw Error(d(418));h=Is(M.nextSibling);var I=ha;h&&Ac(c,h)?sf(I,M):(c.flags=c.flags&-4097|2,hs=!1,ha=c)}}else{if(Rc(c))throw Error(d(418));c.flags=c.flags&-4097|2,hs=!1,ha=c}}}function Ic(c){for(c=c.return;c!==null&&c.tag!==5&&c.tag!==3&&c.tag!==13;)c=c.return;ha=c}function _c(c){if(c!==ha)return!1;if(!hs)return Ic(c),hs=!0,!1;var h;if((h=c.tag!==3)&&!(h=c.tag!==5)&&(h=c.type,h=h!=="head"&&h!=="body"&&!es(c.type,c.memoizedProps)),h&&(h=xa)){if(Rc(c))throw Qf(),Error(d(418));for(;h;)sf(c,h),h=Is(h.nextSibling)}if(Ic(c),c.tag===13){if(c=c.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(d(317));e:{for(c=c.nextSibling,h=0;c;){if(c.nodeType===8){var M=c.data;if(M==="/$"){if(h===0){xa=Is(c.nextSibling);break e}h--}else M!=="$"&&M!=="$!"&&M!=="$?"||h++}c=c.nextSibling}xa=null}}else xa=ha?Is(c.stateNode.nextSibling):null;return!0}function Qf(){for(var c=xa;c;)c=Is(c.nextSibling)}function cu(){xa=ha=null,hs=!1}function af(c){hl===null?hl=[c]:hl.push(c)}var Jf=j.ReactCurrentBatchConfig;function ja(c,h){if(c&&c.defaultProps){h=pe({},h),c=c.defaultProps;for(var M in c)h[M]===void 0&&(h[M]=c[M]);return h}return h}var Du=Ba(null),Pu=null,Ul=null,pa=null;function Au(){pa=Ul=Pu=null}function Ru(c){var h=Du.current;ds(Du),c._currentValue=h}function tc(c,h,M){for(;c!==null;){var I=c.alternate;if((c.childLanes&h)!==h?(c.childLanes|=h,I!==null&&(I.childLanes|=h)):I!==null&&(I.childLanes&h)!==h&&(I.childLanes|=h),c===M)break;c=c.return}}function fu(c,h){Pu=c,pa=Ul=null,c=c.dependencies,c!==null&&c.firstContext!==null&&(c.lanes&h&&(Js=!0),c.firstContext=null)}function Ua(c){var h=c._currentValue;if(pa!==c)if(c={context:c,memoizedValue:h,next:null},Ul===null){if(Pu===null)throw Error(d(308));Ul=c,Pu.dependencies={lanes:0,firstContext:c}}else Ul=Ul.next=c;return h}var Jl=null;function lf(c){Jl===null?Jl=[c]:Jl.push(c)}function Lc(c,h,M,I){var Q=h.interleaved;return Q===null?(M.next=M,lf(h)):(M.next=Q.next,Q.next=M),h.interleaved=M,rl(c,I)}function rl(c,h){c.lanes|=h;var M=c.alternate;for(M!==null&&(M.lanes|=h),M=c,c=c.return;c!==null;)c.childLanes|=h,M=c.alternate,M!==null&&(M.childLanes|=h),M=c,c=c.return;return M.tag===3?M.stateNode:null}var wl=!1;function $c(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Nc(c,h){c=c.updateQueue,h.updateQueue===c&&(h.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,effects:c.effects})}function il(c,h){return{eventTime:c,lane:h,tag:0,payload:null,callback:null,next:null}}function Aa(c,h,M){var I=c.updateQueue;if(I===null)return null;if(I=I.shared,$o&2){var Q=I.pending;return Q===null?h.next=h:(h.next=Q.next,Q.next=h),I.pending=h,rl(c,M)}return Q=I.interleaved,Q===null?(h.next=h,lf(I)):(h.next=Q.next,Q.next=h),I.interleaved=h,rl(c,M)}function Fc(c,h,M){if(h=h.updateQueue,h!==null&&(h=h.shared,(M&4194240)!==0)){var I=h.lanes;I&=c.pendingLanes,M|=I,h.lanes=M,qt(c,M)}}function Xf(c,h){var M=c.updateQueue,I=c.alternate;if(I!==null&&(I=I.updateQueue,M===I)){var Q=null,se=null;if(M=M.firstBaseUpdate,M!==null){do{var Ve={eventTime:M.eventTime,lane:M.lane,tag:M.tag,payload:M.payload,callback:M.callback,next:null};se===null?Q=se=Ve:se=se.next=Ve,M=M.next}while(M!==null);se===null?Q=se=h:se=se.next=h}else Q=se=h;M={baseState:I.baseState,firstBaseUpdate:Q,lastBaseUpdate:se,shared:I.shared,effects:I.effects},c.updateQueue=M;return}c=M.lastBaseUpdate,c===null?M.firstBaseUpdate=h:c.next=h,M.lastBaseUpdate=h}function nc(c,h,M,I){var Q=c.updateQueue;wl=!1;var se=Q.firstBaseUpdate,Ve=Q.lastBaseUpdate,Gt=Q.shared.pending;if(Gt!==null){Q.shared.pending=null;var pn=Gt,ir=pn.next;pn.next=null,Ve===null?se=ir:Ve.next=ir,Ve=pn;var zr=c.alternate;zr!==null&&(zr=zr.updateQueue,Gt=zr.lastBaseUpdate,Gt!==Ve&&(Gt===null?zr.firstBaseUpdate=ir:Gt.next=ir,zr.lastBaseUpdate=pn))}if(se!==null){var kr=Q.baseState;Ve=0,zr=ir=pn=null,Gt=se;do{var Hr=Gt.lane,Ei=Gt.eventTime;if((I&Hr)===Hr){zr!==null&&(zr=zr.next={eventTime:Ei,lane:0,tag:Gt.tag,payload:Gt.payload,callback:Gt.callback,next:null});e:{var Ii=c,Ni=Gt;switch(Hr=h,Ei=M,Ni.tag){case 1:if(Ii=Ni.payload,typeof Ii=="function"){kr=Ii.call(Ei,kr,Hr);break e}kr=Ii;break e;case 3:Ii.flags=Ii.flags&-65537|128;case 0:if(Ii=Ni.payload,Hr=typeof Ii=="function"?Ii.call(Ei,kr,Hr):Ii,Hr==null)break e;kr=pe({},kr,Hr);break e;case 2:wl=!0}}Gt.callback!==null&&Gt.lane!==0&&(c.flags|=64,Hr=Q.effects,Hr===null?Q.effects=[Gt]:Hr.push(Gt))}else Ei={eventTime:Ei,lane:Hr,tag:Gt.tag,payload:Gt.payload,callback:Gt.callback,next:null},zr===null?(ir=zr=Ei,pn=kr):zr=zr.next=Ei,Ve|=Hr;if(Gt=Gt.next,Gt===null){if(Gt=Q.shared.pending,Gt===null)break;Hr=Gt,Gt=Hr.next,Hr.next=null,Q.lastBaseUpdate=Hr,Q.shared.pending=null}}while(1);if(zr===null&&(pn=kr),Q.baseState=pn,Q.firstBaseUpdate=ir,Q.lastBaseUpdate=zr,h=Q.shared.interleaved,h!==null){Q=h;do Ve|=Q.lane,Q=Q.next;while(Q!==h)}else se===null&&(Q.shared.lanes=0);zu|=Ve,c.lanes=Ve,c.memoizedState=kr}}function rc(c,h,M){if(c=h.effects,h.effects=null,c!==null)for(h=0;h<c.length;h++){var I=c[h],Q=I.callback;if(Q!==null){if(I.callback=null,I=M,typeof Q!="function")throw Error(d(191,Q));Q.call(I)}}}var Bc=new l.Component().refs;function As(c,h,M,I){h=c.memoizedState,M=M(I,h),M=M==null?h:pe({},h,M),c.memoizedState=M,c.lanes===0&&(c.updateQueue.baseState=M)}var Iu={isMounted:function(c){return(c=c._reactInternals)?Qe(c)===c:!1},enqueueSetState:function(c,h,M){c=c._reactInternals;var I=va(),Q=Zl(c),se=il(I,Q);se.payload=h,M!=null&&(se.callback=M),h=Aa(c,se,Q),h!==null&&(Kl(h,c,Q,I),Fc(h,c,Q))},enqueueReplaceState:function(c,h,M){c=c._reactInternals;var I=va(),Q=Zl(c),se=il(I,Q);se.tag=1,se.payload=h,M!=null&&(se.callback=M),h=Aa(c,se,Q),h!==null&&(Kl(h,c,Q,I),Fc(h,c,Q))},enqueueForceUpdate:function(c,h){c=c._reactInternals;var M=va(),I=Zl(c),Q=il(M,I);Q.tag=2,h!=null&&(Q.callback=h),h=Aa(c,Q,I),h!==null&&(Kl(h,c,I,M),Fc(h,c,I))}};function uf(c,h,M,I,Q,se,Ve){return c=c.stateNode,typeof c.shouldComponentUpdate=="function"?c.shouldComponentUpdate(I,se,Ve):h.prototype&&h.prototype.isPureReactComponent?!ca(M,I)||!ca(Q,se):!0}function _f(c,h,M){var I=!1,Q=Wo,se=h.contextType;return typeof se=="object"&&se!==null?se=Ua(se):(Q=na(h)?Ml:$s.current,I=h.contextTypes,se=(I=I!=null)?qa(c,Q):Wo),h=new h(M,se),c.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Iu,c.stateNode=h,h._reactInternals=c,I&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=Q,c.__reactInternalMemoizedMaskedChildContext=se),h}function cf(c,h,M,I){c=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(M,I),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(M,I),h.state!==c&&Iu.enqueueReplaceState(h,h.state,null)}function ff(c,h,M,I){var Q=c.stateNode;Q.props=M,Q.state=c.memoizedState,Q.refs=Bc,$c(c);var se=h.contextType;typeof se=="object"&&se!==null?Q.context=Ua(se):(se=na(h)?Ml:$s.current,Q.context=qa(c,se)),Q.state=c.memoizedState,se=h.getDerivedStateFromProps,typeof se=="function"&&(As(c,h,se,M),Q.state=c.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof Q.getSnapshotBeforeUpdate=="function"||typeof Q.UNSAFE_componentWillMount!="function"&&typeof Q.componentWillMount!="function"||(h=Q.state,typeof Q.componentWillMount=="function"&&Q.componentWillMount(),typeof Q.UNSAFE_componentWillMount=="function"&&Q.UNSAFE_componentWillMount(),h!==Q.state&&Iu.enqueueReplaceState(Q,Q.state,null),nc(c,M,Q,I),Q.state=c.memoizedState),typeof Q.componentDidMount=="function"&&(c.flags|=4194308)}function du(c,h,M){if(c=M.ref,c!==null&&typeof c!="function"&&typeof c!="object"){if(M._owner){if(M=M._owner,M){if(M.tag!==1)throw Error(d(309));var I=M.stateNode}if(!I)throw Error(d(147,c));var Q=I,se=""+c;return h!==null&&h.ref!==null&&typeof h.ref=="function"&&h.ref._stringRef===se?h.ref:(h=function(Ve){var Gt=Q.refs;Gt===Bc&&(Gt=Q.refs={}),Ve===null?delete Gt[se]:Gt[se]=Ve},h._stringRef=se,h)}if(typeof c!="string")throw Error(d(284));if(!M._owner)throw Error(d(290,c))}return c}function hu(c,h){throw c=Object.prototype.toString.call(h),Error(d(31,c==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":c))}function kc(c){var h=c._init;return h(c._payload)}function df(c){function h(Zn,wn){if(c){var er=Zn.deletions;er===null?(Zn.deletions=[wn],Zn.flags|=16):er.push(wn)}}function M(Zn,wn){if(!c)return null;for(;wn!==null;)h(Zn,wn),wn=wn.sibling;return null}function I(Zn,wn){for(Zn=new Map;wn!==null;)wn.key!==null?Zn.set(wn.key,wn):Zn.set(wn.index,wn),wn=wn.sibling;return Zn}function Q(Zn,wn){return Zn=sn(Zn,wn),Zn.index=0,Zn.sibling=null,Zn}function se(Zn,wn,er){return Zn.index=er,c?(er=Zn.alternate,er!==null?(er=er.index,er<wn?(Zn.flags|=2,wn):er):(Zn.flags|=2,wn)):(Zn.flags|=1048576,wn)}function Ve(Zn){return c&&Zn.alternate===null&&(Zn.flags|=2),Zn}function Gt(Zn,wn,er,si){return wn===null||wn.tag!==6?(wn=mr(er,Zn.mode,si),wn.return=Zn,wn):(wn=Q(wn,er),wn.return=Zn,wn)}function pn(Zn,wn,er,si){var Ui=er.type;return Ui===G?zr(Zn,wn,er.props.children,si,er.key):wn!==null&&(wn.elementType===Ui||typeof Ui=="object"&&Ui!==null&&Ui.$$typeof===ee&&kc(Ui)===wn.type)?(si=Q(wn,er.props),si.ref=du(Zn,wn,er),si.return=Zn,si):(si=Dn(er.type,er.key,er.props,null,Zn.mode,si),si.ref=du(Zn,wn,er),si.return=Zn,si)}function ir(Zn,wn,er,si){return wn===null||wn.tag!==4||wn.stateNode.containerInfo!==er.containerInfo||wn.stateNode.implementation!==er.implementation?(wn=Nr(er,Zn.mode,si),wn.return=Zn,wn):(wn=Q(wn,er.children||[]),wn.return=Zn,wn)}function zr(Zn,wn,er,si,Ui){return wn===null||wn.tag!==7?(wn=Kn(er,Zn.mode,si,Ui),wn.return=Zn,wn):(wn=Q(wn,er),wn.return=Zn,wn)}function kr(Zn,wn,er){if(typeof wn=="string"&&wn!==""||typeof wn=="number")return wn=mr(""+wn,Zn.mode,er),wn.return=Zn,wn;if(typeof wn=="object"&&wn!==null){switch(wn.$$typeof){case z:return er=Dn(wn.type,wn.key,wn.props,null,Zn.mode,er),er.ref=du(Zn,null,wn),er.return=Zn,er;case K:return wn=Nr(wn,Zn.mode,er),wn.return=Zn,wn;case ee:var si=wn._init;return kr(Zn,si(wn._payload),er)}if($t(wn)||Ae(wn))return wn=Kn(wn,Zn.mode,er,null),wn.return=Zn,wn;hu(Zn,wn)}return null}function Hr(Zn,wn,er,si){var Ui=wn!==null?wn.key:null;if(typeof er=="string"&&er!==""||typeof er=="number")return Ui!==null?null:Gt(Zn,wn,""+er,si);if(typeof er=="object"&&er!==null){switch(er.$$typeof){case z:return er.key===Ui?pn(Zn,wn,er,si):null;case K:return er.key===Ui?ir(Zn,wn,er,si):null;case ee:return Ui=er._init,Hr(Zn,wn,Ui(er._payload),si)}if($t(er)||Ae(er))return Ui!==null?null:zr(Zn,wn,er,si,null);hu(Zn,er)}return null}function Ei(Zn,wn,er,si,Ui){if(typeof si=="string"&&si!==""||typeof si=="number")return Zn=Zn.get(er)||null,Gt(wn,Zn,""+si,Ui);if(typeof si=="object"&&si!==null){switch(si.$$typeof){case z:return Zn=Zn.get(si.key===null?er:si.key)||null,pn(wn,Zn,si,Ui);case K:return Zn=Zn.get(si.key===null?er:si.key)||null,ir(wn,Zn,si,Ui);case ee:var io=si._init;return Ei(Zn,wn,er,io(si._payload),Ui)}if($t(si)||Ae(si))return Zn=Zn.get(er)||null,zr(wn,Zn,si,Ui,null);hu(wn,si)}return null}function Ii(Zn,wn,er,si){for(var Ui=null,io=null,ro=wn,fo=wn=0,Sa=null;ro!==null&&fo<er.length;fo++){ro.index>fo?(Sa=ro,ro=null):Sa=ro.sibling;var ss=Hr(Zn,ro,er[fo],si);if(ss===null){ro===null&&(ro=Sa);break}c&&ro&&ss.alternate===null&&h(Zn,ro),wn=se(ss,wn,fo),io===null?Ui=ss:io.sibling=ss,io=ss,ro=Sa}if(fo===er.length)return M(Zn,ro),hs&&Pa(Zn,fo),Ui;if(ro===null){for(;fo<er.length;fo++)ro=kr(Zn,er[fo],si),ro!==null&&(wn=se(ro,wn,fo),io===null?Ui=ro:io.sibling=ro,io=ro);return hs&&Pa(Zn,fo),Ui}for(ro=I(Zn,ro);fo<er.length;fo++)Sa=Ei(ro,Zn,fo,er[fo],si),Sa!==null&&(c&&Sa.alternate!==null&&ro.delete(Sa.key===null?fo:Sa.key),wn=se(Sa,wn,fo),io===null?Ui=Sa:io.sibling=Sa,io=Sa);return c&&ro.forEach(function(Gu){return h(Zn,Gu)}),hs&&Pa(Zn,fo),Ui}function Ni(Zn,wn,er,si){var Ui=Ae(er);if(typeof Ui!="function")throw Error(d(150));if(er=Ui.call(er),er==null)throw Error(d(151));for(var io=Ui=null,ro=wn,fo=wn=0,Sa=null,ss=er.next();ro!==null&&!ss.done;fo++,ss=er.next()){ro.index>fo?(Sa=ro,ro=null):Sa=ro.sibling;var Gu=Hr(Zn,ro,ss.value,si);if(Gu===null){ro===null&&(ro=Sa);break}c&&ro&&Gu.alternate===null&&h(Zn,ro),wn=se(Gu,wn,fo),io===null?Ui=Gu:io.sibling=Gu,io=Gu,ro=Sa}if(ss.done)return M(Zn,ro),hs&&Pa(Zn,fo),Ui;if(ro===null){for(;!ss.done;fo++,ss=er.next())ss=kr(Zn,ss.value,si),ss!==null&&(wn=se(ss,wn,fo),io===null?Ui=ss:io.sibling=ss,io=ss);return hs&&Pa(Zn,fo),Ui}for(ro=I(Zn,ro);!ss.done;fo++,ss=er.next())ss=Ei(ro,Zn,fo,ss.value,si),ss!==null&&(c&&ss.alternate!==null&&ro.delete(ss.key===null?fo:ss.key),wn=se(ss,wn,fo),io===null?Ui=ss:io.sibling=ss,io=ss);return c&&ro.forEach(function(yh){return h(Zn,yh)}),hs&&Pa(Zn,fo),Ui}function ia(Zn,wn,er,si){if(typeof er=="object"&&er!==null&&er.type===G&&er.key===null&&(er=er.props.children),typeof er=="object"&&er!==null){switch(er.$$typeof){case z:e:{for(var Ui=er.key,io=wn;io!==null;){if(io.key===Ui){if(Ui=er.type,Ui===G){if(io.tag===7){M(Zn,io.sibling),wn=Q(io,er.props.children),wn.return=Zn,Zn=wn;break e}}else if(io.elementType===Ui||typeof Ui=="object"&&Ui!==null&&Ui.$$typeof===ee&&kc(Ui)===io.type){M(Zn,io.sibling),wn=Q(io,er.props),wn.ref=du(Zn,io,er),wn.return=Zn,Zn=wn;break e}M(Zn,io);break}else h(Zn,io);io=io.sibling}er.type===G?(wn=Kn(er.props.children,Zn.mode,si,er.key),wn.return=Zn,Zn=wn):(si=Dn(er.type,er.key,er.props,null,Zn.mode,si),si.ref=du(Zn,wn,er),si.return=Zn,Zn=si)}return Ve(Zn);case K:e:{for(io=er.key;wn!==null;){if(wn.key===io)if(wn.tag===4&&wn.stateNode.containerInfo===er.containerInfo&&wn.stateNode.implementation===er.implementation){M(Zn,wn.sibling),wn=Q(wn,er.children||[]),wn.return=Zn,Zn=wn;break e}else{M(Zn,wn);break}else h(Zn,wn);wn=wn.sibling}wn=Nr(er,Zn.mode,si),wn.return=Zn,Zn=wn}return Ve(Zn);case ee:return io=er._init,ia(Zn,wn,io(er._payload),si)}if($t(er))return Ii(Zn,wn,er,si);if(Ae(er))return Ni(Zn,wn,er,si);hu(Zn,er)}return typeof er=="string"&&er!==""||typeof er=="number"?(er=""+er,wn!==null&&wn.tag===6?(M(Zn,wn.sibling),wn=Q(wn,er),wn.return=Zn,Zn=wn):(M(Zn,wn),wn=mr(er,Zn.mode,si),wn.return=Zn,Zn=wn),Ve(Zn)):M(Zn,wn)}return ia}var ic=df(!0),hf=df(!1),pu={},pl=Ba(pu),Xl=Ba(pu),Vo=Ba(pu);function Dl(c){if(c===pu)throw Error(d(174));return c}function oc(c,h){switch(Bo(Vo,h),Bo(Xl,c),Bo(pl,pu),c=h.nodeType,c){case 9:case 11:h=(h=h.documentElement)?h.namespaceURI:Dt(null,"");break;default:c=c===8?h.parentNode:h,h=c.namespaceURI||null,c=c.tagName,h=Dt(h,c)}ds(pl),Bo(pl,h)}function sc(){ds(pl),ds(Xl),ds(Vo)}function pf(c){Dl(Vo.current);var h=Dl(pl.current),M=Dt(h,c.type);h!==M&&(Bo(Xl,c),Bo(pl,M))}function ql(c){Xl.current===c&&(ds(pl),ds(Xl))}var vs=Ba(0);function mu(c){for(var h=c;h!==null;){if(h.tag===13){var M=h.memoizedState;if(M!==null&&(M=M.dehydrated,M===null||M.data==="$?"||M.data==="$!"))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if(h.flags&128)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===c)break;for(;h.sibling===null;){if(h.return===null||h.return===c)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var ac=[];function jc(){for(var c=0;c<ac.length;c++)ac[c]._workInProgressVersionPrimary=null;ac.length=0}var Wa=j.ReactCurrentDispatcher,rs=j.ReactCurrentBatchConfig,za=0,Oo=null,Ts=null,Ho=null,Ns=!1,gu=!1,eu=0,qf=0;function Fs(){throw Error(d(321))}function Uc(c,h){if(h===null)return!1;for(var M=0;M<h.length&&M<c.length;M++)if(!bs(c[M],h[M]))return!1;return!0}function mf(c,h,M,I,Q,se){if(za=se,Oo=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,Wa.current=c===null||c.memoizedState===null?pc:Ff,c=M(I,Q),gu){se=0;do{if(gu=!1,eu=0,25<=se)throw Error(d(301));se+=1,Ho=Ts=null,h.updateQueue=null,Wa.current=Hc,c=M(I,Q)}while(gu)}if(Wa.current=hc,h=Ts!==null&&Ts.next!==null,za=0,Ho=Ts=Oo=null,Ns=!1,h)throw Error(d(300));return c}function lc(){var c=eu!==0;return eu=0,c}function ml(){var c={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ho===null?Oo.memoizedState=Ho=c:Ho=Ho.next=c,Ho}function Ca(){if(Ts===null){var c=Oo.alternate;c=c!==null?c.memoizedState:null}else c=Ts.next;var h=Ho===null?Oo.memoizedState:Ho.next;if(h!==null)Ho=h,Ts=c;else{if(c===null)throw Error(d(310));Ts=c,c={memoizedState:Ts.memoizedState,baseState:Ts.baseState,baseQueue:Ts.baseQueue,queue:Ts.queue,next:null},Ho===null?Oo.memoizedState=Ho=c:Ho=Ho.next=c}return Ho}function _u(c,h){return typeof h=="function"?h(c):h}function uc(c){var h=Ca(),M=h.queue;if(M===null)throw Error(d(311));M.lastRenderedReducer=c;var I=Ts,Q=I.baseQueue,se=M.pending;if(se!==null){if(Q!==null){var Ve=Q.next;Q.next=se.next,se.next=Ve}I.baseQueue=Q=se,M.pending=null}if(Q!==null){se=Q.next,I=I.baseState;var Gt=Ve=null,pn=null,ir=se;do{var zr=ir.lane;if((za&zr)===zr)pn!==null&&(pn=pn.next={lane:0,action:ir.action,hasEagerState:ir.hasEagerState,eagerState:ir.eagerState,next:null}),I=ir.hasEagerState?ir.eagerState:c(I,ir.action);else{var kr={lane:zr,action:ir.action,hasEagerState:ir.hasEagerState,eagerState:ir.eagerState,next:null};pn===null?(Gt=pn=kr,Ve=I):pn=pn.next=kr,Oo.lanes|=zr,zu|=zr}ir=ir.next}while(ir!==null&&ir!==se);pn===null?Ve=I:pn.next=Gt,bs(I,h.memoizedState)||(Js=!0),h.memoizedState=I,h.baseState=Ve,h.baseQueue=pn,M.lastRenderedState=I}if(c=M.interleaved,c!==null){Q=c;do se=Q.lane,Oo.lanes|=se,zu|=se,Q=Q.next;while(Q!==c)}else Q===null&&(M.lanes=0);return[h.memoizedState,M.dispatch]}function vu(c){var h=Ca(),M=h.queue;if(M===null)throw Error(d(311));M.lastRenderedReducer=c;var I=M.dispatch,Q=M.pending,se=h.memoizedState;if(Q!==null){M.pending=null;var Ve=Q=Q.next;do se=c(se,Ve.action),Ve=Ve.next;while(Ve!==Q);bs(se,h.memoizedState)||(Js=!0),h.memoizedState=se,h.baseQueue===null&&(h.baseState=se),M.lastRenderedState=se}return[se,I]}function gf(){}function yu(c,h){var M=Oo,I=Ca(),Q=h(),se=!bs(I.memoizedState,Q);if(se&&(I.memoizedState=Q,Js=!0),I=I.queue,zo(yf.bind(null,M,I,c),[c]),I.getSnapshot!==h||se||Ho!==null&&Ho.memoizedState.tag&1){if(M.flags|=2048,tu(9,vf.bind(null,M,I,Q,h),void 0,null),Bs===null)throw Error(d(349));za&30||cc(M,h,Q)}return Q}function cc(c,h,M){c.flags|=16384,c={getSnapshot:h,value:M},h=Oo.updateQueue,h===null?(h={lastEffect:null,stores:null},Oo.updateQueue=h,h.stores=[c]):(M=h.stores,M===null?h.stores=[c]:M.push(c))}function vf(c,h,M,I){h.value=M,h.getSnapshot=I,Lf(h)&&Pl(c)}function yf(c,h,M){return M(function(){Lf(h)&&Pl(c)})}function Lf(c){var h=c.getSnapshot;c=c.value;try{var M=h();return!bs(c,M)}catch{return!0}}function Pl(c){var h=rl(c,1);h!==null&&Kl(h,c,1,-1)}function Lu(c){var h=ml();return typeof c=="function"&&(c=c()),h.memoizedState=h.baseState=c,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_u,lastRenderedState:c},h.queue=c,c=c.dispatch=Di.bind(null,Oo,c),[h.memoizedState,c]}function tu(c,h,M,I){return c={tag:c,create:h,destroy:M,deps:I,next:null},h=Oo.updateQueue,h===null?(h={lastEffect:null,stores:null},Oo.updateQueue=h,h.lastEffect=c.next=c):(M=h.lastEffect,M===null?h.lastEffect=c.next=c:(I=M.next,M.next=c,c.next=I,h.lastEffect=c)),c}function Wc(){return Ca().memoizedState}function fc(c,h,M,I){var Q=ml();Oo.flags|=c,Q.memoizedState=tu(1|h,M,void 0,I===void 0?null:I)}function dc(c,h,M,I){var Q=Ca();I=I===void 0?null:I;var se=void 0;if(Ts!==null){var Ve=Ts.memoizedState;if(se=Ve.destroy,I!==null&&Uc(I,Ve.deps)){Q.memoizedState=tu(h,M,se,I);return}}Oo.flags|=c,Q.memoizedState=tu(1|h,M,se,I)}function Ef(c,h){return fc(8390656,8,c,h)}function zo(c,h){return dc(2048,8,c,h)}function $f(c,h){return dc(4,2,c,h)}function Al(c,h){return dc(4,4,c,h)}function zc(c,h){if(typeof h=="function")return c=c(),h(c),function(){h(null)};if(h!=null)return c=c(),h.current=c,function(){h.current=null}}function bf(c,h,M){return M=M!=null?M.concat([c]):null,dc(4,4,zc.bind(null,h,c),M)}function Qs(){}function Wl(c,h){var M=Ca();h=h===void 0?null:h;var I=M.memoizedState;return I!==null&&h!==null&&Uc(h,I[1])?I[0]:(M.memoizedState=[c,h],c)}function Nf(c,h){var M=Ca();h=h===void 0?null:h;var I=M.memoizedState;return I!==null&&h!==null&&Uc(h,I[1])?I[0]:(c=c(),M.memoizedState=[c,h],c)}function $u(c,h,M){return za&21?(bs(M,h)||(M=He(),Oo.lanes|=M,zu|=M,c.baseState=!0),h):(c.baseState&&(c.baseState=!1,Js=!0),c.memoizedState=M)}function fd(c,h){var M=Vt;Vt=M!==0&&4>M?M:4,c(!0);var I=rs.transition;rs.transition={};try{c(!1),h()}finally{Vt=M,rs.transition=I}}function Vc(){return Ca().memoizedState}function xf(c,h,M){var I=Zl(c);if(M={lane:I,action:M,hasEagerState:!1,eagerState:null,next:null},dd(c))cs(h,M);else if(M=Lc(c,h,M,I),M!==null){var Q=va();Kl(M,c,I,Q),Ra(M,h,I)}}function Di(c,h,M){var I=Zl(c),Q={lane:I,action:M,hasEagerState:!1,eagerState:null,next:null};if(dd(c))cs(h,Q);else{var se=c.alternate;if(c.lanes===0&&(se===null||se.lanes===0)&&(se=h.lastRenderedReducer,se!==null))try{var Ve=h.lastRenderedState,Gt=se(Ve,M);if(Q.hasEagerState=!0,Q.eagerState=Gt,bs(Gt,Ve)){var pn=h.interleaved;pn===null?(Q.next=Q,lf(h)):(Q.next=pn.next,pn.next=Q),h.interleaved=Q;return}}catch{}finally{}M=Lc(c,h,Q,I),M!==null&&(Q=va(),Kl(M,c,I,Q),Ra(M,h,I))}}function dd(c){var h=c.alternate;return c===Oo||h!==null&&h===Oo}function cs(c,h){gu=Ns=!0;var M=c.pending;M===null?h.next=h:(h.next=M.next,M.next=h),c.pending=h}function Ra(c,h,M){if(M&4194240){var I=h.lanes;I&=c.pendingLanes,M|=I,h.lanes=M,qt(c,M)}}var hc={readContext:Ua,useCallback:Fs,useContext:Fs,useEffect:Fs,useImperativeHandle:Fs,useInsertionEffect:Fs,useLayoutEffect:Fs,useMemo:Fs,useReducer:Fs,useRef:Fs,useState:Fs,useDebugValue:Fs,useDeferredValue:Fs,useTransition:Fs,useMutableSource:Fs,useSyncExternalStore:Fs,useId:Fs,unstable_isNewReconciler:!1},pc={readContext:Ua,useCallback:function(c,h){return ml().memoizedState=[c,h===void 0?null:h],c},useContext:Ua,useEffect:Ef,useImperativeHandle:function(c,h,M){return M=M!=null?M.concat([c]):null,fc(4194308,4,zc.bind(null,h,c),M)},useLayoutEffect:function(c,h){return fc(4194308,4,c,h)},useInsertionEffect:function(c,h){return fc(4,2,c,h)},useMemo:function(c,h){var M=ml();return h=h===void 0?null:h,c=c(),M.memoizedState=[c,h],c},useReducer:function(c,h,M){var I=ml();return h=M!==void 0?M(h):h,I.memoizedState=I.baseState=h,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:h},I.queue=c,c=c.dispatch=xf.bind(null,Oo,c),[I.memoizedState,c]},useRef:function(c){var h=ml();return c={current:c},h.memoizedState=c},useState:Lu,useDebugValue:Qs,useDeferredValue:function(c){return ml().memoizedState=c},useTransition:function(){var c=Lu(!1),h=c[0];return c=fd.bind(null,c[1]),ml().memoizedState=c,[h,c]},useMutableSource:function(){},useSyncExternalStore:function(c,h,M){var I=Oo,Q=ml();if(hs){if(M===void 0)throw Error(d(407));M=M()}else{if(M=h(),Bs===null)throw Error(d(349));za&30||cc(I,h,M)}Q.memoizedState=M;var se={value:M,getSnapshot:h};return Q.queue=se,Ef(yf.bind(null,I,se,c),[c]),I.flags|=2048,tu(9,vf.bind(null,I,se,M,h),void 0,null),M},useId:function(){var c=ml(),h=Bs.identifierPrefix;if(hs){var M=nl,I=tl;M=(I&~(1<<32-Yt(I)-1)).toString(32)+M,h=":"+h+"R"+M,M=eu++,0<M&&(h+="H"+M.toString(32)),h+=":"}else M=qf++,h=":"+h+"r"+M.toString(32)+":";return c.memoizedState=h},unstable_isNewReconciler:!1},Ff={readContext:Ua,useCallback:Wl,useContext:Ua,useEffect:zo,useImperativeHandle:bf,useInsertionEffect:$f,useLayoutEffect:Al,useMemo:Nf,useReducer:uc,useRef:Wc,useState:function(){return uc(_u)},useDebugValue:Qs,useDeferredValue:function(c){var h=Ca();return $u(h,Ts.memoizedState,c)},useTransition:function(){var c=uc(_u)[0],h=Ca().memoizedState;return[c,h]},useMutableSource:gf,useSyncExternalStore:yu,useId:Vc,unstable_isNewReconciler:!1},Hc={readContext:Ua,useCallback:Wl,useContext:Ua,useEffect:zo,useImperativeHandle:bf,useInsertionEffect:$f,useLayoutEffect:Al,useMemo:Nf,useReducer:vu,useRef:Wc,useState:function(){return vu(_u)},useDebugValue:Qs,useDeferredValue:function(c){var h=Ca();return Ts===null?h.memoizedState=c:$u(h,Ts.memoizedState,c)},useTransition:function(){var c=vu(_u)[0],h=Ca().memoizedState;return[c,h]},useMutableSource:gf,useSyncExternalStore:yu,useId:Vc,unstable_isNewReconciler:!1};function zl(c,h){try{var M="",I=h;do M+=We(I),I=I.return;while(I);var Q=M}catch(se){Q=`
1155
1155
  Error generating stack: `+se.message+`
1156
- `+se.stack}return{value:c,source:h,stack:Q,digest:null}}function Eu(c,h,M){return{value:c,source:null,stack:M??null,digest:h??null}}function Rl(c,h){try{console.error(h.value)}catch(M){setTimeout(function(){throw M})}}var mc=typeof WeakMap=="function"?WeakMap:Map;function Cf(c,h,M){M=il(-1,M),M.tag=3,M.payload={element:null};var I=h.value;return M.callback=function(){Mi||(Mi=!0,Gi=I),Rl(c,h)},M}function Il(c,h,M){M=il(-1,M),M.tag=3;var I=c.type.getDerivedStateFromError;if(typeof I=="function"){var Q=h.value;M.payload=function(){return I(Q)},M.callback=function(){Rl(c,h)}}var se=c.stateNode;return se!==null&&typeof se.componentDidCatch=="function"&&(M.callback=function(){Rl(c,h),typeof I!="function"&&(ao===null?ao=new Set([this]):ao.add(this));var Ve=h.stack;this.componentDidCatch(h.value,{componentStack:Ve!==null?Ve:""})}),M}function Bf(c,h,M){var I=c.pingCache;if(I===null){I=c.pingCache=new mc;var Q=new Set;I.set(h,Q)}else Q=I.get(h),Q===void 0&&(Q=new Set,I.set(h,Q));Q.has(M)||(Q.add(M),c=sd.bind(null,c,h,M),h.then(c,c))}function ed(c){do{var h;if((h=c.tag===13)&&(h=c.memoizedState,h=h!==null?h.dehydrated!==null:!0),h)return c;c=c.return}while(c!==null);return null}function Mf(c,h,M,I,Q){return c.mode&1?(c.flags|=65536,c.lanes=Q,c):(c===h?c.flags|=65536:(c.flags|=128,M.flags|=131072,M.flags&=-52805,M.tag===1&&(M.alternate===null?M.tag=17:(h=il(-1,1),h.tag=2,Aa(M,h,1))),M.lanes|=1),c)}var gc=j.ReactCurrentOwner,Js=!1;function ma(c,h,M,I){h.child=c===null?hf(h,null,M,I):ic(h,c.child,M,I)}function Sf(c,h,M,I,Q){M=M.render;var se=h.ref;return fu(h,Q),I=mf(c,h,M,I,se,Q),M=lc(),c!==null&&!Js?(h.updateQueue=c.updateQueue,h.flags&=-2053,c.lanes&=~Q,nu(c,h,Q)):(hs&&M&&Tu(h),h.flags|=1,ma(c,h,I,Q),h.child)}function Of(c,h,M,I,Q){if(c===null){var se=M.type;return typeof se=="function"&&!Je(se)&&se.defaultProps===void 0&&M.compare===null&&M.defaultProps===void 0?(h.tag=15,h.type=se,kf(c,h,se,I,Q)):(c=Dn(M.type,null,I,h,h.mode,Q),c.ref=h.ref,c.return=h,h.child=c)}if(se=c.child,!(c.lanes&Q)){var Ve=se.memoizedProps;if(M=M.compare,M=M!==null?M:ca,M(Ve,I)&&c.ref===h.ref)return nu(c,h,Q)}return h.flags|=1,c=sn(se,I),c.ref=h.ref,c.return=h,h.child=c}function kf(c,h,M,I,Q){if(c!==null){var se=c.memoizedProps;if(ca(se,I)&&c.ref===h.ref)if(Js=!1,h.pendingProps=I=se,(c.lanes&Q)!==0)c.flags&131072&&(Js=!0);else return h.lanes=c.lanes,nu(c,h,Q)}return yc(c,h,M,I,Q)}function Va(c,h,M){var I=h.pendingProps,Q=I.children,se=c!==null?c.memoizedState:null;if(I.mode==="hidden")if(!(h.mode&1))h.memoizedState={baseLanes:0,cachePool:null,transitions:null},Bo(Wu,Ga),Ga|=M;else{if(!(M&1073741824))return c=se!==null?se.baseLanes|M:M,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:c,cachePool:null,transitions:null},h.updateQueue=null,Bo(Wu,Ga),Ga|=c,null;h.memoizedState={baseLanes:0,cachePool:null,transitions:null},I=se!==null?se.baseLanes:M,Bo(Wu,Ga),Ga|=I}else se!==null?(I=se.baseLanes|M,h.memoizedState=null):I=M,Bo(Wu,Ga),Ga|=I;return ma(c,h,Q,M),h.child}function vc(c,h){var M=h.ref;(c===null&&M!==null||c!==null&&c.ref!==M)&&(h.flags|=512,h.flags|=2097152)}function yc(c,h,M,I,Q){var se=na(M)?Ml:$s.current;return se=qa(h,se),fu(h,Q),M=mf(c,h,M,I,se,Q),I=lc(),c!==null&&!Js?(h.updateQueue=c.updateQueue,h.flags&=-2053,c.lanes&=~Q,nu(c,h,Q)):(hs&&I&&Tu(h),h.flags|=1,ma(c,h,M,Q),h.child)}function Zc(c,h,M,I,Q){if(na(M)){var se=!0;au(h)}else se=!1;if(fu(h,Q),h.stateNode===null)Gc(c,h),_f(h,M,I),ff(h,M,I,Q),I=!0;else if(c===null){var Ve=h.stateNode,Gt=h.memoizedProps;Ve.props=Gt;var pn=Ve.context,ir=M.contextType;typeof ir=="object"&&ir!==null?ir=Ua(ir):(ir=na(M)?Ml:$s.current,ir=qa(h,ir));var zr=M.getDerivedStateFromProps,kr=typeof zr=="function"||typeof Ve.getSnapshotBeforeUpdate=="function";kr||typeof Ve.UNSAFE_componentWillReceiveProps!="function"&&typeof Ve.componentWillReceiveProps!="function"||(Gt!==I||pn!==ir)&&cf(h,Ve,I,ir),wl=!1;var Hr=h.memoizedState;Ve.state=Hr,nc(h,I,Ve,Q),pn=h.memoizedState,Gt!==I||Hr!==pn||da.current||wl?(typeof zr=="function"&&(As(h,M,zr,I),pn=h.memoizedState),(Gt=wl||uf(h,M,Gt,I,Hr,pn,ir))?(kr||typeof Ve.UNSAFE_componentWillMount!="function"&&typeof Ve.componentWillMount!="function"||(typeof Ve.componentWillMount=="function"&&Ve.componentWillMount(),typeof Ve.UNSAFE_componentWillMount=="function"&&Ve.UNSAFE_componentWillMount()),typeof Ve.componentDidMount=="function"&&(h.flags|=4194308)):(typeof Ve.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=I,h.memoizedState=pn),Ve.props=I,Ve.state=pn,Ve.context=ir,I=Gt):(typeof Ve.componentDidMount=="function"&&(h.flags|=4194308),I=!1)}else{Ve=h.stateNode,Nc(c,h),Gt=h.memoizedProps,ir=h.type===h.elementType?Gt:ja(h.type,Gt),Ve.props=ir,kr=h.pendingProps,Hr=Ve.context,pn=M.contextType,typeof pn=="object"&&pn!==null?pn=Ua(pn):(pn=na(M)?Ml:$s.current,pn=qa(h,pn));var Ei=M.getDerivedStateFromProps;(zr=typeof Ei=="function"||typeof Ve.getSnapshotBeforeUpdate=="function")||typeof Ve.UNSAFE_componentWillReceiveProps!="function"&&typeof Ve.componentWillReceiveProps!="function"||(Gt!==kr||Hr!==pn)&&cf(h,Ve,I,pn),wl=!1,Hr=h.memoizedState,Ve.state=Hr,nc(h,I,Ve,Q);var Ii=h.memoizedState;Gt!==kr||Hr!==Ii||da.current||wl?(typeof Ei=="function"&&(As(h,M,Ei,I),Ii=h.memoizedState),(ir=wl||uf(h,M,ir,I,Hr,Ii,pn)||!1)?(zr||typeof Ve.UNSAFE_componentWillUpdate!="function"&&typeof Ve.componentWillUpdate!="function"||(typeof Ve.componentWillUpdate=="function"&&Ve.componentWillUpdate(I,Ii,pn),typeof Ve.UNSAFE_componentWillUpdate=="function"&&Ve.UNSAFE_componentWillUpdate(I,Ii,pn)),typeof Ve.componentDidUpdate=="function"&&(h.flags|=4),typeof Ve.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof Ve.componentDidUpdate!="function"||Gt===c.memoizedProps&&Hr===c.memoizedState||(h.flags|=4),typeof Ve.getSnapshotBeforeUpdate!="function"||Gt===c.memoizedProps&&Hr===c.memoizedState||(h.flags|=1024),h.memoizedProps=I,h.memoizedState=Ii),Ve.props=I,Ve.state=Ii,Ve.context=pn,I=ir):(typeof Ve.componentDidUpdate!="function"||Gt===c.memoizedProps&&Hr===c.memoizedState||(h.flags|=4),typeof Ve.getSnapshotBeforeUpdate!="function"||Gt===c.memoizedProps&&Hr===c.memoizedState||(h.flags|=1024),I=!1)}return Nu(c,h,M,I,se,Q)}function Nu(c,h,M,I,Q,se){vc(c,h);var Ve=(h.flags&128)!==0;if(!I&&!Ve)return Q&&ts(h,M,!1),nu(c,h,se);I=h.stateNode,gc.current=h;var Gt=Ve&&typeof M.getDerivedStateFromError!="function"?null:I.render();return h.flags|=1,c!==null&&Ve?(h.child=ic(h,c.child,null,se),h.child=ic(h,null,Gt,se)):ma(c,h,Gt,se),h.memoizedState=I.state,Q&&ts(h,M,!0),h.child}function jf(c){var h=c.stateNode;h.pendingContext?Sl(c,h.pendingContext,h.pendingContext!==h.context):h.context&&Sl(c,h.context,!1),oc(c,h.containerInfo)}function Tf(c,h,M,I,Q){return cu(),af(Q),h.flags|=256,ma(c,h,M,I),h.child}var wf={dehydrated:null,treeContext:null,retryLane:0};function Ec(c){return{baseLanes:c,cachePool:null,transitions:null}}function Uf(c,h,M){var I=h.pendingProps,Q=vs.current,se=!1,Ve=(h.flags&128)!==0,Gt;if((Gt=Ve)||(Gt=c!==null&&c.memoizedState===null?!1:(Q&2)!==0),Gt?(se=!0,h.flags&=-129):(c===null||c.memoizedState!==null)&&(Q|=1),Bo(vs,Q&1),c===null)return wu(h),c=h.memoizedState,c!==null&&(c=c.dehydrated,c!==null)?(h.mode&1?c.data==="$!"?h.lanes=8:h.lanes=1073741824:h.lanes=1,null):(Ve=I.children,c=I.fallback,se?(I=h.mode,se=h.child,Ve={mode:"hidden",children:Ve},!(I&1)&&se!==null?(se.childLanes=0,se.pendingProps=Ve):se=Dr(Ve,I,0,null),c=Kn(c,I,M,null),se.return=h,c.return=h,se.sibling=c,h.child=se,h.child.memoizedState=Ec(M),h.memoizedState=wf,c):zl(h,Ve));if(Q=c.memoizedState,Q!==null&&(Gt=Q.dehydrated,Gt!==null))return Wf(c,h,Ve,I,Gt,Q,M);if(se){se=I.fallback,Ve=h.mode,Q=c.child,Gt=Q.sibling;var pn={mode:"hidden",children:I.children};return!(Ve&1)&&h.child!==Q?(I=h.child,I.childLanes=0,I.pendingProps=pn,h.deletions=null):(I=sn(Q,pn),I.subtreeFlags=Q.subtreeFlags&14680064),Gt!==null?se=sn(Gt,se):(se=Kn(se,Ve,M,null),se.flags|=2),se.return=h,I.return=h,I.sibling=se,h.child=I,I=se,se=h.child,Ve=c.child.memoizedState,Ve=Ve===null?Ec(M):{baseLanes:Ve.baseLanes|M,cachePool:null,transitions:Ve.transitions},se.memoizedState=Ve,se.childLanes=c.childLanes&~M,h.memoizedState=wf,I}return se=c.child,c=se.sibling,I=sn(se,{mode:"visible",children:I.children}),!(h.mode&1)&&(I.lanes=M),I.return=h,I.sibling=null,c!==null&&(M=h.deletions,M===null?(h.deletions=[c],h.flags|=16):M.push(c)),h.child=I,h.memoizedState=null,I}function zl(c,h){return h=Dr({mode:"visible",children:h},c.mode,0,null),h.return=c,c.child=h}function Kc(c,h,M,I){return I!==null&&af(I),ic(h,c.child,null,M),c=zl(h,h.pendingProps.children),c.flags|=2,h.memoizedState=null,c}function Wf(c,h,M,I,Q,se,Ve){if(M)return h.flags&256?(h.flags&=-257,I=Eu(Error(d(422))),Kc(c,h,Ve,I)):h.memoizedState!==null?(h.child=c.child,h.flags|=128,null):(se=I.fallback,Q=h.mode,I=Dr({mode:"visible",children:I.children},Q,0,null),se=Kn(se,Q,Ve,null),se.flags|=2,I.return=h,se.return=h,I.sibling=se,h.child=I,h.mode&1&&ic(h,c.child,null,Ve),h.child.memoizedState=Ec(Ve),h.memoizedState=wf,se);if(!(h.mode&1))return Kc(c,h,Ve,null);if(Q.data==="$!"){if(I=Q.nextSibling&&Q.nextSibling.dataset,I)var Gt=I.dgst;return I=Gt,se=Error(d(419)),I=Eu(se,I,void 0),Kc(c,h,Ve,I)}if(Gt=(Ve&c.childLanes)!==0,Js||Gt){if(I=Bs,I!==null){switch(Ve&-Ve){case 4:Q=2;break;case 16:Q=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:Q=32;break;case 536870912:Q=268435456;break;default:Q=0}Q=Q&(I.suspendedLanes|Ve)?0:Q,Q!==0&&Q!==se.retryLane&&(se.retryLane=Q,rl(c,Q),Zl(I,c,Q,-1))}return Zf(),I=Eu(Error(d(421))),Kc(c,h,Ve,I)}return Q.data==="$?"?(h.flags|=128,h.child=c.child,h=me.bind(null,c),Q._reactRetry=h,null):(c=se.treeContext,xa=Is(Q.nextSibling),ha=h,hs=!0,hl=null,c!==null&&(_o[ka++]=tl,_o[ka++]=nl,_o[ka++]=Tl,tl=c.id,nl=c.overflow,Tl=h),h=zl(h,I.children),h.flags|=4096,h)}function Fu(c,h,M){c.lanes|=h;var I=c.alternate;I!==null&&(I.lanes|=h),tc(c.return,h,M)}function td(c,h,M,I,Q){var se=c.memoizedState;se===null?c.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:I,tail:M,tailMode:Q}:(se.isBackwards=h,se.rendering=null,se.renderingStartTime=0,se.last=I,se.tail=M,se.tailMode=Q)}function nd(c,h,M){var I=h.pendingProps,Q=I.revealOrder,se=I.tail;if(ma(c,h,I.children,M),I=vs.current,I&2)I=I&1|2,h.flags|=128;else{if(c!==null&&c.flags&128)e:for(c=h.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&Fu(c,M,h);else if(c.tag===19)Fu(c,M,h);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===h)break e;for(;c.sibling===null;){if(c.return===null||c.return===h)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}I&=1}if(Bo(vs,I),!(h.mode&1))h.memoizedState=null;else switch(Q){case"forwards":for(M=h.child,Q=null;M!==null;)c=M.alternate,c!==null&&mu(c)===null&&(Q=M),M=M.sibling;M=Q,M===null?(Q=h.child,h.child=null):(Q=M.sibling,M.sibling=null),td(h,!1,Q,M,se);break;case"backwards":for(M=null,Q=h.child,h.child=null;Q!==null;){if(c=Q.alternate,c!==null&&mu(c)===null){h.child=Q;break}c=Q.sibling,Q.sibling=M,M=Q,Q=c}td(h,!0,M,null,se);break;case"together":td(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function Gc(c,h){!(h.mode&1)&&c!==null&&(c.alternate=null,h.alternate=null,h.flags|=2)}function nu(c,h,M){if(c!==null&&(h.dependencies=c.dependencies),zu|=h.lanes,!(M&h.childLanes))return null;if(c!==null&&h.child!==c.child)throw Error(d(153));if(h.child!==null){for(c=h.child,M=sn(c,c.pendingProps),h.child=M,M.return=h;c.sibling!==null;)c=c.sibling,M=M.sibling=sn(c,c.pendingProps),M.return=h;M.sibling=null}return h.child}function ce(c,h,M){switch(h.tag){case 3:jf(h),cu();break;case 5:pf(h);break;case 1:na(h.type)&&au(h);break;case 4:oc(h,h.stateNode.containerInfo);break;case 10:var I=h.type._context,Q=h.memoizedProps.value;Bo(Du,I._currentValue),I._currentValue=Q;break;case 13:if(I=h.memoizedState,I!==null)return I.dehydrated!==null?(Bo(vs,vs.current&1),h.flags|=128,null):M&h.child.childLanes?Uf(c,h,M):(Bo(vs,vs.current&1),c=nu(c,h,M),c!==null?c.sibling:null);Bo(vs,vs.current&1);break;case 19:if(I=(M&h.childLanes)!==0,c.flags&128){if(I)return nd(c,h,M);h.flags|=128}if(Q=h.memoizedState,Q!==null&&(Q.rendering=null,Q.tail=null,Q.lastEffect=null),Bo(vs,vs.current),I)break;return null;case 22:case 23:return h.lanes=0,Va(c,h,M)}return nu(c,h,M)}var et,Wt,mn,gn;et=function(c,h){for(var M=h.child;M!==null;){if(M.tag===5||M.tag===6)c.appendChild(M.stateNode);else if(M.tag!==4&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===h)break;for(;M.sibling===null;){if(M.return===null||M.return===h)return;M=M.return}M.sibling.return=M.return,M=M.sibling}},Wt=function(){},mn=function(c,h,M,I){var Q=c.memoizedProps;if(Q!==I){c=h.stateNode,Dl(pl.current);var se=null;switch(M){case"input":Q=lt(c,Q),I=lt(c,I),se=[];break;case"select":Q=pe({},Q,{value:void 0}),I=pe({},I,{value:void 0}),se=[];break;case"textarea":Q=Yn(c,Q),I=Yn(c,I),se=[];break;default:typeof Q.onClick!="function"&&typeof I.onClick=="function"&&(c.onclick=ba)}Ze(M,I);var Ve;M=null;for(ir in Q)if(!I.hasOwnProperty(ir)&&Q.hasOwnProperty(ir)&&Q[ir]!=null)if(ir==="style"){var Gt=Q[ir];for(Ve in Gt)Gt.hasOwnProperty(Ve)&&(M||(M={}),M[Ve]="")}else ir!=="dangerouslySetInnerHTML"&&ir!=="children"&&ir!=="suppressContentEditableWarning"&&ir!=="suppressHydrationWarning"&&ir!=="autoFocus"&&(E.hasOwnProperty(ir)?se||(se=[]):(se=se||[]).push(ir,null));for(ir in I){var pn=I[ir];if(Gt=Q?.[ir],I.hasOwnProperty(ir)&&pn!==Gt&&(pn!=null||Gt!=null))if(ir==="style")if(Gt){for(Ve in Gt)!Gt.hasOwnProperty(Ve)||pn&&pn.hasOwnProperty(Ve)||(M||(M={}),M[Ve]="");for(Ve in pn)pn.hasOwnProperty(Ve)&&Gt[Ve]!==pn[Ve]&&(M||(M={}),M[Ve]=pn[Ve])}else M||(se||(se=[]),se.push(ir,M)),M=pn;else ir==="dangerouslySetInnerHTML"?(pn=pn?pn.__html:void 0,Gt=Gt?Gt.__html:void 0,pn!=null&&Gt!==pn&&(se=se||[]).push(ir,pn)):ir==="children"?typeof pn!="string"&&typeof pn!="number"||(se=se||[]).push(ir,""+pn):ir!=="suppressContentEditableWarning"&&ir!=="suppressHydrationWarning"&&(E.hasOwnProperty(ir)?(pn!=null&&ir==="onScroll"&&no("scroll",c),se||Gt===pn||(se=[])):(se=se||[]).push(ir,pn))}M&&(se=se||[]).push("style",M);var ir=se;(h.updateQueue=ir)&&(h.flags|=4)}},gn=function(c,h,M,I){M!==I&&(h.flags|=4)};function nr(c,h){if(!hs)switch(c.tailMode){case"hidden":h=c.tail;for(var M=null;h!==null;)h.alternate!==null&&(M=h),h=h.sibling;M===null?c.tail=null:M.sibling=null;break;case"collapsed":M=c.tail;for(var I=null;M!==null;)M.alternate!==null&&(I=M),M=M.sibling;I===null?h||c.tail===null?c.tail=null:c.tail.sibling=null:I.sibling=null}}function dr(c){var h=c.alternate!==null&&c.alternate.child===c.child,M=0,I=0;if(h)for(var Q=c.child;Q!==null;)M|=Q.lanes|Q.childLanes,I|=Q.subtreeFlags&14680064,I|=Q.flags&14680064,Q.return=c,Q=Q.sibling;else for(Q=c.child;Q!==null;)M|=Q.lanes|Q.childLanes,I|=Q.subtreeFlags,I|=Q.flags,Q.return=c,Q=Q.sibling;return c.subtreeFlags|=I,c.childLanes=M,h}function ri(c,h,M){var I=h.pendingProps;switch(Pc(h),h.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dr(h),null;case 1:return na(h.type)&&su(),dr(h),null;case 3:return I=h.stateNode,sc(),ds(da),ds($s),jc(),I.pendingContext&&(I.context=I.pendingContext,I.pendingContext=null),(c===null||c.child===null)&&(_c(h)?h.flags|=4:c===null||c.memoizedState.isDehydrated&&!(h.flags&256)||(h.flags|=1024,hl!==null&&(If(hl),hl=null))),Wt(c,h),dr(h),null;case 5:ql(h);var Q=Dl(Vo.current);if(M=h.type,c!==null&&h.stateNode!=null)mn(c,h,M,I,Q),c.ref!==h.ref&&(h.flags|=512,h.flags|=2097152);else{if(!I){if(h.stateNode===null)throw Error(d(166));return dr(h),null}if(c=Dl(pl.current),_c(h)){I=h.stateNode,M=h.type;var se=h.memoizedProps;switch(I[Fa]=h,I[Ss]=se,c=(h.mode&1)!==0,M){case"dialog":no("cancel",I),no("close",I);break;case"iframe":case"object":case"embed":no("load",I);break;case"video":case"audio":for(Q=0;Q<xr.length;Q++)no(xr[Q],I);break;case"source":no("error",I);break;case"img":case"image":case"link":no("error",I),no("load",I);break;case"details":no("toggle",I);break;case"input":kt(I,se),no("invalid",I);break;case"select":I._wrapperState={wasMultiple:!!se.multiple},no("invalid",I);break;case"textarea":cn(I,se),no("invalid",I)}Ze(M,se),Q=null;for(var Ve in se)if(se.hasOwnProperty(Ve)){var Gt=se[Ve];Ve==="children"?typeof Gt=="string"?I.textContent!==Gt&&(se.suppressHydrationWarning!==!0&&Bl(I.textContent,Gt,c),Q=["children",Gt]):typeof Gt=="number"&&I.textContent!==""+Gt&&(se.suppressHydrationWarning!==!0&&Bl(I.textContent,Gt,c),Q=["children",""+Gt]):E.hasOwnProperty(Ve)&&Gt!=null&&Ve==="onScroll"&&no("scroll",I)}switch(M){case"input":Ue(I),Rn(I,se,!0);break;case"textarea":Ue(I),on(I);break;case"select":case"option":break;default:typeof se.onClick=="function"&&(I.onclick=ba)}I=Q,h.updateQueue=I,I!==null&&(h.flags|=4)}else{Ve=Q.nodeType===9?Q:Q.ownerDocument,c==="http://www.w3.org/1999/xhtml"&&(c=dt(M)),c==="http://www.w3.org/1999/xhtml"?M==="script"?(c=Ve.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild)):typeof I.is=="string"?c=Ve.createElement(M,{is:I.is}):(c=Ve.createElement(M),M==="select"&&(Ve=c,I.multiple?Ve.multiple=!0:I.size&&(Ve.size=I.size))):c=Ve.createElementNS(c,M),c[Fa]=h,c[Ss]=I,et(c,h,!1,!1),h.stateNode=c;e:{switch(Ve=pt(M,I),M){case"dialog":no("cancel",c),no("close",c),Q=I;break;case"iframe":case"object":case"embed":no("load",c),Q=I;break;case"video":case"audio":for(Q=0;Q<xr.length;Q++)no(xr[Q],c);Q=I;break;case"source":no("error",c),Q=I;break;case"img":case"image":case"link":no("error",c),no("load",c),Q=I;break;case"details":no("toggle",c),Q=I;break;case"input":kt(c,I),Q=lt(c,I),no("invalid",c);break;case"option":Q=I;break;case"select":c._wrapperState={wasMultiple:!!I.multiple},Q=pe({},I,{value:void 0}),no("invalid",c);break;case"textarea":cn(c,I),Q=Yn(c,I),no("invalid",c);break;default:Q=I}Ze(M,Q),Gt=Q;for(se in Gt)if(Gt.hasOwnProperty(se)){var pn=Gt[se];se==="style"?re(c,pn):se==="dangerouslySetInnerHTML"?(pn=pn?pn.__html:void 0,pn!=null&&rn(c,pn)):se==="children"?typeof pn=="string"?(M!=="textarea"||pn!=="")&&ke(c,pn):typeof pn=="number"&&ke(c,""+pn):se!=="suppressContentEditableWarning"&&se!=="suppressHydrationWarning"&&se!=="autoFocus"&&(E.hasOwnProperty(se)?pn!=null&&se==="onScroll"&&no("scroll",c):pn!=null&&k(c,se,pn,Ve))}switch(M){case"input":Ue(c),Rn(c,I,!1);break;case"textarea":Ue(c),on(c);break;case"option":I.value!=null&&c.setAttribute("value",""+ut(I.value));break;case"select":c.multiple=!!I.multiple,se=I.value,se!=null?yn(c,!!I.multiple,se,!1):I.defaultValue!=null&&yn(c,!!I.multiple,I.defaultValue,!0);break;default:typeof Q.onClick=="function"&&(c.onclick=ba)}switch(M){case"button":case"input":case"select":case"textarea":I=!!I.autoFocus;break e;case"img":I=!0;break e;default:I=!1}}I&&(h.flags|=4)}h.ref!==null&&(h.flags|=512,h.flags|=2097152)}return dr(h),null;case 6:if(c&&h.stateNode!=null)gn(c,h,c.memoizedProps,I);else{if(typeof I!="string"&&h.stateNode===null)throw Error(d(166));if(M=Dl(Vo.current),Dl(pl.current),_c(h)){if(I=h.stateNode,M=h.memoizedProps,I[Fa]=h,(se=I.nodeValue!==M)&&(c=ha,c!==null))switch(c.tag){case 3:Bl(I.nodeValue,M,(c.mode&1)!==0);break;case 5:c.memoizedProps.suppressHydrationWarning!==!0&&Bl(I.nodeValue,M,(c.mode&1)!==0)}se&&(h.flags|=4)}else I=(M.nodeType===9?M:M.ownerDocument).createTextNode(I),I[Fa]=h,h.stateNode=I}return dr(h),null;case 13:if(ds(vs),I=h.memoizedState,c===null||c.memoizedState!==null&&c.memoizedState.dehydrated!==null){if(hs&&xa!==null&&h.mode&1&&!(h.flags&128))Qf(),cu(),h.flags|=98560,se=!1;else if(se=_c(h),I!==null&&I.dehydrated!==null){if(c===null){if(!se)throw Error(d(318));if(se=h.memoizedState,se=se!==null?se.dehydrated:null,!se)throw Error(d(317));se[Fa]=h}else cu(),!(h.flags&128)&&(h.memoizedState=null),h.flags|=4;dr(h),se=!1}else hl!==null&&(If(hl),hl=null),se=!0;if(!se)return h.flags&65536?h:null}return h.flags&128?(h.lanes=M,h):(I=I!==null,I!==(c!==null&&c.memoizedState!==null)&&I&&(h.child.flags|=8192,h.mode&1&&(c===null||vs.current&1?Vs===0&&(Vs=3):Zf())),h.updateQueue!==null&&(h.flags|=4),dr(h),null);case 4:return sc(),Wt(c,h),c===null&&Ks(h.stateNode.containerInfo),dr(h),null;case 10:return Ru(h.type._context),dr(h),null;case 17:return na(h.type)&&su(),dr(h),null;case 19:if(ds(vs),se=h.memoizedState,se===null)return dr(h),null;if(I=(h.flags&128)!==0,Ve=se.rendering,Ve===null)if(I)nr(se,!1);else{if(Vs!==0||c!==null&&c.flags&128)for(c=h.child;c!==null;){if(Ve=mu(c),Ve!==null){for(h.flags|=128,nr(se,!1),I=Ve.updateQueue,I!==null&&(h.updateQueue=I,h.flags|=4),h.subtreeFlags=0,I=M,M=h.child;M!==null;)se=M,c=I,se.flags&=14680066,Ve=se.alternate,Ve===null?(se.childLanes=0,se.lanes=c,se.child=null,se.subtreeFlags=0,se.memoizedProps=null,se.memoizedState=null,se.updateQueue=null,se.dependencies=null,se.stateNode=null):(se.childLanes=Ve.childLanes,se.lanes=Ve.lanes,se.child=Ve.child,se.subtreeFlags=0,se.deletions=null,se.memoizedProps=Ve.memoizedProps,se.memoizedState=Ve.memoizedState,se.updateQueue=Ve.updateQueue,se.type=Ve.type,c=Ve.dependencies,se.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext}),M=M.sibling;return Bo(vs,vs.current&1|2),h.child}c=c.sibling}se.tail!==null&&Ke()>sr&&(h.flags|=128,I=!0,nr(se,!1),h.lanes=4194304)}else{if(!I)if(c=mu(Ve),c!==null){if(h.flags|=128,I=!0,M=c.updateQueue,M!==null&&(h.updateQueue=M,h.flags|=4),nr(se,!0),se.tail===null&&se.tailMode==="hidden"&&!Ve.alternate&&!hs)return dr(h),null}else 2*Ke()-se.renderingStartTime>sr&&M!==1073741824&&(h.flags|=128,I=!0,nr(se,!1),h.lanes=4194304);se.isBackwards?(Ve.sibling=h.child,h.child=Ve):(M=se.last,M!==null?M.sibling=Ve:h.child=Ve,se.last=Ve)}return se.tail!==null?(h=se.tail,se.rendering=h,se.tail=h.sibling,se.renderingStartTime=Ke(),h.sibling=null,M=vs.current,Bo(vs,I?M&1|2:M&1),h):(dr(h),null);case 22:case 23:return id(),I=h.memoizedState!==null,c!==null&&c.memoizedState!==null!==I&&(h.flags|=8192),I&&h.mode&1?Ga&1073741824&&(dr(h),h.subtreeFlags&6&&(h.flags|=8192)):dr(h),null;case 24:return null;case 25:return null}throw Error(d(156,h.tag))}function Ki(c,h){switch(Pc(h),h.tag){case 1:return na(h.type)&&su(),c=h.flags,c&65536?(h.flags=c&-65537|128,h):null;case 3:return sc(),ds(da),ds($s),jc(),c=h.flags,c&65536&&!(c&128)?(h.flags=c&-65537|128,h):null;case 5:return ql(h),null;case 13:if(ds(vs),c=h.memoizedState,c!==null&&c.dehydrated!==null){if(h.alternate===null)throw Error(d(340));cu()}return c=h.flags,c&65536?(h.flags=c&-65537|128,h):null;case 19:return ds(vs),null;case 4:return sc(),null;case 10:return Ru(h.type._context),null;case 22:case 23:return id(),null;case 24:return null;default:return null}}var $i=!1,Lo=!1,xo=typeof WeakSet=="function"?WeakSet:Set,hr=null;function ns(c,h){var M=c.ref;if(M!==null)if(typeof M=="function")try{M(null)}catch(I){Rs(c,h,I)}else M.current=null}function ra(c,h,M){try{M()}catch(I){Rs(c,h,I)}}var ga=!1;function ws(c,h){if(Ro=Sr,c=Xo(),po(c)){if("selectionStart"in c)var M={start:c.selectionStart,end:c.selectionEnd};else e:{M=(M=c.ownerDocument)&&M.defaultView||window;var I=M.getSelection&&M.getSelection();if(I&&I.rangeCount!==0){M=I.anchorNode;var Q=I.anchorOffset,se=I.focusNode;I=I.focusOffset;try{M.nodeType,se.nodeType}catch{M=null;break e}var Ve=0,Gt=-1,pn=-1,ir=0,zr=0,kr=c,Hr=null;t:for(;;){for(var Ei;kr!==M||Q!==0&&kr.nodeType!==3||(Gt=Ve+Q),kr!==se||I!==0&&kr.nodeType!==3||(pn=Ve+I),kr.nodeType===3&&(Ve+=kr.nodeValue.length),(Ei=kr.firstChild)!==null;)Hr=kr,kr=Ei;for(;;){if(kr===c)break t;if(Hr===M&&++ir===Q&&(Gt=Ve),Hr===se&&++zr===I&&(pn=Ve),(Ei=kr.nextSibling)!==null)break;kr=Hr,Hr=kr.parentNode}kr=Ei}M=Gt===-1||pn===-1?null:{start:Gt,end:pn}}else M=null}M=M||{start:0,end:0}}else M=null;for(Lr={focusedElem:c,selectionRange:M},Sr=!1,hr=h;hr!==null;)if(h=hr,c=h.child,(h.subtreeFlags&1028)!==0&&c!==null)c.return=h,hr=c;else for(;hr!==null;){h=hr;try{var Ii=h.alternate;if(h.flags&1024)switch(h.tag){case 0:case 11:case 15:break;case 1:if(Ii!==null){var Ni=Ii.memoizedProps,ia=Ii.memoizedState,Zn=h.stateNode,wn=Zn.getSnapshotBeforeUpdate(h.elementType===h.type?Ni:ja(h.type,Ni),ia);Zn.__reactInternalSnapshotBeforeUpdate=wn}break;case 3:var er=h.stateNode.containerInfo;er.nodeType===1?er.textContent="":er.nodeType===9&&er.documentElement&&er.removeChild(er.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(d(163))}}catch(si){Rs(h,h.return,si)}if(c=h.sibling,c!==null){c.return=h.return,hr=c;break}hr=h.return}return Ii=ga,ga=!1,Ii}function is(c,h,M){var I=h.updateQueue;if(I=I!==null?I.lastEffect:null,I!==null){var Q=I=I.next;do{if((Q.tag&c)===c){var se=Q.destroy;Q.destroy=void 0,se!==void 0&&ra(h,M,se)}Q=Q.next}while(Q!==I)}}function Ia(c,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var M=h=h.next;do{if((M.tag&c)===c){var I=M.create;M.destroy=I()}M=M.next}while(M!==h)}}function bu(c){var h=c.ref;if(h!==null){var M=c.stateNode;switch(c.tag){case 5:c=M;break;default:c=M}typeof h=="function"?h(c):h.current=c}}function Qo(c){var h=c.alternate;h!==null&&(c.alternate=null,Qo(h)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(h=c.stateNode,h!==null&&(delete h[Fa],delete h[Ss],delete h[Gl],delete h[Xu],delete h[qu])),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function Jo(c){return c.tag===5||c.tag===3||c.tag===4}function Df(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||Jo(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function bc(c,h,M){var I=c.tag;if(I===5||I===6)c=c.stateNode,h?M.nodeType===8?M.parentNode.insertBefore(c,h):M.insertBefore(c,h):(M.nodeType===8?(h=M.parentNode,h.insertBefore(c,M)):(h=M,h.appendChild(c)),M=M._reactRootContainer,M!=null||h.onclick!==null||(h.onclick=ba));else if(I!==4&&(c=c.child,c!==null))for(bc(c,h,M),c=c.sibling;c!==null;)bc(c,h,M),c=c.sibling}function Yc(c,h,M){var I=c.tag;if(I===5||I===6)c=c.stateNode,h?M.insertBefore(c,h):M.appendChild(c);else if(I!==4&&(c=c.child,c!==null))for(Yc(c,h,M),c=c.sibling;c!==null;)Yc(c,h,M),c=c.sibling}var Xs=null,_l=!1;function qs(c,h,M){for(M=M.child;M!==null;)Bu(c,h,M),M=M.sibling}function Bu(c,h,M){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(At,M)}catch{}switch(M.tag){case 5:Lo||ns(M,h);case 6:var I=Xs,Q=_l;Xs=null,qs(c,h,M),Xs=I,_l=Q,Xs!==null&&(_l?(c=Xs,M=M.stateNode,c.nodeType===8?c.parentNode.removeChild(M):c.removeChild(M)):Xs.removeChild(M.stateNode));break;case 18:Xs!==null&&(_l?(c=Xs,M=M.stateNode,c.nodeType===8?gs(c.parentNode,M):c.nodeType===1&&gs(c,M),xn(c)):gs(Xs,M.stateNode));break;case 4:I=Xs,Q=_l,Xs=M.stateNode.containerInfo,_l=!0,qs(c,h,M),Xs=I,_l=Q;break;case 0:case 11:case 14:case 15:if(!Lo&&(I=M.updateQueue,I!==null&&(I=I.lastEffect,I!==null))){Q=I=I.next;do{var se=Q,Ve=se.destroy;se=se.tag,Ve!==void 0&&(se&2||se&4)&&ra(M,h,Ve),Q=Q.next}while(Q!==I)}qs(c,h,M);break;case 1:if(!Lo&&(ns(M,h),I=M.stateNode,typeof I.componentWillUnmount=="function"))try{I.props=M.memoizedProps,I.state=M.memoizedState,I.componentWillUnmount()}catch(Gt){Rs(M,h,Gt)}qs(c,h,M);break;case 21:qs(c,h,M);break;case 22:M.mode&1?(Lo=(I=Lo)||M.memoizedState!==null,qs(c,h,M),Lo=I):qs(c,h,M);break;default:qs(c,h,M)}}function Pf(c){var h=c.updateQueue;if(h!==null){c.updateQueue=null;var M=c.stateNode;M===null&&(M=c.stateNode=new xo),h.forEach(function(I){var Q=Le.bind(null,c,I);M.has(I)||(M.add(I),I.then(Q,Q))})}}function Ha(c,h){var M=h.deletions;if(M!==null)for(var I=0;I<M.length;I++){var Q=M[I];try{var se=c,Ve=h,Gt=Ve;e:for(;Gt!==null;){switch(Gt.tag){case 5:Xs=Gt.stateNode,_l=!1;break e;case 3:Xs=Gt.stateNode.containerInfo,_l=!0;break e;case 4:Xs=Gt.stateNode.containerInfo,_l=!0;break e}Gt=Gt.return}if(Xs===null)throw Error(d(160));Bu(se,Ve,Q),Xs=null,_l=!1;var pn=Q.alternate;pn!==null&&(pn.return=null),Q.return=null}catch(ir){Rs(Q,h,ir)}}if(h.subtreeFlags&12854)for(h=h.child;h!==null;)Af(h,c),h=h.sibling}function Af(c,h){var M=c.alternate,I=c.flags;switch(c.tag){case 0:case 11:case 14:case 15:if(Ha(h,c),Ll(c),I&4){try{is(3,c,c.return),Ia(3,c)}catch(Ni){Rs(c,c.return,Ni)}try{is(5,c,c.return)}catch(Ni){Rs(c,c.return,Ni)}}break;case 1:Ha(h,c),Ll(c),I&512&&M!==null&&ns(M,M.return);break;case 5:if(Ha(h,c),Ll(c),I&512&&M!==null&&ns(M,M.return),c.flags&32){var Q=c.stateNode;try{ke(Q,"")}catch(Ni){Rs(c,c.return,Ni)}}if(I&4&&(Q=c.stateNode,Q!=null)){var se=c.memoizedProps,Ve=M!==null?M.memoizedProps:se,Gt=c.type,pn=c.updateQueue;if(c.updateQueue=null,pn!==null)try{Gt==="input"&&se.type==="radio"&&se.name!=null&&nn(Q,se),pt(Gt,Ve);var ir=pt(Gt,se);for(Ve=0;Ve<pn.length;Ve+=2){var zr=pn[Ve],kr=pn[Ve+1];zr==="style"?re(Q,kr):zr==="dangerouslySetInnerHTML"?rn(Q,kr):zr==="children"?ke(Q,kr):k(Q,zr,kr,ir)}switch(Gt){case"input":hn(Q,se);break;case"textarea":st(Q,se);break;case"select":var Hr=Q._wrapperState.wasMultiple;Q._wrapperState.wasMultiple=!!se.multiple;var Ei=se.value;Ei!=null?yn(Q,!!se.multiple,Ei,!1):Hr!==!!se.multiple&&(se.defaultValue!=null?yn(Q,!!se.multiple,se.defaultValue,!0):yn(Q,!!se.multiple,se.multiple?[]:"",!1))}Q[Ss]=se}catch(Ni){Rs(c,c.return,Ni)}}break;case 6:if(Ha(h,c),Ll(c),I&4){if(c.stateNode===null)throw Error(d(162));Q=c.stateNode,se=c.memoizedProps;try{Q.nodeValue=se}catch(Ni){Rs(c,c.return,Ni)}}break;case 3:if(Ha(h,c),Ll(c),I&4&&M!==null&&M.memoizedState.isDehydrated)try{xn(h.containerInfo)}catch(Ni){Rs(c,c.return,Ni)}break;case 4:Ha(h,c),Ll(c);break;case 13:Ha(h,c),Ll(c),Q=c.child,Q.flags&8192&&(se=Q.memoizedState!==null,Q.stateNode.isHidden=se,!se||Q.alternate!==null&&Q.alternate.memoizedState!==null||(Hu=Ke())),I&4&&Pf(c);break;case 22:if(zr=M!==null&&M.memoizedState!==null,c.mode&1?(Lo=(ir=Lo)||zr,Ha(h,c),Lo=ir):Ha(h,c),Ll(c),I&8192){if(ir=c.memoizedState!==null,(c.stateNode.isHidden=ir)&&!zr&&c.mode&1)for(hr=c,zr=c.child;zr!==null;){for(kr=hr=zr;hr!==null;){switch(Hr=hr,Ei=Hr.child,Hr.tag){case 0:case 11:case 14:case 15:is(4,Hr,Hr.return);break;case 1:ns(Hr,Hr.return);var Ii=Hr.stateNode;if(typeof Ii.componentWillUnmount=="function"){I=Hr,M=Hr.return;try{h=I,Ii.props=h.memoizedProps,Ii.state=h.memoizedState,Ii.componentWillUnmount()}catch(Ni){Rs(I,M,Ni)}}break;case 5:ns(Hr,Hr.return);break;case 22:if(Hr.memoizedState!==null){xu(kr);continue}}Ei!==null?(Ei.return=Hr,hr=Ei):xu(kr)}zr=zr.sibling}e:for(zr=null,kr=c;;){if(kr.tag===5){if(zr===null){zr=kr;try{Q=kr.stateNode,ir?(se=Q.style,typeof se.setProperty=="function"?se.setProperty("display","none","important"):se.display="none"):(Gt=kr.stateNode,pn=kr.memoizedProps.style,Ve=pn!=null&&pn.hasOwnProperty("display")?pn.display:null,Gt.style.display=W("display",Ve))}catch(Ni){Rs(c,c.return,Ni)}}}else if(kr.tag===6){if(zr===null)try{kr.stateNode.nodeValue=ir?"":kr.memoizedProps}catch(Ni){Rs(c,c.return,Ni)}}else if((kr.tag!==22&&kr.tag!==23||kr.memoizedState===null||kr===c)&&kr.child!==null){kr.child.return=kr,kr=kr.child;continue}if(kr===c)break e;for(;kr.sibling===null;){if(kr.return===null||kr.return===c)break e;zr===kr&&(zr=null),kr=kr.return}zr===kr&&(zr=null),kr.sibling.return=kr.return,kr=kr.sibling}}break;case 19:Ha(h,c),Ll(c),I&4&&Pf(c);break;case 21:break;default:Ha(h,c),Ll(c)}}function Ll(c){var h=c.flags;if(h&2){try{e:{for(var M=c.return;M!==null;){if(Jo(M)){var I=M;break e}M=M.return}throw Error(d(160))}switch(I.tag){case 5:var Q=I.stateNode;I.flags&32&&(ke(Q,""),I.flags&=-33);var se=Df(c);Yc(c,se,Q);break;case 3:case 4:var Ve=I.stateNode.containerInfo,Gt=Df(c);bc(c,Gt,Ve);break;default:throw Error(d(161))}}catch(pn){Rs(c,c.return,pn)}c.flags&=-3}h&4096&&(c.flags&=-4097)}function zf(c,h,M){hr=c,ku(c,h,M)}function ku(c,h,M){for(var I=(c.mode&1)!==0;hr!==null;){var Q=hr,se=Q.child;if(Q.tag===22&&I){var Ve=Q.memoizedState!==null||$i;if(!Ve){var Gt=Q.alternate,pn=Gt!==null&&Gt.memoizedState!==null||Lo;Gt=$i;var ir=Lo;if($i=Ve,(Lo=pn)&&!ir)for(hr=Q;hr!==null;)Ve=hr,pn=Ve.child,Ve.tag===22&&Ve.memoizedState!==null?Rf(Q):pn!==null?(pn.return=Ve,hr=pn):Rf(Q);for(;se!==null;)hr=se,ku(se,h,M),se=se.sibling;hr=Q,$i=Gt,Lo=ir}ju(c,h,M)}else Q.subtreeFlags&8772&&se!==null?(se.return=Q,hr=se):ju(c,h,M)}}function ju(c){for(;hr!==null;){var h=hr;if(h.flags&8772){var M=h.alternate;try{if(h.flags&8772)switch(h.tag){case 0:case 11:case 15:Lo||Ia(5,h);break;case 1:var I=h.stateNode;if(h.flags&4&&!Lo)if(M===null)I.componentDidMount();else{var Q=h.elementType===h.type?M.memoizedProps:ja(h.type,M.memoizedProps);I.componentDidUpdate(Q,M.memoizedState,I.__reactInternalSnapshotBeforeUpdate)}var se=h.updateQueue;se!==null&&rc(h,se,I);break;case 3:var Ve=h.updateQueue;if(Ve!==null){if(M=null,h.child!==null)switch(h.child.tag){case 5:M=h.child.stateNode;break;case 1:M=h.child.stateNode}rc(h,Ve,M)}break;case 5:var Gt=h.stateNode;if(M===null&&h.flags&4){M=Gt;var pn=h.memoizedProps;switch(h.type){case"button":case"input":case"select":case"textarea":pn.autoFocus&&M.focus();break;case"img":pn.src&&(M.src=pn.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(h.memoizedState===null){var ir=h.alternate;if(ir!==null){var zr=ir.memoizedState;if(zr!==null){var kr=zr.dehydrated;kr!==null&&xn(kr)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(d(163))}Lo||h.flags&512&&bu(h)}catch(Hr){Rs(h,h.return,Hr)}}if(h===c){hr=null;break}if(M=h.sibling,M!==null){M.return=h.return,hr=M;break}hr=h.return}}function xu(c){for(;hr!==null;){var h=hr;if(h===c){hr=null;break}var M=h.sibling;if(M!==null){M.return=h.return,hr=M;break}hr=h.return}}function Rf(c){for(;hr!==null;){var h=hr;try{switch(h.tag){case 0:case 11:case 15:var M=h.return;try{Ia(4,h)}catch(pn){Rs(h,M,pn)}break;case 1:var I=h.stateNode;if(typeof I.componentDidMount=="function"){var Q=h.return;try{I.componentDidMount()}catch(pn){Rs(h,Q,pn)}}var se=h.return;try{bu(h)}catch(pn){Rs(h,se,pn)}break;case 5:var Ve=h.return;try{bu(h)}catch(pn){Rs(h,Ve,pn)}}}catch(pn){Rs(h,h.return,pn)}if(h===c){hr=null;break}var Gt=h.sibling;if(Gt!==null){Gt.return=h.return,hr=Gt;break}hr=h.return}}var Uu=Math.ceil,Za=j.ReactCurrentDispatcher,xc=j.ReactCurrentOwner,Ka=j.ReactCurrentBatchConfig,$o=0,Bs=null,ks=null,zs=0,Ga=0,Wu=Ba(0),Vs=0,Qc=null,zu=0,Vu=0,Vf=0,gl=null,Ma=null,Hu=0,sr=1/0,pi=null,Mi=!1,Gi=null,ao=null,Io=!1,os=null,Vl=0,Cu=0,Cc=null,Jc=-1,Xc=0;function va(){return $o&6?Ke():Jc!==-1?Jc:Jc=Ke()}function Hl(c){return c.mode&1?$o&2&&zs!==0?zs&-zs:Jf.transition!==null?(Xc===0&&(Xc=He()),Xc):(c=Vt,c!==0||(c=window.event,c=c===void 0?16:Oi(c.type)),c):1}function Zl(c,h,M,I){if(50<Cu)throw Cu=0,Cc=null,Error(d(185));Rt(c,M,I),(!($o&2)||c!==Bs)&&(c===Bs&&(!($o&2)&&(Vu|=M),Vs===4&&Ku(c,zs)),ol(c,I),M===1&&$o===0&&!(h.mode&1)&&(sr=Ke()+500,Ql&&dl()))}function ol(c,h){var M=c.callbackNode;ge(c,h);var I=de(c,c===Bs?zs:0);if(I===0)M!==null&&_r(M),c.callbackNode=null,c.callbackPriority=0;else if(h=I&-I,c.callbackPriority!==h){if(M!=null&&_r(M),h===1)c.tag===0?of(pd.bind(null,c)):wc(pd.bind(null,c)),kl(function(){!($o&6)&&dl()}),M=null;else{switch(Jt(I)){case 1:M=tn;break;case 4:M=Fn;break;case 16:M=Cn;break;case 536870912:M=Ge;break;default:M=Cn}M=oe(M,hd.bind(null,c))}c.callbackPriority=h,c.callbackNode=M}}function hd(c,h){if(Jc=-1,Xc=0,$o&6)throw Error(d(327));var M=c.callbackNode;if(Oc()&&c.callbackNode!==M)return null;var I=de(c,c===Bs?zs:0);if(I===0)return null;if(I&30||I&c.expiredLanes||h)h=Kf(c,I);else{h=I;var Q=$o;$o|=2;var se=md();(Bs!==c||zs!==h)&&(pi=null,sr=Ke()+500,Sc(c,h));do try{Od();break}catch(Gt){od(c,Gt)}while(1);Au(),Za.current=se,$o=Q,ks!==null?h=0:(Bs=null,zs=0,h=Vs)}if(h!==0){if(h===2&&(Q=je(c),Q!==0&&(I=Q,h=Zu(c,Q))),h===1)throw M=Qc,Sc(c,0),Ku(c,I),ol(c,Ke()),M;if(h===6)Ku(c,I);else{if(Q=c.current.alternate,!(I&30)&&!rd(Q)&&(h=Kf(c,I),h===2&&(se=je(c),se!==0&&(I=se,h=Zu(c,se))),h===1))throw M=Qc,Sc(c,0),Ku(c,I),ol(c,Ke()),M;switch(c.finishedWork=Q,c.finishedLanes=I,h){case 0:case 1:throw Error(d(345));case 2:Mu(c,Ma,pi);break;case 3:if(Ku(c,I),(I&130023424)===I&&(h=Hu+500-Ke(),10<h)){if(de(c,0)!==0)break;if(Q=c.suspendedLanes,(Q&I)!==I){va(),c.pingedLanes|=c.suspendedLanes&Q;break}c.timeoutHandle=Ws(Mu.bind(null,c,Ma,pi),h);break}Mu(c,Ma,pi);break;case 4:if(Ku(c,I),(I&4194240)===I)break;for(h=c.eventTimes,Q=-1;0<I;){var Ve=31-Yt(I);se=1<<Ve,Ve=h[Ve],Ve>Q&&(Q=Ve),I&=~se}if(I=Q,I=Ke()-I,I=(120>I?120:480>I?480:1080>I?1080:1920>I?1920:3e3>I?3e3:4320>I?4320:1960*Uu(I/1960))-I,10<I){c.timeoutHandle=Ws(Mu.bind(null,c,Ma,pi),I);break}Mu(c,Ma,pi);break;case 5:Mu(c,Ma,pi);break;default:throw Error(d(329))}}}return ol(c,Ke()),c.callbackNode===M?hd.bind(null,c):null}function Zu(c,h){var M=gl;return c.current.memoizedState.isDehydrated&&(Sc(c,h).flags|=256),c=Kf(c,h),c!==2&&(h=Ma,Ma=M,h!==null&&If(h)),c}function If(c){Ma===null?Ma=c:Ma.push.apply(Ma,c)}function rd(c){for(var h=c;;){if(h.flags&16384){var M=h.updateQueue;if(M!==null&&(M=M.stores,M!==null))for(var I=0;I<M.length;I++){var Q=M[I],se=Q.getSnapshot;Q=Q.value;try{if(!bs(se(),Q))return!1}catch{return!1}}}if(M=h.child,h.subtreeFlags&16384&&M!==null)M.return=h,h=M;else{if(h===c)break;for(;h.sibling===null;){if(h.return===null||h.return===c)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function Ku(c,h){for(h&=~Vf,h&=~Vu,c.suspendedLanes|=h,c.pingedLanes&=~h,c=c.expirationTimes;0<h;){var M=31-Yt(h),I=1<<M;c[M]=-1,h&=~I}}function pd(c){if($o&6)throw Error(d(327));Oc();var h=de(c,0);if(!(h&1))return ol(c,Ke()),null;var M=Kf(c,h);if(c.tag!==0&&M===2){var I=je(c);I!==0&&(h=I,M=Zu(c,I))}if(M===1)throw M=Qc,Sc(c,0),Ku(c,h),ol(c,Ke()),M;if(M===6)throw Error(d(345));return c.finishedWork=c.current.alternate,c.finishedLanes=h,Mu(c,Ma,pi),ol(c,Ke()),null}function Hf(c,h){var M=$o;$o|=1;try{return c(h)}finally{$o=M,$o===0&&(sr=Ke()+500,Ql&&dl())}}function Mc(c){os!==null&&os.tag===0&&!($o&6)&&Oc();var h=$o;$o|=1;var M=Ka.transition,I=Vt;try{if(Ka.transition=null,Vt=1,c)return c()}finally{Vt=I,Ka.transition=M,$o=h,!($o&6)&&dl()}}function id(){Ga=Wu.current,ds(Wu)}function Sc(c,h){c.finishedWork=null,c.finishedLanes=0;var M=c.timeoutHandle;if(M!==-1&&(c.timeoutHandle=-1,ta(M)),ks!==null)for(M=ks.return;M!==null;){var I=M;switch(Pc(I),I.tag){case 1:I=I.type.childContextTypes,I!=null&&su();break;case 3:sc(),ds(da),ds($s),jc();break;case 5:ql(I);break;case 4:sc();break;case 13:ds(vs);break;case 19:ds(vs);break;case 10:Ru(I.type._context);break;case 22:case 23:id()}M=M.return}if(Bs=c,ks=c=sn(c.current,null),zs=Ga=h,Vs=0,Qc=null,Vf=Vu=zu=0,Ma=gl=null,Jl!==null){for(h=0;h<Jl.length;h++)if(M=Jl[h],I=M.interleaved,I!==null){M.interleaved=null;var Q=I.next,se=M.pending;if(se!==null){var Ve=se.next;se.next=Q,I.next=Ve}M.pending=I}Jl=null}return c}function od(c,h){do{var M=ks;try{if(Au(),Wa.current=hc,Ns){for(var I=Oo.memoizedState;I!==null;){var Q=I.queue;Q!==null&&(Q.pending=null),I=I.next}Ns=!1}if(za=0,Ho=Ts=Oo=null,gu=!1,eu=0,xc.current=null,M===null||M.return===null){Vs=1,Qc=h,ks=null;break}e:{var se=c,Ve=M.return,Gt=M,pn=h;if(h=zs,Gt.flags|=32768,pn!==null&&typeof pn=="object"&&typeof pn.then=="function"){var ir=pn,zr=Gt,kr=zr.tag;if(!(zr.mode&1)&&(kr===0||kr===11||kr===15)){var Hr=zr.alternate;Hr?(zr.updateQueue=Hr.updateQueue,zr.memoizedState=Hr.memoizedState,zr.lanes=Hr.lanes):(zr.updateQueue=null,zr.memoizedState=null)}var Ei=ed(Ve);if(Ei!==null){Ei.flags&=-257,Mf(Ei,Ve,Gt,se,h),Ei.mode&1&&Bf(se,ir,h),h=Ei,pn=ir;var Ii=h.updateQueue;if(Ii===null){var Ni=new Set;Ni.add(pn),h.updateQueue=Ni}else Ii.add(pn);break e}else{if(!(h&1)){Bf(se,ir,h),Zf();break e}pn=Error(d(426))}}else if(hs&&Gt.mode&1){var ia=ed(Ve);if(ia!==null){!(ia.flags&65536)&&(ia.flags|=256),Mf(ia,Ve,Gt,se,h),af(Wl(pn,Gt));break e}}se=pn=Wl(pn,Gt),Vs!==4&&(Vs=2),gl===null?gl=[se]:gl.push(se),se=Ve;do{switch(se.tag){case 3:se.flags|=65536,h&=-h,se.lanes|=h;var Zn=Cf(se,pn,h);Xf(se,Zn);break e;case 1:Gt=pn;var wn=se.type,er=se.stateNode;if(!(se.flags&128)&&(typeof wn.getDerivedStateFromError=="function"||er!==null&&typeof er.componentDidCatch=="function"&&(ao===null||!ao.has(er)))){se.flags|=65536,h&=-h,se.lanes|=h;var si=Il(se,Gt,h);Xf(se,si);break e}}se=se.return}while(se!==null)}wd(M)}catch(Ui){h=Ui,ks===M&&M!==null&&(ks=M=M.return);continue}break}while(1)}function md(){var c=Za.current;return Za.current=hc,c===null?hc:c}function Zf(){(Vs===0||Vs===3||Vs===2)&&(Vs=4),Bs===null||!(zu&268435455)&&!(Vu&268435455)||Ku(Bs,zs)}function Kf(c,h){var M=$o;$o|=2;var I=md();(Bs!==c||zs!==h)&&(pi=null,Sc(c,h));do try{kd();break}catch(Q){od(c,Q)}while(1);if(Au(),$o=M,Za.current=I,ks!==null)throw Error(d(261));return Bs=null,zs=0,Vs}function kd(){for(;ks!==null;)Td(ks)}function Od(){for(;ks!==null&&!Xn();)Td(ks)}function Td(c){var h=nt(c.alternate,c,Ga);c.memoizedProps=c.pendingProps,h===null?wd(c):ks=h,xc.current=null}function wd(c){var h=c;do{var M=h.alternate;if(c=h.return,h.flags&32768){if(M=Ki(M,h),M!==null){M.flags&=32767,ks=M;return}if(c!==null)c.flags|=32768,c.subtreeFlags=0,c.deletions=null;else{Vs=6,ks=null;return}}else if(M=ri(M,h,Ga),M!==null){ks=M;return}if(h=h.sibling,h!==null){ks=h;return}ks=h=c}while(h!==null);Vs===0&&(Vs=5)}function Mu(c,h,M){var I=Vt,Q=Ka.transition;try{Ka.transition=null,Vt=1,qc(c,h,M,I)}finally{Ka.transition=Q,Vt=I}return null}function qc(c,h,M,I){do Oc();while(os!==null);if($o&6)throw Error(d(327));M=c.finishedWork;var Q=c.finishedLanes;if(M===null)return null;if(c.finishedWork=null,c.finishedLanes=0,M===c.current)throw Error(d(177));c.callbackNode=null,c.callbackPriority=0;var se=M.lanes|M.childLanes;if(fn(c,se),c===Bs&&(ks=Bs=null,zs=0),!(M.subtreeFlags&2064)&&!(M.flags&2064)||Io||(Io=!0,oe(Cn,function(){return Oc(),null})),se=(M.flags&15990)!==0,M.subtreeFlags&15990||se){se=Ka.transition,Ka.transition=null;var Ve=Vt;Vt=1;var Gt=$o;$o|=4,xc.current=null,ws(c,M),Af(M,c),go(Lr),Sr=!!Ro,Lr=Ro=null,c.current=M,zf(M,c,Q),mt(),$o=Gt,Vt=Ve,Ka.transition=se}else c.current=M;if(Io&&(Io=!1,os=c,Vl=Q),se=c.pendingLanes,se===0&&(ao=null),Zt(M.stateNode,I),ol(c,Ke()),h!==null)for(I=c.onRecoverableError,M=0;M<h.length;M++)Q=h[M],I(Q.value,{componentStack:Q.stack,digest:Q.digest});if(Mi)throw Mi=!1,c=Gi,Gi=null,c;return Vl&1&&c.tag!==0&&Oc(),se=c.pendingLanes,se&1?c===Cc?Cu++:(Cu=0,Cc=c):Cu=0,dl(),null}function Oc(){if(os!==null){var c=Jt(Vl),h=Ka.transition,M=Vt;try{if(Ka.transition=null,Vt=16>c?16:c,os===null)var I=!1;else{if(c=os,os=null,Vl=0,$o&6)throw Error(d(331));var Q=$o;for($o|=4,hr=c.current;hr!==null;){var se=hr,Ve=se.child;if(hr.flags&16){var Gt=se.deletions;if(Gt!==null){for(var pn=0;pn<Gt.length;pn++){var ir=Gt[pn];for(hr=ir;hr!==null;){var zr=hr;switch(zr.tag){case 0:case 11:case 15:is(8,zr,se)}var kr=zr.child;if(kr!==null)kr.return=zr,hr=kr;else for(;hr!==null;){zr=hr;var Hr=zr.sibling,Ei=zr.return;if(Qo(zr),zr===ir){hr=null;break}if(Hr!==null){Hr.return=Ei,hr=Hr;break}hr=Ei}}}var Ii=se.alternate;if(Ii!==null){var Ni=Ii.child;if(Ni!==null){Ii.child=null;do{var ia=Ni.sibling;Ni.sibling=null,Ni=ia}while(Ni!==null)}}hr=se}}if(se.subtreeFlags&2064&&Ve!==null)Ve.return=se,hr=Ve;else e:for(;hr!==null;){if(se=hr,se.flags&2048)switch(se.tag){case 0:case 11:case 15:is(9,se,se.return)}var Zn=se.sibling;if(Zn!==null){Zn.return=se.return,hr=Zn;break e}hr=se.return}}var wn=c.current;for(hr=wn;hr!==null;){Ve=hr;var er=Ve.child;if(Ve.subtreeFlags&2064&&er!==null)er.return=Ve,hr=er;else e:for(Ve=wn;hr!==null;){if(Gt=hr,Gt.flags&2048)try{switch(Gt.tag){case 0:case 11:case 15:Ia(9,Gt)}}catch(Ui){Rs(Gt,Gt.return,Ui)}if(Gt===Ve){hr=null;break e}var si=Gt.sibling;if(si!==null){si.return=Gt.return,hr=si;break e}hr=Gt.return}}if($o=Q,dl(),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(At,c)}catch{}I=!0}return I}finally{Vt=M,Ka.transition=h}}return!1}function sl(c,h,M){h=Wl(M,h),h=Cf(c,h,1),c=Aa(c,h,1),h=va(),c!==null&&(Rt(c,1,h),ol(c,h))}function Rs(c,h,M){if(c.tag===3)sl(c,c,M);else for(;h!==null;){if(h.tag===3){sl(h,c,M);break}else if(h.tag===1){var I=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof I.componentDidCatch=="function"&&(ao===null||!ao.has(I))){c=Wl(M,c),c=Il(h,c,1),h=Aa(h,c,1),c=va(),h!==null&&(Rt(h,1,c),ol(h,c));break}}h=h.return}}function sd(c,h,M){var I=c.pingCache;I!==null&&I.delete(h),h=va(),c.pingedLanes|=c.suspendedLanes&M,Bs===c&&(zs&M)===M&&(Vs===4||Vs===3&&(zs&130023424)===zs&&500>Ke()-Hu?Sc(c,0):Vf|=M),ol(c,h)}function Z(c,h){h===0&&(c.mode&1?(h=Vn,Vn<<=1,!(Vn&130023424)&&(Vn=4194304)):h=1);var M=va();c=rl(c,h),c!==null&&(Rt(c,h,M),ol(c,M))}function me(c){var h=c.memoizedState,M=0;h!==null&&(M=h.retryLane),Z(c,M)}function Le(c,h){var M=0;switch(c.tag){case 13:var I=c.stateNode,Q=c.memoizedState;Q!==null&&(M=Q.retryLane);break;case 19:I=c.stateNode;break;default:throw Error(d(314))}I!==null&&I.delete(h),Z(c,M)}var nt;nt=function(c,h,M){if(c!==null)if(c.memoizedProps!==h.pendingProps||da.current)Js=!0;else{if(!(c.lanes&M)&&!(h.flags&128))return Js=!1,ce(c,h,M);Js=!!(c.flags&131072)}else Js=!1,hs&&h.flags&1048576&&Dc(h,Ol,h.index);switch(h.lanes=0,h.tag){case 2:var I=h.type;Gc(c,h),c=h.pendingProps;var Q=qa(h,$s.current);fu(h,M),Q=mf(null,h,I,c,Q,M);var se=lc();return h.flags|=1,typeof Q=="object"&&Q!==null&&typeof Q.render=="function"&&Q.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,na(I)?(se=!0,au(h)):se=!1,h.memoizedState=Q.state!==null&&Q.state!==void 0?Q.state:null,$c(h),Q.updater=Iu,h.stateNode=Q,Q._reactInternals=h,ff(h,I,c,M),h=Nu(null,h,I,!0,se,M)):(h.tag=0,hs&&se&&Tu(h),ma(null,h,Q,M),h=h.child),h;case 16:I=h.elementType;e:{switch(Gc(c,h),c=h.pendingProps,Q=I._init,I=Q(I._payload),h.type=I,Q=h.tag=Nt(I),c=ja(I,c),Q){case 0:h=yc(null,h,I,c,M);break e;case 1:h=Zc(null,h,I,c,M);break e;case 11:h=Sf(null,h,I,c,M);break e;case 14:h=Of(null,h,I,ja(I.type,c),M);break e}throw Error(d(306,I,""))}return h;case 0:return I=h.type,Q=h.pendingProps,Q=h.elementType===I?Q:ja(I,Q),yc(c,h,I,Q,M);case 1:return I=h.type,Q=h.pendingProps,Q=h.elementType===I?Q:ja(I,Q),Zc(c,h,I,Q,M);case 3:e:{if(jf(h),c===null)throw Error(d(387));I=h.pendingProps,se=h.memoizedState,Q=se.element,Nc(c,h),nc(h,I,null,M);var Ve=h.memoizedState;if(I=Ve.element,se.isDehydrated)if(se={element:I,isDehydrated:!1,cache:Ve.cache,pendingSuspenseBoundaries:Ve.pendingSuspenseBoundaries,transitions:Ve.transitions},h.updateQueue.baseState=se,h.memoizedState=se,h.flags&256){Q=Wl(Error(d(423)),h),h=Tf(c,h,I,M,Q);break e}else if(I!==Q){Q=Wl(Error(d(424)),h),h=Tf(c,h,I,M,Q);break e}else for(xa=Is(h.stateNode.containerInfo.firstChild),ha=h,hs=!0,hl=null,M=hf(h,null,I,M),h.child=M;M;)M.flags=M.flags&-3|4096,M=M.sibling;else{if(cu(),I===Q){h=nu(c,h,M);break e}ma(c,h,I,M)}h=h.child}return h;case 5:return pf(h),c===null&&wu(h),I=h.type,Q=h.pendingProps,se=c!==null?c.memoizedProps:null,Ve=Q.children,es(I,Q)?Ve=null:se!==null&&es(I,se)&&(h.flags|=32),vc(c,h),ma(c,h,Ve,M),h.child;case 6:return c===null&&wu(h),null;case 13:return Uf(c,h,M);case 4:return oc(h,h.stateNode.containerInfo),I=h.pendingProps,c===null?h.child=ic(h,null,I,M):ma(c,h,I,M),h.child;case 11:return I=h.type,Q=h.pendingProps,Q=h.elementType===I?Q:ja(I,Q),Sf(c,h,I,Q,M);case 7:return ma(c,h,h.pendingProps,M),h.child;case 8:return ma(c,h,h.pendingProps.children,M),h.child;case 12:return ma(c,h,h.pendingProps.children,M),h.child;case 10:e:{if(I=h.type._context,Q=h.pendingProps,se=h.memoizedProps,Ve=Q.value,Bo(Du,I._currentValue),I._currentValue=Ve,se!==null)if(bs(se.value,Ve)){if(se.children===Q.children&&!da.current){h=nu(c,h,M);break e}}else for(se=h.child,se!==null&&(se.return=h);se!==null;){var Gt=se.dependencies;if(Gt!==null){Ve=se.child;for(var pn=Gt.firstContext;pn!==null;){if(pn.context===I){if(se.tag===1){pn=il(-1,M&-M),pn.tag=2;var ir=se.updateQueue;if(ir!==null){ir=ir.shared;var zr=ir.pending;zr===null?pn.next=pn:(pn.next=zr.next,zr.next=pn),ir.pending=pn}}se.lanes|=M,pn=se.alternate,pn!==null&&(pn.lanes|=M),tc(se.return,M,h),Gt.lanes|=M;break}pn=pn.next}}else if(se.tag===10)Ve=se.type===h.type?null:se.child;else if(se.tag===18){if(Ve=se.return,Ve===null)throw Error(d(341));Ve.lanes|=M,Gt=Ve.alternate,Gt!==null&&(Gt.lanes|=M),tc(Ve,M,h),Ve=se.sibling}else Ve=se.child;if(Ve!==null)Ve.return=se;else for(Ve=se;Ve!==null;){if(Ve===h){Ve=null;break}if(se=Ve.sibling,se!==null){se.return=Ve.return,Ve=se;break}Ve=Ve.return}se=Ve}ma(c,h,Q.children,M),h=h.child}return h;case 9:return Q=h.type,I=h.pendingProps.children,fu(h,M),Q=Ua(Q),I=I(Q),h.flags|=1,ma(c,h,I,M),h.child;case 14:return I=h.type,Q=ja(I,h.pendingProps),Q=ja(I.type,Q),Of(c,h,I,Q,M);case 15:return kf(c,h,h.type,h.pendingProps,M);case 17:return I=h.type,Q=h.pendingProps,Q=h.elementType===I?Q:ja(I,Q),Gc(c,h),h.tag=1,na(I)?(c=!0,au(h)):c=!1,fu(h,M),_f(h,I,Q),ff(h,I,Q,M),Nu(null,h,I,!0,c,M);case 19:return nd(c,h,M);case 22:return Va(c,h,M)}throw Error(d(156,h.tag))};function oe(c,h){return Jr(c,h)}function wt(c,h,M,I){this.tag=c,this.key=M,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=I,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(c,h,M,I){return new wt(c,h,M,I)}function Je(c){return c=c.prototype,!(!c||!c.isReactComponent)}function Nt(c){if(typeof c=="function")return Je(c)?1:0;if(c!=null){if(c=c.$$typeof,c===le)return 11;if(c===q)return 14}return 2}function sn(c,h){var M=c.alternate;return M===null?(M=Ft(c.tag,h,c.key,c.mode),M.elementType=c.elementType,M.type=c.type,M.stateNode=c.stateNode,M.alternate=c,c.alternate=M):(M.pendingProps=h,M.type=c.type,M.flags=0,M.subtreeFlags=0,M.deletions=null),M.flags=c.flags&14680064,M.childLanes=c.childLanes,M.lanes=c.lanes,M.child=c.child,M.memoizedProps=c.memoizedProps,M.memoizedState=c.memoizedState,M.updateQueue=c.updateQueue,h=c.dependencies,M.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},M.sibling=c.sibling,M.index=c.index,M.ref=c.ref,M}function Dn(c,h,M,I,Q,se){var Ve=2;if(I=c,typeof c=="function")Je(c)&&(Ve=1);else if(typeof c=="string")Ve=5;else e:switch(c){case G:return Kn(M.children,Q,se,h);case Y:Ve=8,Q|=8;break;case ae:return c=Ft(12,M,h,Q|2),c.elementType=ae,c.lanes=se,c;case be:return c=Ft(13,M,h,Q),c.elementType=be,c.lanes=se,c;case te:return c=Ft(19,M,h,Q),c.elementType=te,c.lanes=se,c;case Se:return Dr(M,Q,se,h);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case Ce:Ve=10;break e;case J:Ve=9;break e;case le:Ve=11;break e;case q:Ve=14;break e;case ee:Ve=16,I=null;break e}throw Error(d(130,c==null?c:typeof c,""))}return h=Ft(Ve,M,h,Q),h.elementType=c,h.type=I,h.lanes=se,h}function Kn(c,h,M,I){return c=Ft(7,c,I,h),c.lanes=M,c}function Dr(c,h,M,I){return c=Ft(22,c,I,h),c.elementType=Se,c.lanes=M,c.stateNode={isHidden:!1},c}function mr(c,h,M){return c=Ft(6,c,null,h),c.lanes=M,c}function Nr(c,h,M){return h=Ft(4,c.children!==null?c.children:[],c.key,h),h.lanes=M,h.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},h}function ti(c,h,M,I,Q){this.tag=h,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=it(0),this.expirationTimes=it(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=it(0),this.identifierPrefix=I,this.onRecoverableError=Q,this.mutableSourceEagerHydrationData=null}function Tr(c,h,M,I,Q,se,Ve,Gt,pn){return c=new ti(c,h,M,Gt,pn),h===1?(h=1,se===!0&&(h|=8)):h=0,se=Ft(3,null,null,h),c.current=se,se.stateNode=c,se.memoizedState={element:I,isDehydrated:M,cache:null,transitions:null,pendingSuspenseBoundaries:null},$c(se),c}function Ai(c,h,M){var I=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:K,key:I==null?null:""+I,children:c,containerInfo:h,implementation:M}}function Yi(c){if(!c)return Wo;c=c._reactInternals;e:{if(Qe(c)!==c||c.tag!==1)throw Error(d(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if(na(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(d(171))}if(c.tag===1){var M=c.type;if(na(M))return Ps(c,M,h)}return h}function yi(c,h,M,I,Q,se,Ve,Gt,pn){return c=Tr(M,I,!0,c,Q,se,Ve,Gt,pn),c.context=Yi(null),M=c.current,I=va(),Q=Hl(M),se=il(I,Q),se.callback=h??null,Aa(M,se,Q),c.current.lanes=Q,Rt(c,Q,I),ol(c,I),c}function Ji(c,h,M,I){var Q=h.current,se=va(),Ve=Hl(Q);return M=Yi(M),h.context===null?h.context=M:h.pendingContext=M,h=il(se,Ve),h.payload={element:c},I=I===void 0?null:I,I!==null&&(h.callback=I),c=Aa(Q,h,Ve),c!==null&&(Zl(c,Q,Ve,se),Fc(c,Q,Ve)),Ve}function ko(c){if(c=c.current,!c.child)return null;switch(c.child.tag){case 5:return c.child.stateNode;default:return c.child.stateNode}}function Ri(c,h){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var M=c.retryLane;c.retryLane=M!==0&&M<h?M:h}}function jo(c,h){Ri(c,h),(c=c.alternate)&&Ri(c,h)}function vo(){return null}var Cs=typeof reportError=="function"?reportError:function(c){console.error(c)};function al(c){this._internalRoot=c}fs.prototype.render=al.prototype.render=function(c){var h=this._internalRoot;if(h===null)throw Error(d(409));Ji(c,h,null,null)},fs.prototype.unmount=al.prototype.unmount=function(){var c=this._internalRoot;if(c!==null){this._internalRoot=null;var h=c.containerInfo;Mc(function(){Ji(null,c,null,null)}),h[fl]=null}};function fs(c){this._internalRoot=c}fs.prototype.unstable_scheduleHydration=function(c){if(c){var h=Ir();c={blockedOn:null,target:c,priority:h};for(var M=0;M<ft.length&&h!==0&&h<ft[M].priority;M++);ft.splice(M,0,c),M===0&&ot(c)}};function ps(c){return!(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)}function ys(c){return!(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11&&(c.nodeType!==8||c.nodeValue!==" react-mount-point-unstable "))}function Xi(){}function ls(c,h,M,I,Q){if(Q){if(typeof I=="function"){var se=I;I=function(){var ir=ko(Ve);se.call(ir)}}var Ve=yi(h,I,c,0,null,!1,!1,"",Xi);return c._reactRootContainer=Ve,c[fl]=Ve.current,Ks(c.nodeType===8?c.parentNode:c),Mc(),Ve}for(;Q=c.lastChild;)c.removeChild(Q);if(typeof I=="function"){var Gt=I;I=function(){var ir=ko(pn);Gt.call(ir)}}var pn=Tr(c,0,!1,null,null,!1,!1,"",Xi);return c._reactRootContainer=pn,c[fl]=pn.current,Ks(c.nodeType===8?c.parentNode:c),Mc(function(){Ji(h,pn,M,I)}),pn}function _a(c,h,M,I,Q){var se=M._reactRootContainer;if(se){var Ve=se;if(typeof Q=="function"){var Gt=Q;Q=function(){var pn=ko(Ve);Gt.call(pn)}}Ji(h,Ve,c,Q)}else Ve=ls(M,h,c,Q,I);return ko(Ve)}dn=function(c){switch(c.tag){case 3:var h=c.stateNode;if(h.current.memoizedState.isDehydrated){var M=Ye(h.pendingLanes);M!==0&&(qt(h,M|1),ol(h,Ke()),!($o&6)&&(sr=Ke()+500,dl()))}break;case 13:Mc(function(){var I=rl(c,1);if(I!==null){var Q=va();Zl(I,c,1,Q)}}),jo(c,1)}},Jn=function(c){if(c.tag===13){var h=rl(c,134217728);if(h!==null){var M=va();Zl(h,c,134217728,M)}jo(c,134217728)}},Hn=function(c){if(c.tag===13){var h=Hl(c),M=rl(c,h);if(M!==null){var I=va();Zl(M,c,h,I)}jo(c,h)}},Ir=function(){return Vt},vr=function(c,h){var M=Vt;try{return Vt=c,h()}finally{Vt=M}},Be=function(c,h,M){switch(h){case"input":if(hn(c,M),h=M.name,M.type==="radio"&&h!=null){for(M=c;M.parentNode;)M=M.parentNode;for(M=M.querySelectorAll("input[name="+JSON.stringify(""+h)+'][type="radio"]'),h=0;h<M.length;h++){var I=M[h];if(I!==c&&I.form===c.form){var Q=Da(I);if(!Q)throw Error(d(90));at(I),hn(I,Q)}}}break;case"textarea":st(c,M);break;case"select":h=M.value,h!=null&&yn(c,!!M.multiple,h,!1)}},rr=Hf,Wn=Mc;var Ya={usingClientEntryPoint:!1,Events:[xl,Yl,Da,an,In,Hf]},ea={findFiberByHostInstance:Xa,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ll={bundleType:ea.bundleType,version:ea.version,rendererPackageName:ea.rendererPackageName,rendererConfig:ea.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(c){return c=Cr(c),c===null?null:c.stateNode},findFiberByHostInstance:ea.findFiberByHostInstance||vo,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vl.isDisabled&&vl.supportsFiber)try{At=vl.inject(ll),Bt=vl}catch{}}b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ya,b.createPortal=function(c,h){var M=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ps(h))throw Error(d(200));return Ai(c,h,null,M)},b.createRoot=function(c,h){if(!ps(c))throw Error(d(299));var M=!1,I="",Q=Cs;return h!=null&&(h.unstable_strictMode===!0&&(M=!0),h.identifierPrefix!==void 0&&(I=h.identifierPrefix),h.onRecoverableError!==void 0&&(Q=h.onRecoverableError)),h=Tr(c,1,!1,null,null,M,!1,I,Q),c[fl]=h.current,Ks(c.nodeType===8?c.parentNode:c),new al(h)},b.findDOMNode=function(c){if(c==null)return null;if(c.nodeType===1)return c;var h=c._reactInternals;if(h===void 0)throw typeof c.render=="function"?Error(d(188)):(c=Object.keys(c).join(","),Error(d(268,c)));return c=Cr(h),c=c===null?null:c.stateNode,c},b.flushSync=function(c){return Mc(c)},b.hydrate=function(c,h,M){if(!ys(h))throw Error(d(200));return _a(null,c,h,!0,M)},b.hydrateRoot=function(c,h,M){if(!ps(c))throw Error(d(405));var I=M!=null&&M.hydratedSources||null,Q=!1,se="",Ve=Cs;if(M!=null&&(M.unstable_strictMode===!0&&(Q=!0),M.identifierPrefix!==void 0&&(se=M.identifierPrefix),M.onRecoverableError!==void 0&&(Ve=M.onRecoverableError)),h=yi(h,null,c,1,M??null,Q,!1,se,Ve),c[fl]=h.current,Ks(c),I)for(c=0;c<I.length;c++)M=I[c],Q=M._getVersion,Q=Q(M._source),h.mutableSourceEagerHydrationData==null?h.mutableSourceEagerHydrationData=[M,Q]:h.mutableSourceEagerHydrationData.push(M,Q);return new fs(h)},b.render=function(c,h,M){if(!ys(h))throw Error(d(200));return _a(null,c,h,!1,M)},b.unmountComponentAtNode=function(c){if(!ys(c))throw Error(d(40));return c._reactRootContainer?(Mc(function(){_a(null,null,c,!1,function(){c._reactRootContainer=null,c[fl]=null})}),!0):!1},b.unstable_batchedUpdates=Hf,b.unstable_renderSubtreeIntoContainer=function(c,h,M,I){if(!ys(M))throw Error(d(200));if(c==null||c._reactInternals===void 0)throw Error(d(38));return _a(c,h,M,!1,I)},b.version="18.2.0-next-9e3b772b8-20220608"},44645:function(_,b,i){"use strict";var l,f=i(12788);if(!0)b.s=f.createRoot,l=f.hydrateRoot;else var d},12788:function(_,b,i){"use strict";function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(f){console.error(f)}}l(),_.exports=i(83975)},8266:function(_){"use strict";var b=Array.isArray,i=Object.keys,l=Object.prototype.hasOwnProperty,f=typeof Element<"u";function d(g,E){if(g===E)return!0;if(g&&E&&typeof g=="object"&&typeof E=="object"){var m=b(g),C=b(E),x,P,T;if(m&&C){if(P=g.length,P!=E.length)return!1;for(x=P;x--!==0;)if(!d(g[x],E[x]))return!1;return!0}if(m!=C)return!1;var O=g instanceof Date,w=E instanceof Date;if(O!=w)return!1;if(O&&w)return g.getTime()==E.getTime();var R=g instanceof RegExp,F=E instanceof RegExp;if(R!=F)return!1;if(R&&F)return g.toString()==E.toString();var V=i(g);if(P=V.length,P!==i(E).length)return!1;for(x=P;x--!==0;)if(!l.call(E,V[x]))return!1;if(f&&g instanceof Element&&E instanceof Element)return g===E;for(x=P;x--!==0;)if(T=V[x],!(T==="_owner"&&g.$$typeof)&&!d(g[T],E[T]))return!1;return!0}return g!==g&&E!==E}_.exports=function(E,m){try{return d(E,m)}catch(C){if(C.message&&C.message.match(/stack|recursion/i)||C.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",C.name,C.message),!1;throw C}}},74758:function(_,b,i){"use strict";i.d(b,{q:function(){return yn}});var l=i(60216),f=i.n(l),d=i(25824),g=i.n(d),E=i(77594),m=i.n(E),C=i(32735),x=i(54516),P=i.n(x),T={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},O={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},w=Object.keys(O).map(function(cn){return O[cn]}),R={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},F={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},V={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},L=Object.keys(F).reduce(function(cn,st){return cn[F[st]]=st,cn},{}),$=[O.NOSCRIPT,O.SCRIPT,O.STYLE],U="data-react-helmet",N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(cn){return typeof cn}:function(cn){return cn&&typeof Symbol=="function"&&cn.constructor===Symbol&&cn!==Symbol.prototype?"symbol":typeof cn},k=function(cn,st){if(!(cn instanceof st))throw new TypeError("Cannot call a class as a function")},j=function(){function cn(st,on){for(var dt=0;dt<on.length;dt++){var Dt=on[dt];Dt.enumerable=Dt.enumerable||!1,Dt.configurable=!0,"value"in Dt&&(Dt.writable=!0),Object.defineProperty(st,Dt.key,Dt)}}return function(st,on,dt){return on&&cn(st.prototype,on),dt&&cn(st,dt),st}}(),z=Object.assign||function(cn){for(var st=1;st<arguments.length;st++){var on=arguments[st];for(var dt in on)Object.prototype.hasOwnProperty.call(on,dt)&&(cn[dt]=on[dt])}return cn},K=function(cn,st){if(typeof st!="function"&&st!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof st);cn.prototype=Object.create(st&&st.prototype,{constructor:{value:cn,enumerable:!1,writable:!0,configurable:!0}}),st&&(Object.setPrototypeOf?Object.setPrototypeOf(cn,st):cn.__proto__=st)},G=function(cn,st){var on={};for(var dt in cn)st.indexOf(dt)>=0||Object.prototype.hasOwnProperty.call(cn,dt)&&(on[dt]=cn[dt]);return on},Y=function(cn,st){if(!cn)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return st&&(typeof st=="object"||typeof st=="function")?st:cn},ae=function(st){var on=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return on===!1?String(st):String(st).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},Ce=function(st){var on=q(st,O.TITLE),dt=q(st,V.TITLE_TEMPLATE);if(dt&&on)return dt.replace(/%s/g,function(){return Array.isArray(on)?on.join(""):on});var Dt=q(st,V.DEFAULT_TITLE);return on||Dt||void 0},J=function(st){return q(st,V.ON_CHANGE_CLIENT_STATE)||function(){}},le=function(st,on){return on.filter(function(dt){return typeof dt[st]<"u"}).map(function(dt){return dt[st]}).reduce(function(dt,Dt){return z({},dt,Dt)},{})},be=function(st,on){return on.filter(function(dt){return typeof dt[O.BASE]<"u"}).map(function(dt){return dt[O.BASE]}).reverse().reduce(function(dt,Dt){if(!dt.length)for(var Ht=Object.keys(Dt),rn=0;rn<Ht.length;rn++){var ke=Ht[rn],ct=ke.toLowerCase();if(st.indexOf(ct)!==-1&&Dt[ct])return dt.concat(Dt)}return dt},[])},te=function(st,on,dt){var Dt={};return dt.filter(function(Ht){return Array.isArray(Ht[st])?!0:(typeof Ht[st]<"u"&&Pe("Helmet: "+st+' should be of type "Array". Instead found type "'+N(Ht[st])+'"'),!1)}).map(function(Ht){return Ht[st]}).reverse().reduce(function(Ht,rn){var ke={};rn.filter(function(Oe){for(var Ze=void 0,pt=Object.keys(Oe),$e=0;$e<pt.length;$e++){var Re=pt[$e],Be=Re.toLowerCase();on.indexOf(Be)!==-1&&!(Ze===R.REL&&Oe[Ze].toLowerCase()==="canonical")&&!(Be===R.REL&&Oe[Be].toLowerCase()==="stylesheet")&&(Ze=Be),on.indexOf(Re)!==-1&&(Re===R.INNER_HTML||Re===R.CSS_TEXT||Re===R.ITEM_PROP)&&(Ze=Re)}if(!Ze||!Oe[Ze])return!1;var Ne=Oe[Ze].toLowerCase();return Dt[Ze]||(Dt[Ze]={}),ke[Ze]||(ke[Ze]={}),Dt[Ze][Ne]?!1:(ke[Ze][Ne]=!0,!0)}).reverse().forEach(function(Oe){return Ht.push(Oe)});for(var ct=Object.keys(ke),D=0;D<ct.length;D++){var W=ct[D],re=P()({},Dt[W],ke[W]);Dt[W]=re}return Ht},[]).reverse()},q=function(st,on){for(var dt=st.length-1;dt>=0;dt--){var Dt=st[dt];if(Dt.hasOwnProperty(on))return Dt[on]}return null},ee=function(st){return{baseTag:be([R.HREF,R.TARGET],st),bodyAttributes:le(T.BODY,st),defer:q(st,V.DEFER),encode:q(st,V.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:le(T.HTML,st),linkTags:te(O.LINK,[R.REL,R.HREF],st),metaTags:te(O.META,[R.NAME,R.CHARSET,R.HTTPEQUIV,R.PROPERTY,R.ITEM_PROP],st),noscriptTags:te(O.NOSCRIPT,[R.INNER_HTML],st),onChangeClientState:J(st),scriptTags:te(O.SCRIPT,[R.SRC,R.INNER_HTML],st),styleTags:te(O.STYLE,[R.CSS_TEXT],st),title:Ce(st),titleAttributes:le(T.TITLE,st)}},Se=function(){var cn=Date.now();return function(st){var on=Date.now();on-cn>16?(cn=on,st(on)):setTimeout(function(){Se(st)},0)}}(),tt=function(st){return clearTimeout(st)},Ae=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Se:i.g.requestAnimationFrame||Se,pe=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||tt:i.g.cancelAnimationFrame||tt,Pe=function(st){return console&&typeof console.warn=="function"&&console.warn(st)},ye=null,Ee=function(st){ye&&pe(ye),st.defer?ye=Ae(function(){_e(st,function(){ye=null})}):(_e(st),ye=null)},_e=function(st,on){var dt=st.baseTag,Dt=st.bodyAttributes,Ht=st.htmlAttributes,rn=st.linkTags,ke=st.metaTags,ct=st.noscriptTags,D=st.onChangeClientState,W=st.scriptTags,re=st.styleTags,Oe=st.title,Ze=st.titleAttributes;Fe(O.BODY,Dt),Fe(O.HTML,Ht),Ie(Oe,Ze);var pt={baseTag:ut(O.BASE,dt),linkTags:ut(O.LINK,rn),metaTags:ut(O.META,ke),noscriptTags:ut(O.NOSCRIPT,ct),scriptTags:ut(O.SCRIPT,W),styleTags:ut(O.STYLE,re)},$e={},Re={};Object.keys(pt).forEach(function(Be){var Ne=pt[Be],bt=Ne.newTags,Kt=Ne.oldTags;bt.length&&($e[Be]=bt),Kt.length&&(Re[Be]=pt[Be].oldTags)}),on&&on(),D(st,$e,Re)},We=function(st){return Array.isArray(st)?st.join(""):st},Ie=function(st,on){typeof st<"u"&&document.title!==st&&(document.title=We(st)),Fe(O.TITLE,on)},Fe=function(st,on){var dt=document.getElementsByTagName(st)[0];if(dt){for(var Dt=dt.getAttribute(U),Ht=Dt?Dt.split(","):[],rn=[].concat(Ht),ke=Object.keys(on),ct=0;ct<ke.length;ct++){var D=ke[ct],W=on[D]||"";dt.getAttribute(D)!==W&&dt.setAttribute(D,W),Ht.indexOf(D)===-1&&Ht.push(D);var re=rn.indexOf(D);re!==-1&&rn.splice(re,1)}for(var Oe=rn.length-1;Oe>=0;Oe--)dt.removeAttribute(rn[Oe]);Ht.length===rn.length?dt.removeAttribute(U):dt.getAttribute(U)!==ke.join(",")&&dt.setAttribute(U,ke.join(","))}},ut=function(st,on){var dt=document.head||document.querySelector(O.HEAD),Dt=dt.querySelectorAll(st+"["+U+"]"),Ht=Array.prototype.slice.call(Dt),rn=[],ke=void 0;return on&&on.length&&on.forEach(function(ct){var D=document.createElement(st);for(var W in ct)if(ct.hasOwnProperty(W))if(W===R.INNER_HTML)D.innerHTML=ct.innerHTML;else if(W===R.CSS_TEXT)D.styleSheet?D.styleSheet.cssText=ct.cssText:D.appendChild(document.createTextNode(ct.cssText));else{var re=typeof ct[W]>"u"?"":ct[W];D.setAttribute(W,re)}D.setAttribute(U,"true"),Ht.some(function(Oe,Ze){return ke=Ze,D.isEqualNode(Oe)})?Ht.splice(ke,1):rn.push(D)}),Ht.forEach(function(ct){return ct.parentNode.removeChild(ct)}),rn.forEach(function(ct){return dt.appendChild(ct)}),{oldTags:Ht,newTags:rn}},ht=function(st){return Object.keys(st).reduce(function(on,dt){var Dt=typeof st[dt]<"u"?dt+'="'+st[dt]+'"':""+dt;return on?on+" "+Dt:Dt},"")},Ot=function(st,on,dt,Dt){var Ht=ht(dt),rn=We(on);return Ht?"<"+st+" "+U+'="true" '+Ht+">"+ae(rn,Dt)+"</"+st+">":"<"+st+" "+U+'="true">'+ae(rn,Dt)+"</"+st+">"},Ue=function(st,on,dt){return on.reduce(function(Dt,Ht){var rn=Object.keys(Ht).filter(function(D){return!(D===R.INNER_HTML||D===R.CSS_TEXT)}).reduce(function(D,W){var re=typeof Ht[W]>"u"?W:W+'="'+ae(Ht[W],dt)+'"';return D?D+" "+re:re},""),ke=Ht.innerHTML||Ht.cssText||"",ct=$.indexOf(st)===-1;return Dt+"<"+st+" "+U+'="true" '+rn+(ct?"/>":">"+ke+"</"+st+">")},"")},at=function(st){var on=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(st).reduce(function(dt,Dt){return dt[F[Dt]||Dt]=st[Dt],dt},on)},Pt=function(st){var on=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(st).reduce(function(dt,Dt){return dt[L[Dt]||Dt]=st[Dt],dt},on)},lt=function(st,on,dt){var Dt,Ht=(Dt={key:on},Dt[U]=!0,Dt),rn=at(dt,Ht);return[C.createElement(O.TITLE,rn,on)]},kt=function(st,on){return on.map(function(dt,Dt){var Ht,rn=(Ht={key:Dt},Ht[U]=!0,Ht);return Object.keys(dt).forEach(function(ke){var ct=F[ke]||ke;if(ct===R.INNER_HTML||ct===R.CSS_TEXT){var D=dt.innerHTML||dt.cssText;rn.dangerouslySetInnerHTML={__html:D}}else rn[ct]=dt[ke]}),C.createElement(st,rn)})},nn=function(st,on,dt){switch(st){case O.TITLE:return{toComponent:function(){return lt(st,on.title,on.titleAttributes,dt)},toString:function(){return Ot(st,on.title,on.titleAttributes,dt)}};case T.BODY:case T.HTML:return{toComponent:function(){return at(on)},toString:function(){return ht(on)}};default:return{toComponent:function(){return kt(st,on)},toString:function(){return Ue(st,on,dt)}}}},hn=function(st){var on=st.baseTag,dt=st.bodyAttributes,Dt=st.encode,Ht=st.htmlAttributes,rn=st.linkTags,ke=st.metaTags,ct=st.noscriptTags,D=st.scriptTags,W=st.styleTags,re=st.title,Oe=re===void 0?"":re,Ze=st.titleAttributes;return{base:nn(O.BASE,on,Dt),bodyAttributes:nn(T.BODY,dt,Dt),htmlAttributes:nn(T.HTML,Ht,Dt),link:nn(O.LINK,rn,Dt),meta:nn(O.META,ke,Dt),noscript:nn(O.NOSCRIPT,ct,Dt),script:nn(O.SCRIPT,D,Dt),style:nn(O.STYLE,W,Dt),title:nn(O.TITLE,{title:Oe,titleAttributes:Ze},Dt)}},Rn=function(st){var on,dt;return dt=on=function(Dt){K(Ht,Dt);function Ht(){return k(this,Ht),Y(this,Dt.apply(this,arguments))}return Ht.prototype.shouldComponentUpdate=function(ke){return!m()(this.props,ke)},Ht.prototype.mapNestedChildrenToProps=function(ke,ct){if(!ct)return null;switch(ke.type){case O.SCRIPT:case O.NOSCRIPT:return{innerHTML:ct};case O.STYLE:return{cssText:ct}}throw new Error("<"+ke.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},Ht.prototype.flattenArrayTypeChildren=function(ke){var ct,D=ke.child,W=ke.arrayTypeChildren,re=ke.newChildProps,Oe=ke.nestedChildren;return z({},W,(ct={},ct[D.type]=[].concat(W[D.type]||[],[z({},re,this.mapNestedChildrenToProps(D,Oe))]),ct))},Ht.prototype.mapObjectTypeChildren=function(ke){var ct,D,W=ke.child,re=ke.newProps,Oe=ke.newChildProps,Ze=ke.nestedChildren;switch(W.type){case O.TITLE:return z({},re,(ct={},ct[W.type]=Ze,ct.titleAttributes=z({},Oe),ct));case O.BODY:return z({},re,{bodyAttributes:z({},Oe)});case O.HTML:return z({},re,{htmlAttributes:z({},Oe)})}return z({},re,(D={},D[W.type]=z({},Oe),D))},Ht.prototype.mapArrayTypeChildrenToProps=function(ke,ct){var D=z({},ct);return Object.keys(ke).forEach(function(W){var re;D=z({},D,(re={},re[W]=ke[W],re))}),D},Ht.prototype.warnOnInvalidChildren=function(ke,ct){return!0},Ht.prototype.mapChildrenToProps=function(ke,ct){var D=this,W={};return C.Children.forEach(ke,function(re){if(!(!re||!re.props)){var Oe=re.props,Ze=Oe.children,pt=G(Oe,["children"]),$e=Pt(pt);switch(D.warnOnInvalidChildren(re,Ze),re.type){case O.LINK:case O.META:case O.NOSCRIPT:case O.SCRIPT:case O.STYLE:W=D.flattenArrayTypeChildren({child:re,arrayTypeChildren:W,newChildProps:$e,nestedChildren:Ze});break;default:ct=D.mapObjectTypeChildren({child:re,newProps:ct,newChildProps:$e,nestedChildren:Ze});break}}}),ct=this.mapArrayTypeChildrenToProps(W,ct),ct},Ht.prototype.render=function(){var ke=this.props,ct=ke.children,D=G(ke,["children"]),W=z({},D);return ct&&(W=this.mapChildrenToProps(ct,W)),C.createElement(st,W)},j(Ht,null,[{key:"canUseDOM",set:function(ke){st.canUseDOM=ke}}]),Ht}(C.Component),on.propTypes={base:f().object,bodyAttributes:f().object,children:f().oneOfType([f().arrayOf(f().node),f().node]),defaultTitle:f().string,defer:f().bool,encodeSpecialCharacters:f().bool,htmlAttributes:f().object,link:f().arrayOf(f().object),meta:f().arrayOf(f().object),noscript:f().arrayOf(f().object),onChangeClientState:f().func,script:f().arrayOf(f().object),style:f().arrayOf(f().object),title:f().string,titleAttributes:f().object,titleTemplate:f().string},on.defaultProps={defer:!0,encodeSpecialCharacters:!0},on.peek=st.peek,on.rewind=function(){var Dt=st.rewind();return Dt||(Dt=hn({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),Dt},dt},kn=function(){return null},$t=g()(ee,Ee,hn)(kn),yn=Rn($t);yn.renderStatic=yn.rewind;var Yn=null},77594:function(_){var b=typeof Element<"u",i=typeof Map=="function",l=typeof Set=="function",f=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function d(g,E){if(g===E)return!0;if(g&&E&&typeof g=="object"&&typeof E=="object"){if(g.constructor!==E.constructor)return!1;var m,C,x;if(Array.isArray(g)){if(m=g.length,m!=E.length)return!1;for(C=m;C--!==0;)if(!d(g[C],E[C]))return!1;return!0}var P;if(i&&g instanceof Map&&E instanceof Map){if(g.size!==E.size)return!1;for(P=g.entries();!(C=P.next()).done;)if(!E.has(C.value[0]))return!1;for(P=g.entries();!(C=P.next()).done;)if(!d(C.value[1],E.get(C.value[0])))return!1;return!0}if(l&&g instanceof Set&&E instanceof Set){if(g.size!==E.size)return!1;for(P=g.entries();!(C=P.next()).done;)if(!E.has(C.value[0]))return!1;return!0}if(f&&ArrayBuffer.isView(g)&&ArrayBuffer.isView(E)){if(m=g.length,m!=E.length)return!1;for(C=m;C--!==0;)if(g[C]!==E[C])return!1;return!0}if(g.constructor===RegExp)return g.source===E.source&&g.flags===E.flags;if(g.valueOf!==Object.prototype.valueOf)return g.valueOf()===E.valueOf();if(g.toString!==Object.prototype.toString)return g.toString()===E.toString();if(x=Object.keys(g),m=x.length,m!==Object.keys(E).length)return!1;for(C=m;C--!==0;)if(!Object.prototype.hasOwnProperty.call(E,x[C]))return!1;if(b&&g instanceof Element)return!1;for(C=m;C--!==0;)if(!((x[C]==="_owner"||x[C]==="__v"||x[C]==="__o")&&g.$$typeof)&&!d(g[x[C]],E[x[C]]))return!1;return!0}return g!==g&&E!==E}_.exports=function(E,m){try{return d(E,m)}catch(C){if((C.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw C}}},72067:function(_,b,i){"use strict";i.d(b,{_y:function(){return P},zt:function(){return x}});var l=i(32735),f=i(86058),d=i.n(f);function g(O){return O.displayName||O.name||"Component"}var E=typeof window<"u"?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=l.createContext(null)):l.createContext(null),m=E.Consumer,C=E.Provider,x=C,P=E;function T(O,w){var R=w||{},F=R.intlPropName,V=F===void 0?"intl":F,L=R.forwardRef,$=L===void 0?!1:L,U=R.enforceContext,N=U===void 0?!0:U,k=function(j){return React.createElement(m,null,function(z){var K;N&&invariantIntlContext(z);var G=(K={},K[V]=z,K);return React.createElement(O,__assign({},j,G,{ref:$?j.forwardedRef:null}))})};return k.displayName="injectIntl(".concat(g(O),")"),k.WrappedComponent=O,$?hoistNonReactStatics(React.forwardRef(function(j,z){return React.createElement(k,__assign({},j,{forwardedRef:z}))}),O):hoistNonReactStatics(k,O)}},67879:function(_,b,i){"use strict";i.d(b,{Z:function(){return g}});var l=i(32735),f=i(72067),d=i(42447);function g(){var E=l.useContext(f._y);return(0,d.lq)(E),E}},42447:function(_,b,i){"use strict";i.d(b,{Z0:function(){return m},dt:function(){return C},lq:function(){return E},wU:function(){return x}});var l=i(31191),f=i(32735),d=i(26356),g=i(32409);function E(P){(0,d.kG)(P,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var m=(0,l.pi)((0,l.pi)({},g.Z0),{textComponent:f.Fragment});function C(P){return function(T){return P(f.Children.toArray(T))}}function x(P,T){if(P===T)return!0;if(!P||!T)return!1;var O=Object.keys(P),w=Object.keys(T),R=O.length;if(w.length!==R)return!1;for(var F=0;F<R;F++){var V=O[F];if(P[V]!==T[V]||!Object.prototype.hasOwnProperty.call(T,V))return!1}return!0}},26697:function(_,b){"use strict";/**
1156
+ `+se.stack}return{value:c,source:h,stack:Q,digest:null}}function Eu(c,h,M){return{value:c,source:null,stack:M??null,digest:h??null}}function Rl(c,h){try{console.error(h.value)}catch(M){setTimeout(function(){throw M})}}var mc=typeof WeakMap=="function"?WeakMap:Map;function Cf(c,h,M){M=il(-1,M),M.tag=3,M.payload={element:null};var I=h.value;return M.callback=function(){Mi||(Mi=!0,Gi=I),Rl(c,h)},M}function Il(c,h,M){M=il(-1,M),M.tag=3;var I=c.type.getDerivedStateFromError;if(typeof I=="function"){var Q=h.value;M.payload=function(){return I(Q)},M.callback=function(){Rl(c,h)}}var se=c.stateNode;return se!==null&&typeof se.componentDidCatch=="function"&&(M.callback=function(){Rl(c,h),typeof I!="function"&&(ao===null?ao=new Set([this]):ao.add(this));var Ve=h.stack;this.componentDidCatch(h.value,{componentStack:Ve!==null?Ve:""})}),M}function Bf(c,h,M){var I=c.pingCache;if(I===null){I=c.pingCache=new mc;var Q=new Set;I.set(h,Q)}else Q=I.get(h),Q===void 0&&(Q=new Set,I.set(h,Q));Q.has(M)||(Q.add(M),c=sd.bind(null,c,h,M),h.then(c,c))}function ed(c){do{var h;if((h=c.tag===13)&&(h=c.memoizedState,h=h!==null?h.dehydrated!==null:!0),h)return c;c=c.return}while(c!==null);return null}function Mf(c,h,M,I,Q){return c.mode&1?(c.flags|=65536,c.lanes=Q,c):(c===h?c.flags|=65536:(c.flags|=128,M.flags|=131072,M.flags&=-52805,M.tag===1&&(M.alternate===null?M.tag=17:(h=il(-1,1),h.tag=2,Aa(M,h,1))),M.lanes|=1),c)}var gc=j.ReactCurrentOwner,Js=!1;function ma(c,h,M,I){h.child=c===null?hf(h,null,M,I):ic(h,c.child,M,I)}function Sf(c,h,M,I,Q){M=M.render;var se=h.ref;return fu(h,Q),I=mf(c,h,M,I,se,Q),M=lc(),c!==null&&!Js?(h.updateQueue=c.updateQueue,h.flags&=-2053,c.lanes&=~Q,nu(c,h,Q)):(hs&&M&&Tu(h),h.flags|=1,ma(c,h,I,Q),h.child)}function Of(c,h,M,I,Q){if(c===null){var se=M.type;return typeof se=="function"&&!Je(se)&&se.defaultProps===void 0&&M.compare===null&&M.defaultProps===void 0?(h.tag=15,h.type=se,kf(c,h,se,I,Q)):(c=Dn(M.type,null,I,h,h.mode,Q),c.ref=h.ref,c.return=h,h.child=c)}if(se=c.child,!(c.lanes&Q)){var Ve=se.memoizedProps;if(M=M.compare,M=M!==null?M:ca,M(Ve,I)&&c.ref===h.ref)return nu(c,h,Q)}return h.flags|=1,c=sn(se,I),c.ref=h.ref,c.return=h,h.child=c}function kf(c,h,M,I,Q){if(c!==null){var se=c.memoizedProps;if(ca(se,I)&&c.ref===h.ref)if(Js=!1,h.pendingProps=I=se,(c.lanes&Q)!==0)c.flags&131072&&(Js=!0);else return h.lanes=c.lanes,nu(c,h,Q)}return yc(c,h,M,I,Q)}function Va(c,h,M){var I=h.pendingProps,Q=I.children,se=c!==null?c.memoizedState:null;if(I.mode==="hidden")if(!(h.mode&1))h.memoizedState={baseLanes:0,cachePool:null,transitions:null},Bo(Wu,Ga),Ga|=M;else{if(!(M&1073741824))return c=se!==null?se.baseLanes|M:M,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:c,cachePool:null,transitions:null},h.updateQueue=null,Bo(Wu,Ga),Ga|=c,null;h.memoizedState={baseLanes:0,cachePool:null,transitions:null},I=se!==null?se.baseLanes:M,Bo(Wu,Ga),Ga|=I}else se!==null?(I=se.baseLanes|M,h.memoizedState=null):I=M,Bo(Wu,Ga),Ga|=I;return ma(c,h,Q,M),h.child}function vc(c,h){var M=h.ref;(c===null&&M!==null||c!==null&&c.ref!==M)&&(h.flags|=512,h.flags|=2097152)}function yc(c,h,M,I,Q){var se=na(M)?Ml:$s.current;return se=qa(h,se),fu(h,Q),M=mf(c,h,M,I,se,Q),I=lc(),c!==null&&!Js?(h.updateQueue=c.updateQueue,h.flags&=-2053,c.lanes&=~Q,nu(c,h,Q)):(hs&&I&&Tu(h),h.flags|=1,ma(c,h,M,Q),h.child)}function Zc(c,h,M,I,Q){if(na(M)){var se=!0;au(h)}else se=!1;if(fu(h,Q),h.stateNode===null)Gc(c,h),_f(h,M,I),ff(h,M,I,Q),I=!0;else if(c===null){var Ve=h.stateNode,Gt=h.memoizedProps;Ve.props=Gt;var pn=Ve.context,ir=M.contextType;typeof ir=="object"&&ir!==null?ir=Ua(ir):(ir=na(M)?Ml:$s.current,ir=qa(h,ir));var zr=M.getDerivedStateFromProps,kr=typeof zr=="function"||typeof Ve.getSnapshotBeforeUpdate=="function";kr||typeof Ve.UNSAFE_componentWillReceiveProps!="function"&&typeof Ve.componentWillReceiveProps!="function"||(Gt!==I||pn!==ir)&&cf(h,Ve,I,ir),wl=!1;var Hr=h.memoizedState;Ve.state=Hr,nc(h,I,Ve,Q),pn=h.memoizedState,Gt!==I||Hr!==pn||da.current||wl?(typeof zr=="function"&&(As(h,M,zr,I),pn=h.memoizedState),(Gt=wl||uf(h,M,Gt,I,Hr,pn,ir))?(kr||typeof Ve.UNSAFE_componentWillMount!="function"&&typeof Ve.componentWillMount!="function"||(typeof Ve.componentWillMount=="function"&&Ve.componentWillMount(),typeof Ve.UNSAFE_componentWillMount=="function"&&Ve.UNSAFE_componentWillMount()),typeof Ve.componentDidMount=="function"&&(h.flags|=4194308)):(typeof Ve.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=I,h.memoizedState=pn),Ve.props=I,Ve.state=pn,Ve.context=ir,I=Gt):(typeof Ve.componentDidMount=="function"&&(h.flags|=4194308),I=!1)}else{Ve=h.stateNode,Nc(c,h),Gt=h.memoizedProps,ir=h.type===h.elementType?Gt:ja(h.type,Gt),Ve.props=ir,kr=h.pendingProps,Hr=Ve.context,pn=M.contextType,typeof pn=="object"&&pn!==null?pn=Ua(pn):(pn=na(M)?Ml:$s.current,pn=qa(h,pn));var Ei=M.getDerivedStateFromProps;(zr=typeof Ei=="function"||typeof Ve.getSnapshotBeforeUpdate=="function")||typeof Ve.UNSAFE_componentWillReceiveProps!="function"&&typeof Ve.componentWillReceiveProps!="function"||(Gt!==kr||Hr!==pn)&&cf(h,Ve,I,pn),wl=!1,Hr=h.memoizedState,Ve.state=Hr,nc(h,I,Ve,Q);var Ii=h.memoizedState;Gt!==kr||Hr!==Ii||da.current||wl?(typeof Ei=="function"&&(As(h,M,Ei,I),Ii=h.memoizedState),(ir=wl||uf(h,M,ir,I,Hr,Ii,pn)||!1)?(zr||typeof Ve.UNSAFE_componentWillUpdate!="function"&&typeof Ve.componentWillUpdate!="function"||(typeof Ve.componentWillUpdate=="function"&&Ve.componentWillUpdate(I,Ii,pn),typeof Ve.UNSAFE_componentWillUpdate=="function"&&Ve.UNSAFE_componentWillUpdate(I,Ii,pn)),typeof Ve.componentDidUpdate=="function"&&(h.flags|=4),typeof Ve.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof Ve.componentDidUpdate!="function"||Gt===c.memoizedProps&&Hr===c.memoizedState||(h.flags|=4),typeof Ve.getSnapshotBeforeUpdate!="function"||Gt===c.memoizedProps&&Hr===c.memoizedState||(h.flags|=1024),h.memoizedProps=I,h.memoizedState=Ii),Ve.props=I,Ve.state=Ii,Ve.context=pn,I=ir):(typeof Ve.componentDidUpdate!="function"||Gt===c.memoizedProps&&Hr===c.memoizedState||(h.flags|=4),typeof Ve.getSnapshotBeforeUpdate!="function"||Gt===c.memoizedProps&&Hr===c.memoizedState||(h.flags|=1024),I=!1)}return Nu(c,h,M,I,se,Q)}function Nu(c,h,M,I,Q,se){vc(c,h);var Ve=(h.flags&128)!==0;if(!I&&!Ve)return Q&&ts(h,M,!1),nu(c,h,se);I=h.stateNode,gc.current=h;var Gt=Ve&&typeof M.getDerivedStateFromError!="function"?null:I.render();return h.flags|=1,c!==null&&Ve?(h.child=ic(h,c.child,null,se),h.child=ic(h,null,Gt,se)):ma(c,h,Gt,se),h.memoizedState=I.state,Q&&ts(h,M,!0),h.child}function jf(c){var h=c.stateNode;h.pendingContext?Sl(c,h.pendingContext,h.pendingContext!==h.context):h.context&&Sl(c,h.context,!1),oc(c,h.containerInfo)}function Tf(c,h,M,I,Q){return cu(),af(Q),h.flags|=256,ma(c,h,M,I),h.child}var wf={dehydrated:null,treeContext:null,retryLane:0};function Ec(c){return{baseLanes:c,cachePool:null,transitions:null}}function Uf(c,h,M){var I=h.pendingProps,Q=vs.current,se=!1,Ve=(h.flags&128)!==0,Gt;if((Gt=Ve)||(Gt=c!==null&&c.memoizedState===null?!1:(Q&2)!==0),Gt?(se=!0,h.flags&=-129):(c===null||c.memoizedState!==null)&&(Q|=1),Bo(vs,Q&1),c===null)return wu(h),c=h.memoizedState,c!==null&&(c=c.dehydrated,c!==null)?(h.mode&1?c.data==="$!"?h.lanes=8:h.lanes=1073741824:h.lanes=1,null):(Ve=I.children,c=I.fallback,se?(I=h.mode,se=h.child,Ve={mode:"hidden",children:Ve},!(I&1)&&se!==null?(se.childLanes=0,se.pendingProps=Ve):se=Dr(Ve,I,0,null),c=Kn(c,I,M,null),se.return=h,c.return=h,se.sibling=c,h.child=se,h.child.memoizedState=Ec(M),h.memoizedState=wf,c):Vl(h,Ve));if(Q=c.memoizedState,Q!==null&&(Gt=Q.dehydrated,Gt!==null))return Wf(c,h,Ve,I,Gt,Q,M);if(se){se=I.fallback,Ve=h.mode,Q=c.child,Gt=Q.sibling;var pn={mode:"hidden",children:I.children};return!(Ve&1)&&h.child!==Q?(I=h.child,I.childLanes=0,I.pendingProps=pn,h.deletions=null):(I=sn(Q,pn),I.subtreeFlags=Q.subtreeFlags&14680064),Gt!==null?se=sn(Gt,se):(se=Kn(se,Ve,M,null),se.flags|=2),se.return=h,I.return=h,I.sibling=se,h.child=I,I=se,se=h.child,Ve=c.child.memoizedState,Ve=Ve===null?Ec(M):{baseLanes:Ve.baseLanes|M,cachePool:null,transitions:Ve.transitions},se.memoizedState=Ve,se.childLanes=c.childLanes&~M,h.memoizedState=wf,I}return se=c.child,c=se.sibling,I=sn(se,{mode:"visible",children:I.children}),!(h.mode&1)&&(I.lanes=M),I.return=h,I.sibling=null,c!==null&&(M=h.deletions,M===null?(h.deletions=[c],h.flags|=16):M.push(c)),h.child=I,h.memoizedState=null,I}function Vl(c,h){return h=Dr({mode:"visible",children:h},c.mode,0,null),h.return=c,c.child=h}function Kc(c,h,M,I){return I!==null&&af(I),ic(h,c.child,null,M),c=Vl(h,h.pendingProps.children),c.flags|=2,h.memoizedState=null,c}function Wf(c,h,M,I,Q,se,Ve){if(M)return h.flags&256?(h.flags&=-257,I=Eu(Error(d(422))),Kc(c,h,Ve,I)):h.memoizedState!==null?(h.child=c.child,h.flags|=128,null):(se=I.fallback,Q=h.mode,I=Dr({mode:"visible",children:I.children},Q,0,null),se=Kn(se,Q,Ve,null),se.flags|=2,I.return=h,se.return=h,I.sibling=se,h.child=I,h.mode&1&&ic(h,c.child,null,Ve),h.child.memoizedState=Ec(Ve),h.memoizedState=wf,se);if(!(h.mode&1))return Kc(c,h,Ve,null);if(Q.data==="$!"){if(I=Q.nextSibling&&Q.nextSibling.dataset,I)var Gt=I.dgst;return I=Gt,se=Error(d(419)),I=Eu(se,I,void 0),Kc(c,h,Ve,I)}if(Gt=(Ve&c.childLanes)!==0,Js||Gt){if(I=Bs,I!==null){switch(Ve&-Ve){case 4:Q=2;break;case 16:Q=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:Q=32;break;case 536870912:Q=268435456;break;default:Q=0}Q=Q&(I.suspendedLanes|Ve)?0:Q,Q!==0&&Q!==se.retryLane&&(se.retryLane=Q,rl(c,Q),Kl(I,c,Q,-1))}return Zf(),I=Eu(Error(d(421))),Kc(c,h,Ve,I)}return Q.data==="$?"?(h.flags|=128,h.child=c.child,h=me.bind(null,c),Q._reactRetry=h,null):(c=se.treeContext,xa=Is(Q.nextSibling),ha=h,hs=!0,hl=null,c!==null&&(_o[ka++]=tl,_o[ka++]=nl,_o[ka++]=Tl,tl=c.id,nl=c.overflow,Tl=h),h=Vl(h,I.children),h.flags|=4096,h)}function Fu(c,h,M){c.lanes|=h;var I=c.alternate;I!==null&&(I.lanes|=h),tc(c.return,h,M)}function td(c,h,M,I,Q){var se=c.memoizedState;se===null?c.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:I,tail:M,tailMode:Q}:(se.isBackwards=h,se.rendering=null,se.renderingStartTime=0,se.last=I,se.tail=M,se.tailMode=Q)}function nd(c,h,M){var I=h.pendingProps,Q=I.revealOrder,se=I.tail;if(ma(c,h,I.children,M),I=vs.current,I&2)I=I&1|2,h.flags|=128;else{if(c!==null&&c.flags&128)e:for(c=h.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&Fu(c,M,h);else if(c.tag===19)Fu(c,M,h);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===h)break e;for(;c.sibling===null;){if(c.return===null||c.return===h)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}I&=1}if(Bo(vs,I),!(h.mode&1))h.memoizedState=null;else switch(Q){case"forwards":for(M=h.child,Q=null;M!==null;)c=M.alternate,c!==null&&mu(c)===null&&(Q=M),M=M.sibling;M=Q,M===null?(Q=h.child,h.child=null):(Q=M.sibling,M.sibling=null),td(h,!1,Q,M,se);break;case"backwards":for(M=null,Q=h.child,h.child=null;Q!==null;){if(c=Q.alternate,c!==null&&mu(c)===null){h.child=Q;break}c=Q.sibling,Q.sibling=M,M=Q,Q=c}td(h,!0,M,null,se);break;case"together":td(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function Gc(c,h){!(h.mode&1)&&c!==null&&(c.alternate=null,h.alternate=null,h.flags|=2)}function nu(c,h,M){if(c!==null&&(h.dependencies=c.dependencies),zu|=h.lanes,!(M&h.childLanes))return null;if(c!==null&&h.child!==c.child)throw Error(d(153));if(h.child!==null){for(c=h.child,M=sn(c,c.pendingProps),h.child=M,M.return=h;c.sibling!==null;)c=c.sibling,M=M.sibling=sn(c,c.pendingProps),M.return=h;M.sibling=null}return h.child}function ce(c,h,M){switch(h.tag){case 3:jf(h),cu();break;case 5:pf(h);break;case 1:na(h.type)&&au(h);break;case 4:oc(h,h.stateNode.containerInfo);break;case 10:var I=h.type._context,Q=h.memoizedProps.value;Bo(Du,I._currentValue),I._currentValue=Q;break;case 13:if(I=h.memoizedState,I!==null)return I.dehydrated!==null?(Bo(vs,vs.current&1),h.flags|=128,null):M&h.child.childLanes?Uf(c,h,M):(Bo(vs,vs.current&1),c=nu(c,h,M),c!==null?c.sibling:null);Bo(vs,vs.current&1);break;case 19:if(I=(M&h.childLanes)!==0,c.flags&128){if(I)return nd(c,h,M);h.flags|=128}if(Q=h.memoizedState,Q!==null&&(Q.rendering=null,Q.tail=null,Q.lastEffect=null),Bo(vs,vs.current),I)break;return null;case 22:case 23:return h.lanes=0,Va(c,h,M)}return nu(c,h,M)}var et,Wt,mn,gn;et=function(c,h){for(var M=h.child;M!==null;){if(M.tag===5||M.tag===6)c.appendChild(M.stateNode);else if(M.tag!==4&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===h)break;for(;M.sibling===null;){if(M.return===null||M.return===h)return;M=M.return}M.sibling.return=M.return,M=M.sibling}},Wt=function(){},mn=function(c,h,M,I){var Q=c.memoizedProps;if(Q!==I){c=h.stateNode,Dl(pl.current);var se=null;switch(M){case"input":Q=lt(c,Q),I=lt(c,I),se=[];break;case"select":Q=pe({},Q,{value:void 0}),I=pe({},I,{value:void 0}),se=[];break;case"textarea":Q=Yn(c,Q),I=Yn(c,I),se=[];break;default:typeof Q.onClick!="function"&&typeof I.onClick=="function"&&(c.onclick=ba)}Ze(M,I);var Ve;M=null;for(ir in Q)if(!I.hasOwnProperty(ir)&&Q.hasOwnProperty(ir)&&Q[ir]!=null)if(ir==="style"){var Gt=Q[ir];for(Ve in Gt)Gt.hasOwnProperty(Ve)&&(M||(M={}),M[Ve]="")}else ir!=="dangerouslySetInnerHTML"&&ir!=="children"&&ir!=="suppressContentEditableWarning"&&ir!=="suppressHydrationWarning"&&ir!=="autoFocus"&&(E.hasOwnProperty(ir)?se||(se=[]):(se=se||[]).push(ir,null));for(ir in I){var pn=I[ir];if(Gt=Q?.[ir],I.hasOwnProperty(ir)&&pn!==Gt&&(pn!=null||Gt!=null))if(ir==="style")if(Gt){for(Ve in Gt)!Gt.hasOwnProperty(Ve)||pn&&pn.hasOwnProperty(Ve)||(M||(M={}),M[Ve]="");for(Ve in pn)pn.hasOwnProperty(Ve)&&Gt[Ve]!==pn[Ve]&&(M||(M={}),M[Ve]=pn[Ve])}else M||(se||(se=[]),se.push(ir,M)),M=pn;else ir==="dangerouslySetInnerHTML"?(pn=pn?pn.__html:void 0,Gt=Gt?Gt.__html:void 0,pn!=null&&Gt!==pn&&(se=se||[]).push(ir,pn)):ir==="children"?typeof pn!="string"&&typeof pn!="number"||(se=se||[]).push(ir,""+pn):ir!=="suppressContentEditableWarning"&&ir!=="suppressHydrationWarning"&&(E.hasOwnProperty(ir)?(pn!=null&&ir==="onScroll"&&no("scroll",c),se||Gt===pn||(se=[])):(se=se||[]).push(ir,pn))}M&&(se=se||[]).push("style",M);var ir=se;(h.updateQueue=ir)&&(h.flags|=4)}},gn=function(c,h,M,I){M!==I&&(h.flags|=4)};function nr(c,h){if(!hs)switch(c.tailMode){case"hidden":h=c.tail;for(var M=null;h!==null;)h.alternate!==null&&(M=h),h=h.sibling;M===null?c.tail=null:M.sibling=null;break;case"collapsed":M=c.tail;for(var I=null;M!==null;)M.alternate!==null&&(I=M),M=M.sibling;I===null?h||c.tail===null?c.tail=null:c.tail.sibling=null:I.sibling=null}}function dr(c){var h=c.alternate!==null&&c.alternate.child===c.child,M=0,I=0;if(h)for(var Q=c.child;Q!==null;)M|=Q.lanes|Q.childLanes,I|=Q.subtreeFlags&14680064,I|=Q.flags&14680064,Q.return=c,Q=Q.sibling;else for(Q=c.child;Q!==null;)M|=Q.lanes|Q.childLanes,I|=Q.subtreeFlags,I|=Q.flags,Q.return=c,Q=Q.sibling;return c.subtreeFlags|=I,c.childLanes=M,h}function ri(c,h,M){var I=h.pendingProps;switch(Pc(h),h.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dr(h),null;case 1:return na(h.type)&&su(),dr(h),null;case 3:return I=h.stateNode,sc(),ds(da),ds($s),jc(),I.pendingContext&&(I.context=I.pendingContext,I.pendingContext=null),(c===null||c.child===null)&&(_c(h)?h.flags|=4:c===null||c.memoizedState.isDehydrated&&!(h.flags&256)||(h.flags|=1024,hl!==null&&(If(hl),hl=null))),Wt(c,h),dr(h),null;case 5:ql(h);var Q=Dl(Vo.current);if(M=h.type,c!==null&&h.stateNode!=null)mn(c,h,M,I,Q),c.ref!==h.ref&&(h.flags|=512,h.flags|=2097152);else{if(!I){if(h.stateNode===null)throw Error(d(166));return dr(h),null}if(c=Dl(pl.current),_c(h)){I=h.stateNode,M=h.type;var se=h.memoizedProps;switch(I[Fa]=h,I[Ss]=se,c=(h.mode&1)!==0,M){case"dialog":no("cancel",I),no("close",I);break;case"iframe":case"object":case"embed":no("load",I);break;case"video":case"audio":for(Q=0;Q<xr.length;Q++)no(xr[Q],I);break;case"source":no("error",I);break;case"img":case"image":case"link":no("error",I),no("load",I);break;case"details":no("toggle",I);break;case"input":kt(I,se),no("invalid",I);break;case"select":I._wrapperState={wasMultiple:!!se.multiple},no("invalid",I);break;case"textarea":cn(I,se),no("invalid",I)}Ze(M,se),Q=null;for(var Ve in se)if(se.hasOwnProperty(Ve)){var Gt=se[Ve];Ve==="children"?typeof Gt=="string"?I.textContent!==Gt&&(se.suppressHydrationWarning!==!0&&Bl(I.textContent,Gt,c),Q=["children",Gt]):typeof Gt=="number"&&I.textContent!==""+Gt&&(se.suppressHydrationWarning!==!0&&Bl(I.textContent,Gt,c),Q=["children",""+Gt]):E.hasOwnProperty(Ve)&&Gt!=null&&Ve==="onScroll"&&no("scroll",I)}switch(M){case"input":Ue(I),Rn(I,se,!0);break;case"textarea":Ue(I),on(I);break;case"select":case"option":break;default:typeof se.onClick=="function"&&(I.onclick=ba)}I=Q,h.updateQueue=I,I!==null&&(h.flags|=4)}else{Ve=Q.nodeType===9?Q:Q.ownerDocument,c==="http://www.w3.org/1999/xhtml"&&(c=dt(M)),c==="http://www.w3.org/1999/xhtml"?M==="script"?(c=Ve.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild)):typeof I.is=="string"?c=Ve.createElement(M,{is:I.is}):(c=Ve.createElement(M),M==="select"&&(Ve=c,I.multiple?Ve.multiple=!0:I.size&&(Ve.size=I.size))):c=Ve.createElementNS(c,M),c[Fa]=h,c[Ss]=I,et(c,h,!1,!1),h.stateNode=c;e:{switch(Ve=pt(M,I),M){case"dialog":no("cancel",c),no("close",c),Q=I;break;case"iframe":case"object":case"embed":no("load",c),Q=I;break;case"video":case"audio":for(Q=0;Q<xr.length;Q++)no(xr[Q],c);Q=I;break;case"source":no("error",c),Q=I;break;case"img":case"image":case"link":no("error",c),no("load",c),Q=I;break;case"details":no("toggle",c),Q=I;break;case"input":kt(c,I),Q=lt(c,I),no("invalid",c);break;case"option":Q=I;break;case"select":c._wrapperState={wasMultiple:!!I.multiple},Q=pe({},I,{value:void 0}),no("invalid",c);break;case"textarea":cn(c,I),Q=Yn(c,I),no("invalid",c);break;default:Q=I}Ze(M,Q),Gt=Q;for(se in Gt)if(Gt.hasOwnProperty(se)){var pn=Gt[se];se==="style"?re(c,pn):se==="dangerouslySetInnerHTML"?(pn=pn?pn.__html:void 0,pn!=null&&rn(c,pn)):se==="children"?typeof pn=="string"?(M!=="textarea"||pn!=="")&&ke(c,pn):typeof pn=="number"&&ke(c,""+pn):se!=="suppressContentEditableWarning"&&se!=="suppressHydrationWarning"&&se!=="autoFocus"&&(E.hasOwnProperty(se)?pn!=null&&se==="onScroll"&&no("scroll",c):pn!=null&&k(c,se,pn,Ve))}switch(M){case"input":Ue(c),Rn(c,I,!1);break;case"textarea":Ue(c),on(c);break;case"option":I.value!=null&&c.setAttribute("value",""+ut(I.value));break;case"select":c.multiple=!!I.multiple,se=I.value,se!=null?yn(c,!!I.multiple,se,!1):I.defaultValue!=null&&yn(c,!!I.multiple,I.defaultValue,!0);break;default:typeof Q.onClick=="function"&&(c.onclick=ba)}switch(M){case"button":case"input":case"select":case"textarea":I=!!I.autoFocus;break e;case"img":I=!0;break e;default:I=!1}}I&&(h.flags|=4)}h.ref!==null&&(h.flags|=512,h.flags|=2097152)}return dr(h),null;case 6:if(c&&h.stateNode!=null)gn(c,h,c.memoizedProps,I);else{if(typeof I!="string"&&h.stateNode===null)throw Error(d(166));if(M=Dl(Vo.current),Dl(pl.current),_c(h)){if(I=h.stateNode,M=h.memoizedProps,I[Fa]=h,(se=I.nodeValue!==M)&&(c=ha,c!==null))switch(c.tag){case 3:Bl(I.nodeValue,M,(c.mode&1)!==0);break;case 5:c.memoizedProps.suppressHydrationWarning!==!0&&Bl(I.nodeValue,M,(c.mode&1)!==0)}se&&(h.flags|=4)}else I=(M.nodeType===9?M:M.ownerDocument).createTextNode(I),I[Fa]=h,h.stateNode=I}return dr(h),null;case 13:if(ds(vs),I=h.memoizedState,c===null||c.memoizedState!==null&&c.memoizedState.dehydrated!==null){if(hs&&xa!==null&&h.mode&1&&!(h.flags&128))Qf(),cu(),h.flags|=98560,se=!1;else if(se=_c(h),I!==null&&I.dehydrated!==null){if(c===null){if(!se)throw Error(d(318));if(se=h.memoizedState,se=se!==null?se.dehydrated:null,!se)throw Error(d(317));se[Fa]=h}else cu(),!(h.flags&128)&&(h.memoizedState=null),h.flags|=4;dr(h),se=!1}else hl!==null&&(If(hl),hl=null),se=!0;if(!se)return h.flags&65536?h:null}return h.flags&128?(h.lanes=M,h):(I=I!==null,I!==(c!==null&&c.memoizedState!==null)&&I&&(h.child.flags|=8192,h.mode&1&&(c===null||vs.current&1?Vs===0&&(Vs=3):Zf())),h.updateQueue!==null&&(h.flags|=4),dr(h),null);case 4:return sc(),Wt(c,h),c===null&&Ks(h.stateNode.containerInfo),dr(h),null;case 10:return Ru(h.type._context),dr(h),null;case 17:return na(h.type)&&su(),dr(h),null;case 19:if(ds(vs),se=h.memoizedState,se===null)return dr(h),null;if(I=(h.flags&128)!==0,Ve=se.rendering,Ve===null)if(I)nr(se,!1);else{if(Vs!==0||c!==null&&c.flags&128)for(c=h.child;c!==null;){if(Ve=mu(c),Ve!==null){for(h.flags|=128,nr(se,!1),I=Ve.updateQueue,I!==null&&(h.updateQueue=I,h.flags|=4),h.subtreeFlags=0,I=M,M=h.child;M!==null;)se=M,c=I,se.flags&=14680066,Ve=se.alternate,Ve===null?(se.childLanes=0,se.lanes=c,se.child=null,se.subtreeFlags=0,se.memoizedProps=null,se.memoizedState=null,se.updateQueue=null,se.dependencies=null,se.stateNode=null):(se.childLanes=Ve.childLanes,se.lanes=Ve.lanes,se.child=Ve.child,se.subtreeFlags=0,se.deletions=null,se.memoizedProps=Ve.memoizedProps,se.memoizedState=Ve.memoizedState,se.updateQueue=Ve.updateQueue,se.type=Ve.type,c=Ve.dependencies,se.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext}),M=M.sibling;return Bo(vs,vs.current&1|2),h.child}c=c.sibling}se.tail!==null&&Ke()>sr&&(h.flags|=128,I=!0,nr(se,!1),h.lanes=4194304)}else{if(!I)if(c=mu(Ve),c!==null){if(h.flags|=128,I=!0,M=c.updateQueue,M!==null&&(h.updateQueue=M,h.flags|=4),nr(se,!0),se.tail===null&&se.tailMode==="hidden"&&!Ve.alternate&&!hs)return dr(h),null}else 2*Ke()-se.renderingStartTime>sr&&M!==1073741824&&(h.flags|=128,I=!0,nr(se,!1),h.lanes=4194304);se.isBackwards?(Ve.sibling=h.child,h.child=Ve):(M=se.last,M!==null?M.sibling=Ve:h.child=Ve,se.last=Ve)}return se.tail!==null?(h=se.tail,se.rendering=h,se.tail=h.sibling,se.renderingStartTime=Ke(),h.sibling=null,M=vs.current,Bo(vs,I?M&1|2:M&1),h):(dr(h),null);case 22:case 23:return id(),I=h.memoizedState!==null,c!==null&&c.memoizedState!==null!==I&&(h.flags|=8192),I&&h.mode&1?Ga&1073741824&&(dr(h),h.subtreeFlags&6&&(h.flags|=8192)):dr(h),null;case 24:return null;case 25:return null}throw Error(d(156,h.tag))}function Ki(c,h){switch(Pc(h),h.tag){case 1:return na(h.type)&&su(),c=h.flags,c&65536?(h.flags=c&-65537|128,h):null;case 3:return sc(),ds(da),ds($s),jc(),c=h.flags,c&65536&&!(c&128)?(h.flags=c&-65537|128,h):null;case 5:return ql(h),null;case 13:if(ds(vs),c=h.memoizedState,c!==null&&c.dehydrated!==null){if(h.alternate===null)throw Error(d(340));cu()}return c=h.flags,c&65536?(h.flags=c&-65537|128,h):null;case 19:return ds(vs),null;case 4:return sc(),null;case 10:return Ru(h.type._context),null;case 22:case 23:return id(),null;case 24:return null;default:return null}}var $i=!1,Lo=!1,xo=typeof WeakSet=="function"?WeakSet:Set,hr=null;function ns(c,h){var M=c.ref;if(M!==null)if(typeof M=="function")try{M(null)}catch(I){Rs(c,h,I)}else M.current=null}function ra(c,h,M){try{M()}catch(I){Rs(c,h,I)}}var ga=!1;function ws(c,h){if(Ro=Sr,c=Xo(),po(c)){if("selectionStart"in c)var M={start:c.selectionStart,end:c.selectionEnd};else e:{M=(M=c.ownerDocument)&&M.defaultView||window;var I=M.getSelection&&M.getSelection();if(I&&I.rangeCount!==0){M=I.anchorNode;var Q=I.anchorOffset,se=I.focusNode;I=I.focusOffset;try{M.nodeType,se.nodeType}catch{M=null;break e}var Ve=0,Gt=-1,pn=-1,ir=0,zr=0,kr=c,Hr=null;t:for(;;){for(var Ei;kr!==M||Q!==0&&kr.nodeType!==3||(Gt=Ve+Q),kr!==se||I!==0&&kr.nodeType!==3||(pn=Ve+I),kr.nodeType===3&&(Ve+=kr.nodeValue.length),(Ei=kr.firstChild)!==null;)Hr=kr,kr=Ei;for(;;){if(kr===c)break t;if(Hr===M&&++ir===Q&&(Gt=Ve),Hr===se&&++zr===I&&(pn=Ve),(Ei=kr.nextSibling)!==null)break;kr=Hr,Hr=kr.parentNode}kr=Ei}M=Gt===-1||pn===-1?null:{start:Gt,end:pn}}else M=null}M=M||{start:0,end:0}}else M=null;for(Lr={focusedElem:c,selectionRange:M},Sr=!1,hr=h;hr!==null;)if(h=hr,c=h.child,(h.subtreeFlags&1028)!==0&&c!==null)c.return=h,hr=c;else for(;hr!==null;){h=hr;try{var Ii=h.alternate;if(h.flags&1024)switch(h.tag){case 0:case 11:case 15:break;case 1:if(Ii!==null){var Ni=Ii.memoizedProps,ia=Ii.memoizedState,Zn=h.stateNode,wn=Zn.getSnapshotBeforeUpdate(h.elementType===h.type?Ni:ja(h.type,Ni),ia);Zn.__reactInternalSnapshotBeforeUpdate=wn}break;case 3:var er=h.stateNode.containerInfo;er.nodeType===1?er.textContent="":er.nodeType===9&&er.documentElement&&er.removeChild(er.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(d(163))}}catch(si){Rs(h,h.return,si)}if(c=h.sibling,c!==null){c.return=h.return,hr=c;break}hr=h.return}return Ii=ga,ga=!1,Ii}function is(c,h,M){var I=h.updateQueue;if(I=I!==null?I.lastEffect:null,I!==null){var Q=I=I.next;do{if((Q.tag&c)===c){var se=Q.destroy;Q.destroy=void 0,se!==void 0&&ra(h,M,se)}Q=Q.next}while(Q!==I)}}function Ia(c,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var M=h=h.next;do{if((M.tag&c)===c){var I=M.create;M.destroy=I()}M=M.next}while(M!==h)}}function bu(c){var h=c.ref;if(h!==null){var M=c.stateNode;switch(c.tag){case 5:c=M;break;default:c=M}typeof h=="function"?h(c):h.current=c}}function Qo(c){var h=c.alternate;h!==null&&(c.alternate=null,Qo(h)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(h=c.stateNode,h!==null&&(delete h[Fa],delete h[Ss],delete h[Yl],delete h[Xu],delete h[qu])),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function Jo(c){return c.tag===5||c.tag===3||c.tag===4}function Df(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||Jo(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function bc(c,h,M){var I=c.tag;if(I===5||I===6)c=c.stateNode,h?M.nodeType===8?M.parentNode.insertBefore(c,h):M.insertBefore(c,h):(M.nodeType===8?(h=M.parentNode,h.insertBefore(c,M)):(h=M,h.appendChild(c)),M=M._reactRootContainer,M!=null||h.onclick!==null||(h.onclick=ba));else if(I!==4&&(c=c.child,c!==null))for(bc(c,h,M),c=c.sibling;c!==null;)bc(c,h,M),c=c.sibling}function Yc(c,h,M){var I=c.tag;if(I===5||I===6)c=c.stateNode,h?M.insertBefore(c,h):M.appendChild(c);else if(I!==4&&(c=c.child,c!==null))for(Yc(c,h,M),c=c.sibling;c!==null;)Yc(c,h,M),c=c.sibling}var Xs=null,_l=!1;function qs(c,h,M){for(M=M.child;M!==null;)Bu(c,h,M),M=M.sibling}function Bu(c,h,M){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(At,M)}catch{}switch(M.tag){case 5:Lo||ns(M,h);case 6:var I=Xs,Q=_l;Xs=null,qs(c,h,M),Xs=I,_l=Q,Xs!==null&&(_l?(c=Xs,M=M.stateNode,c.nodeType===8?c.parentNode.removeChild(M):c.removeChild(M)):Xs.removeChild(M.stateNode));break;case 18:Xs!==null&&(_l?(c=Xs,M=M.stateNode,c.nodeType===8?gs(c.parentNode,M):c.nodeType===1&&gs(c,M),xn(c)):gs(Xs,M.stateNode));break;case 4:I=Xs,Q=_l,Xs=M.stateNode.containerInfo,_l=!0,qs(c,h,M),Xs=I,_l=Q;break;case 0:case 11:case 14:case 15:if(!Lo&&(I=M.updateQueue,I!==null&&(I=I.lastEffect,I!==null))){Q=I=I.next;do{var se=Q,Ve=se.destroy;se=se.tag,Ve!==void 0&&(se&2||se&4)&&ra(M,h,Ve),Q=Q.next}while(Q!==I)}qs(c,h,M);break;case 1:if(!Lo&&(ns(M,h),I=M.stateNode,typeof I.componentWillUnmount=="function"))try{I.props=M.memoizedProps,I.state=M.memoizedState,I.componentWillUnmount()}catch(Gt){Rs(M,h,Gt)}qs(c,h,M);break;case 21:qs(c,h,M);break;case 22:M.mode&1?(Lo=(I=Lo)||M.memoizedState!==null,qs(c,h,M),Lo=I):qs(c,h,M);break;default:qs(c,h,M)}}function Pf(c){var h=c.updateQueue;if(h!==null){c.updateQueue=null;var M=c.stateNode;M===null&&(M=c.stateNode=new xo),h.forEach(function(I){var Q=Le.bind(null,c,I);M.has(I)||(M.add(I),I.then(Q,Q))})}}function Ha(c,h){var M=h.deletions;if(M!==null)for(var I=0;I<M.length;I++){var Q=M[I];try{var se=c,Ve=h,Gt=Ve;e:for(;Gt!==null;){switch(Gt.tag){case 5:Xs=Gt.stateNode,_l=!1;break e;case 3:Xs=Gt.stateNode.containerInfo,_l=!0;break e;case 4:Xs=Gt.stateNode.containerInfo,_l=!0;break e}Gt=Gt.return}if(Xs===null)throw Error(d(160));Bu(se,Ve,Q),Xs=null,_l=!1;var pn=Q.alternate;pn!==null&&(pn.return=null),Q.return=null}catch(ir){Rs(Q,h,ir)}}if(h.subtreeFlags&12854)for(h=h.child;h!==null;)Af(h,c),h=h.sibling}function Af(c,h){var M=c.alternate,I=c.flags;switch(c.tag){case 0:case 11:case 14:case 15:if(Ha(h,c),Ll(c),I&4){try{is(3,c,c.return),Ia(3,c)}catch(Ni){Rs(c,c.return,Ni)}try{is(5,c,c.return)}catch(Ni){Rs(c,c.return,Ni)}}break;case 1:Ha(h,c),Ll(c),I&512&&M!==null&&ns(M,M.return);break;case 5:if(Ha(h,c),Ll(c),I&512&&M!==null&&ns(M,M.return),c.flags&32){var Q=c.stateNode;try{ke(Q,"")}catch(Ni){Rs(c,c.return,Ni)}}if(I&4&&(Q=c.stateNode,Q!=null)){var se=c.memoizedProps,Ve=M!==null?M.memoizedProps:se,Gt=c.type,pn=c.updateQueue;if(c.updateQueue=null,pn!==null)try{Gt==="input"&&se.type==="radio"&&se.name!=null&&nn(Q,se),pt(Gt,Ve);var ir=pt(Gt,se);for(Ve=0;Ve<pn.length;Ve+=2){var zr=pn[Ve],kr=pn[Ve+1];zr==="style"?re(Q,kr):zr==="dangerouslySetInnerHTML"?rn(Q,kr):zr==="children"?ke(Q,kr):k(Q,zr,kr,ir)}switch(Gt){case"input":hn(Q,se);break;case"textarea":st(Q,se);break;case"select":var Hr=Q._wrapperState.wasMultiple;Q._wrapperState.wasMultiple=!!se.multiple;var Ei=se.value;Ei!=null?yn(Q,!!se.multiple,Ei,!1):Hr!==!!se.multiple&&(se.defaultValue!=null?yn(Q,!!se.multiple,se.defaultValue,!0):yn(Q,!!se.multiple,se.multiple?[]:"",!1))}Q[Ss]=se}catch(Ni){Rs(c,c.return,Ni)}}break;case 6:if(Ha(h,c),Ll(c),I&4){if(c.stateNode===null)throw Error(d(162));Q=c.stateNode,se=c.memoizedProps;try{Q.nodeValue=se}catch(Ni){Rs(c,c.return,Ni)}}break;case 3:if(Ha(h,c),Ll(c),I&4&&M!==null&&M.memoizedState.isDehydrated)try{xn(h.containerInfo)}catch(Ni){Rs(c,c.return,Ni)}break;case 4:Ha(h,c),Ll(c);break;case 13:Ha(h,c),Ll(c),Q=c.child,Q.flags&8192&&(se=Q.memoizedState!==null,Q.stateNode.isHidden=se,!se||Q.alternate!==null&&Q.alternate.memoizedState!==null||(Hu=Ke())),I&4&&Pf(c);break;case 22:if(zr=M!==null&&M.memoizedState!==null,c.mode&1?(Lo=(ir=Lo)||zr,Ha(h,c),Lo=ir):Ha(h,c),Ll(c),I&8192){if(ir=c.memoizedState!==null,(c.stateNode.isHidden=ir)&&!zr&&c.mode&1)for(hr=c,zr=c.child;zr!==null;){for(kr=hr=zr;hr!==null;){switch(Hr=hr,Ei=Hr.child,Hr.tag){case 0:case 11:case 14:case 15:is(4,Hr,Hr.return);break;case 1:ns(Hr,Hr.return);var Ii=Hr.stateNode;if(typeof Ii.componentWillUnmount=="function"){I=Hr,M=Hr.return;try{h=I,Ii.props=h.memoizedProps,Ii.state=h.memoizedState,Ii.componentWillUnmount()}catch(Ni){Rs(I,M,Ni)}}break;case 5:ns(Hr,Hr.return);break;case 22:if(Hr.memoizedState!==null){xu(kr);continue}}Ei!==null?(Ei.return=Hr,hr=Ei):xu(kr)}zr=zr.sibling}e:for(zr=null,kr=c;;){if(kr.tag===5){if(zr===null){zr=kr;try{Q=kr.stateNode,ir?(se=Q.style,typeof se.setProperty=="function"?se.setProperty("display","none","important"):se.display="none"):(Gt=kr.stateNode,pn=kr.memoizedProps.style,Ve=pn!=null&&pn.hasOwnProperty("display")?pn.display:null,Gt.style.display=W("display",Ve))}catch(Ni){Rs(c,c.return,Ni)}}}else if(kr.tag===6){if(zr===null)try{kr.stateNode.nodeValue=ir?"":kr.memoizedProps}catch(Ni){Rs(c,c.return,Ni)}}else if((kr.tag!==22&&kr.tag!==23||kr.memoizedState===null||kr===c)&&kr.child!==null){kr.child.return=kr,kr=kr.child;continue}if(kr===c)break e;for(;kr.sibling===null;){if(kr.return===null||kr.return===c)break e;zr===kr&&(zr=null),kr=kr.return}zr===kr&&(zr=null),kr.sibling.return=kr.return,kr=kr.sibling}}break;case 19:Ha(h,c),Ll(c),I&4&&Pf(c);break;case 21:break;default:Ha(h,c),Ll(c)}}function Ll(c){var h=c.flags;if(h&2){try{e:{for(var M=c.return;M!==null;){if(Jo(M)){var I=M;break e}M=M.return}throw Error(d(160))}switch(I.tag){case 5:var Q=I.stateNode;I.flags&32&&(ke(Q,""),I.flags&=-33);var se=Df(c);Yc(c,se,Q);break;case 3:case 4:var Ve=I.stateNode.containerInfo,Gt=Df(c);bc(c,Gt,Ve);break;default:throw Error(d(161))}}catch(pn){Rs(c,c.return,pn)}c.flags&=-3}h&4096&&(c.flags&=-4097)}function zf(c,h,M){hr=c,ku(c,h,M)}function ku(c,h,M){for(var I=(c.mode&1)!==0;hr!==null;){var Q=hr,se=Q.child;if(Q.tag===22&&I){var Ve=Q.memoizedState!==null||$i;if(!Ve){var Gt=Q.alternate,pn=Gt!==null&&Gt.memoizedState!==null||Lo;Gt=$i;var ir=Lo;if($i=Ve,(Lo=pn)&&!ir)for(hr=Q;hr!==null;)Ve=hr,pn=Ve.child,Ve.tag===22&&Ve.memoizedState!==null?Rf(Q):pn!==null?(pn.return=Ve,hr=pn):Rf(Q);for(;se!==null;)hr=se,ku(se,h,M),se=se.sibling;hr=Q,$i=Gt,Lo=ir}ju(c,h,M)}else Q.subtreeFlags&8772&&se!==null?(se.return=Q,hr=se):ju(c,h,M)}}function ju(c){for(;hr!==null;){var h=hr;if(h.flags&8772){var M=h.alternate;try{if(h.flags&8772)switch(h.tag){case 0:case 11:case 15:Lo||Ia(5,h);break;case 1:var I=h.stateNode;if(h.flags&4&&!Lo)if(M===null)I.componentDidMount();else{var Q=h.elementType===h.type?M.memoizedProps:ja(h.type,M.memoizedProps);I.componentDidUpdate(Q,M.memoizedState,I.__reactInternalSnapshotBeforeUpdate)}var se=h.updateQueue;se!==null&&rc(h,se,I);break;case 3:var Ve=h.updateQueue;if(Ve!==null){if(M=null,h.child!==null)switch(h.child.tag){case 5:M=h.child.stateNode;break;case 1:M=h.child.stateNode}rc(h,Ve,M)}break;case 5:var Gt=h.stateNode;if(M===null&&h.flags&4){M=Gt;var pn=h.memoizedProps;switch(h.type){case"button":case"input":case"select":case"textarea":pn.autoFocus&&M.focus();break;case"img":pn.src&&(M.src=pn.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(h.memoizedState===null){var ir=h.alternate;if(ir!==null){var zr=ir.memoizedState;if(zr!==null){var kr=zr.dehydrated;kr!==null&&xn(kr)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(d(163))}Lo||h.flags&512&&bu(h)}catch(Hr){Rs(h,h.return,Hr)}}if(h===c){hr=null;break}if(M=h.sibling,M!==null){M.return=h.return,hr=M;break}hr=h.return}}function xu(c){for(;hr!==null;){var h=hr;if(h===c){hr=null;break}var M=h.sibling;if(M!==null){M.return=h.return,hr=M;break}hr=h.return}}function Rf(c){for(;hr!==null;){var h=hr;try{switch(h.tag){case 0:case 11:case 15:var M=h.return;try{Ia(4,h)}catch(pn){Rs(h,M,pn)}break;case 1:var I=h.stateNode;if(typeof I.componentDidMount=="function"){var Q=h.return;try{I.componentDidMount()}catch(pn){Rs(h,Q,pn)}}var se=h.return;try{bu(h)}catch(pn){Rs(h,se,pn)}break;case 5:var Ve=h.return;try{bu(h)}catch(pn){Rs(h,Ve,pn)}}}catch(pn){Rs(h,h.return,pn)}if(h===c){hr=null;break}var Gt=h.sibling;if(Gt!==null){Gt.return=h.return,hr=Gt;break}hr=h.return}}var Uu=Math.ceil,Za=j.ReactCurrentDispatcher,xc=j.ReactCurrentOwner,Ka=j.ReactCurrentBatchConfig,$o=0,Bs=null,ks=null,zs=0,Ga=0,Wu=Ba(0),Vs=0,Qc=null,zu=0,Vu=0,Vf=0,gl=null,Ma=null,Hu=0,sr=1/0,pi=null,Mi=!1,Gi=null,ao=null,Io=!1,os=null,Hl=0,Cu=0,Cc=null,Jc=-1,Xc=0;function va(){return $o&6?Ke():Jc!==-1?Jc:Jc=Ke()}function Zl(c){return c.mode&1?$o&2&&zs!==0?zs&-zs:Jf.transition!==null?(Xc===0&&(Xc=He()),Xc):(c=Vt,c!==0||(c=window.event,c=c===void 0?16:Oi(c.type)),c):1}function Kl(c,h,M,I){if(50<Cu)throw Cu=0,Cc=null,Error(d(185));Rt(c,M,I),(!($o&2)||c!==Bs)&&(c===Bs&&(!($o&2)&&(Vu|=M),Vs===4&&Ku(c,zs)),ol(c,I),M===1&&$o===0&&!(h.mode&1)&&(sr=Ke()+500,Ql&&dl()))}function ol(c,h){var M=c.callbackNode;ge(c,h);var I=de(c,c===Bs?zs:0);if(I===0)M!==null&&_r(M),c.callbackNode=null,c.callbackPriority=0;else if(h=I&-I,c.callbackPriority!==h){if(M!=null&&_r(M),h===1)c.tag===0?of(pd.bind(null,c)):wc(pd.bind(null,c)),kl(function(){!($o&6)&&dl()}),M=null;else{switch(Jt(I)){case 1:M=tn;break;case 4:M=Fn;break;case 16:M=Cn;break;case 536870912:M=Ge;break;default:M=Cn}M=oe(M,hd.bind(null,c))}c.callbackPriority=h,c.callbackNode=M}}function hd(c,h){if(Jc=-1,Xc=0,$o&6)throw Error(d(327));var M=c.callbackNode;if(Oc()&&c.callbackNode!==M)return null;var I=de(c,c===Bs?zs:0);if(I===0)return null;if(I&30||I&c.expiredLanes||h)h=Kf(c,I);else{h=I;var Q=$o;$o|=2;var se=md();(Bs!==c||zs!==h)&&(pi=null,sr=Ke()+500,Sc(c,h));do try{Od();break}catch(Gt){od(c,Gt)}while(1);Au(),Za.current=se,$o=Q,ks!==null?h=0:(Bs=null,zs=0,h=Vs)}if(h!==0){if(h===2&&(Q=je(c),Q!==0&&(I=Q,h=Zu(c,Q))),h===1)throw M=Qc,Sc(c,0),Ku(c,I),ol(c,Ke()),M;if(h===6)Ku(c,I);else{if(Q=c.current.alternate,!(I&30)&&!rd(Q)&&(h=Kf(c,I),h===2&&(se=je(c),se!==0&&(I=se,h=Zu(c,se))),h===1))throw M=Qc,Sc(c,0),Ku(c,I),ol(c,Ke()),M;switch(c.finishedWork=Q,c.finishedLanes=I,h){case 0:case 1:throw Error(d(345));case 2:Mu(c,Ma,pi);break;case 3:if(Ku(c,I),(I&130023424)===I&&(h=Hu+500-Ke(),10<h)){if(de(c,0)!==0)break;if(Q=c.suspendedLanes,(Q&I)!==I){va(),c.pingedLanes|=c.suspendedLanes&Q;break}c.timeoutHandle=Ws(Mu.bind(null,c,Ma,pi),h);break}Mu(c,Ma,pi);break;case 4:if(Ku(c,I),(I&4194240)===I)break;for(h=c.eventTimes,Q=-1;0<I;){var Ve=31-Yt(I);se=1<<Ve,Ve=h[Ve],Ve>Q&&(Q=Ve),I&=~se}if(I=Q,I=Ke()-I,I=(120>I?120:480>I?480:1080>I?1080:1920>I?1920:3e3>I?3e3:4320>I?4320:1960*Uu(I/1960))-I,10<I){c.timeoutHandle=Ws(Mu.bind(null,c,Ma,pi),I);break}Mu(c,Ma,pi);break;case 5:Mu(c,Ma,pi);break;default:throw Error(d(329))}}}return ol(c,Ke()),c.callbackNode===M?hd.bind(null,c):null}function Zu(c,h){var M=gl;return c.current.memoizedState.isDehydrated&&(Sc(c,h).flags|=256),c=Kf(c,h),c!==2&&(h=Ma,Ma=M,h!==null&&If(h)),c}function If(c){Ma===null?Ma=c:Ma.push.apply(Ma,c)}function rd(c){for(var h=c;;){if(h.flags&16384){var M=h.updateQueue;if(M!==null&&(M=M.stores,M!==null))for(var I=0;I<M.length;I++){var Q=M[I],se=Q.getSnapshot;Q=Q.value;try{if(!bs(se(),Q))return!1}catch{return!1}}}if(M=h.child,h.subtreeFlags&16384&&M!==null)M.return=h,h=M;else{if(h===c)break;for(;h.sibling===null;){if(h.return===null||h.return===c)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function Ku(c,h){for(h&=~Vf,h&=~Vu,c.suspendedLanes|=h,c.pingedLanes&=~h,c=c.expirationTimes;0<h;){var M=31-Yt(h),I=1<<M;c[M]=-1,h&=~I}}function pd(c){if($o&6)throw Error(d(327));Oc();var h=de(c,0);if(!(h&1))return ol(c,Ke()),null;var M=Kf(c,h);if(c.tag!==0&&M===2){var I=je(c);I!==0&&(h=I,M=Zu(c,I))}if(M===1)throw M=Qc,Sc(c,0),Ku(c,h),ol(c,Ke()),M;if(M===6)throw Error(d(345));return c.finishedWork=c.current.alternate,c.finishedLanes=h,Mu(c,Ma,pi),ol(c,Ke()),null}function Hf(c,h){var M=$o;$o|=1;try{return c(h)}finally{$o=M,$o===0&&(sr=Ke()+500,Ql&&dl())}}function Mc(c){os!==null&&os.tag===0&&!($o&6)&&Oc();var h=$o;$o|=1;var M=Ka.transition,I=Vt;try{if(Ka.transition=null,Vt=1,c)return c()}finally{Vt=I,Ka.transition=M,$o=h,!($o&6)&&dl()}}function id(){Ga=Wu.current,ds(Wu)}function Sc(c,h){c.finishedWork=null,c.finishedLanes=0;var M=c.timeoutHandle;if(M!==-1&&(c.timeoutHandle=-1,ta(M)),ks!==null)for(M=ks.return;M!==null;){var I=M;switch(Pc(I),I.tag){case 1:I=I.type.childContextTypes,I!=null&&su();break;case 3:sc(),ds(da),ds($s),jc();break;case 5:ql(I);break;case 4:sc();break;case 13:ds(vs);break;case 19:ds(vs);break;case 10:Ru(I.type._context);break;case 22:case 23:id()}M=M.return}if(Bs=c,ks=c=sn(c.current,null),zs=Ga=h,Vs=0,Qc=null,Vf=Vu=zu=0,Ma=gl=null,Jl!==null){for(h=0;h<Jl.length;h++)if(M=Jl[h],I=M.interleaved,I!==null){M.interleaved=null;var Q=I.next,se=M.pending;if(se!==null){var Ve=se.next;se.next=Q,I.next=Ve}M.pending=I}Jl=null}return c}function od(c,h){do{var M=ks;try{if(Au(),Wa.current=hc,Ns){for(var I=Oo.memoizedState;I!==null;){var Q=I.queue;Q!==null&&(Q.pending=null),I=I.next}Ns=!1}if(za=0,Ho=Ts=Oo=null,gu=!1,eu=0,xc.current=null,M===null||M.return===null){Vs=1,Qc=h,ks=null;break}e:{var se=c,Ve=M.return,Gt=M,pn=h;if(h=zs,Gt.flags|=32768,pn!==null&&typeof pn=="object"&&typeof pn.then=="function"){var ir=pn,zr=Gt,kr=zr.tag;if(!(zr.mode&1)&&(kr===0||kr===11||kr===15)){var Hr=zr.alternate;Hr?(zr.updateQueue=Hr.updateQueue,zr.memoizedState=Hr.memoizedState,zr.lanes=Hr.lanes):(zr.updateQueue=null,zr.memoizedState=null)}var Ei=ed(Ve);if(Ei!==null){Ei.flags&=-257,Mf(Ei,Ve,Gt,se,h),Ei.mode&1&&Bf(se,ir,h),h=Ei,pn=ir;var Ii=h.updateQueue;if(Ii===null){var Ni=new Set;Ni.add(pn),h.updateQueue=Ni}else Ii.add(pn);break e}else{if(!(h&1)){Bf(se,ir,h),Zf();break e}pn=Error(d(426))}}else if(hs&&Gt.mode&1){var ia=ed(Ve);if(ia!==null){!(ia.flags&65536)&&(ia.flags|=256),Mf(ia,Ve,Gt,se,h),af(zl(pn,Gt));break e}}se=pn=zl(pn,Gt),Vs!==4&&(Vs=2),gl===null?gl=[se]:gl.push(se),se=Ve;do{switch(se.tag){case 3:se.flags|=65536,h&=-h,se.lanes|=h;var Zn=Cf(se,pn,h);Xf(se,Zn);break e;case 1:Gt=pn;var wn=se.type,er=se.stateNode;if(!(se.flags&128)&&(typeof wn.getDerivedStateFromError=="function"||er!==null&&typeof er.componentDidCatch=="function"&&(ao===null||!ao.has(er)))){se.flags|=65536,h&=-h,se.lanes|=h;var si=Il(se,Gt,h);Xf(se,si);break e}}se=se.return}while(se!==null)}wd(M)}catch(Ui){h=Ui,ks===M&&M!==null&&(ks=M=M.return);continue}break}while(1)}function md(){var c=Za.current;return Za.current=hc,c===null?hc:c}function Zf(){(Vs===0||Vs===3||Vs===2)&&(Vs=4),Bs===null||!(zu&268435455)&&!(Vu&268435455)||Ku(Bs,zs)}function Kf(c,h){var M=$o;$o|=2;var I=md();(Bs!==c||zs!==h)&&(pi=null,Sc(c,h));do try{kd();break}catch(Q){od(c,Q)}while(1);if(Au(),$o=M,Za.current=I,ks!==null)throw Error(d(261));return Bs=null,zs=0,Vs}function kd(){for(;ks!==null;)Td(ks)}function Od(){for(;ks!==null&&!Xn();)Td(ks)}function Td(c){var h=nt(c.alternate,c,Ga);c.memoizedProps=c.pendingProps,h===null?wd(c):ks=h,xc.current=null}function wd(c){var h=c;do{var M=h.alternate;if(c=h.return,h.flags&32768){if(M=Ki(M,h),M!==null){M.flags&=32767,ks=M;return}if(c!==null)c.flags|=32768,c.subtreeFlags=0,c.deletions=null;else{Vs=6,ks=null;return}}else if(M=ri(M,h,Ga),M!==null){ks=M;return}if(h=h.sibling,h!==null){ks=h;return}ks=h=c}while(h!==null);Vs===0&&(Vs=5)}function Mu(c,h,M){var I=Vt,Q=Ka.transition;try{Ka.transition=null,Vt=1,qc(c,h,M,I)}finally{Ka.transition=Q,Vt=I}return null}function qc(c,h,M,I){do Oc();while(os!==null);if($o&6)throw Error(d(327));M=c.finishedWork;var Q=c.finishedLanes;if(M===null)return null;if(c.finishedWork=null,c.finishedLanes=0,M===c.current)throw Error(d(177));c.callbackNode=null,c.callbackPriority=0;var se=M.lanes|M.childLanes;if(fn(c,se),c===Bs&&(ks=Bs=null,zs=0),!(M.subtreeFlags&2064)&&!(M.flags&2064)||Io||(Io=!0,oe(Cn,function(){return Oc(),null})),se=(M.flags&15990)!==0,M.subtreeFlags&15990||se){se=Ka.transition,Ka.transition=null;var Ve=Vt;Vt=1;var Gt=$o;$o|=4,xc.current=null,ws(c,M),Af(M,c),go(Lr),Sr=!!Ro,Lr=Ro=null,c.current=M,zf(M,c,Q),mt(),$o=Gt,Vt=Ve,Ka.transition=se}else c.current=M;if(Io&&(Io=!1,os=c,Hl=Q),se=c.pendingLanes,se===0&&(ao=null),Zt(M.stateNode,I),ol(c,Ke()),h!==null)for(I=c.onRecoverableError,M=0;M<h.length;M++)Q=h[M],I(Q.value,{componentStack:Q.stack,digest:Q.digest});if(Mi)throw Mi=!1,c=Gi,Gi=null,c;return Hl&1&&c.tag!==0&&Oc(),se=c.pendingLanes,se&1?c===Cc?Cu++:(Cu=0,Cc=c):Cu=0,dl(),null}function Oc(){if(os!==null){var c=Jt(Hl),h=Ka.transition,M=Vt;try{if(Ka.transition=null,Vt=16>c?16:c,os===null)var I=!1;else{if(c=os,os=null,Hl=0,$o&6)throw Error(d(331));var Q=$o;for($o|=4,hr=c.current;hr!==null;){var se=hr,Ve=se.child;if(hr.flags&16){var Gt=se.deletions;if(Gt!==null){for(var pn=0;pn<Gt.length;pn++){var ir=Gt[pn];for(hr=ir;hr!==null;){var zr=hr;switch(zr.tag){case 0:case 11:case 15:is(8,zr,se)}var kr=zr.child;if(kr!==null)kr.return=zr,hr=kr;else for(;hr!==null;){zr=hr;var Hr=zr.sibling,Ei=zr.return;if(Qo(zr),zr===ir){hr=null;break}if(Hr!==null){Hr.return=Ei,hr=Hr;break}hr=Ei}}}var Ii=se.alternate;if(Ii!==null){var Ni=Ii.child;if(Ni!==null){Ii.child=null;do{var ia=Ni.sibling;Ni.sibling=null,Ni=ia}while(Ni!==null)}}hr=se}}if(se.subtreeFlags&2064&&Ve!==null)Ve.return=se,hr=Ve;else e:for(;hr!==null;){if(se=hr,se.flags&2048)switch(se.tag){case 0:case 11:case 15:is(9,se,se.return)}var Zn=se.sibling;if(Zn!==null){Zn.return=se.return,hr=Zn;break e}hr=se.return}}var wn=c.current;for(hr=wn;hr!==null;){Ve=hr;var er=Ve.child;if(Ve.subtreeFlags&2064&&er!==null)er.return=Ve,hr=er;else e:for(Ve=wn;hr!==null;){if(Gt=hr,Gt.flags&2048)try{switch(Gt.tag){case 0:case 11:case 15:Ia(9,Gt)}}catch(Ui){Rs(Gt,Gt.return,Ui)}if(Gt===Ve){hr=null;break e}var si=Gt.sibling;if(si!==null){si.return=Gt.return,hr=si;break e}hr=Gt.return}}if($o=Q,dl(),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(At,c)}catch{}I=!0}return I}finally{Vt=M,Ka.transition=h}}return!1}function sl(c,h,M){h=zl(M,h),h=Cf(c,h,1),c=Aa(c,h,1),h=va(),c!==null&&(Rt(c,1,h),ol(c,h))}function Rs(c,h,M){if(c.tag===3)sl(c,c,M);else for(;h!==null;){if(h.tag===3){sl(h,c,M);break}else if(h.tag===1){var I=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof I.componentDidCatch=="function"&&(ao===null||!ao.has(I))){c=zl(M,c),c=Il(h,c,1),h=Aa(h,c,1),c=va(),h!==null&&(Rt(h,1,c),ol(h,c));break}}h=h.return}}function sd(c,h,M){var I=c.pingCache;I!==null&&I.delete(h),h=va(),c.pingedLanes|=c.suspendedLanes&M,Bs===c&&(zs&M)===M&&(Vs===4||Vs===3&&(zs&130023424)===zs&&500>Ke()-Hu?Sc(c,0):Vf|=M),ol(c,h)}function Z(c,h){h===0&&(c.mode&1?(h=Vn,Vn<<=1,!(Vn&130023424)&&(Vn=4194304)):h=1);var M=va();c=rl(c,h),c!==null&&(Rt(c,h,M),ol(c,M))}function me(c){var h=c.memoizedState,M=0;h!==null&&(M=h.retryLane),Z(c,M)}function Le(c,h){var M=0;switch(c.tag){case 13:var I=c.stateNode,Q=c.memoizedState;Q!==null&&(M=Q.retryLane);break;case 19:I=c.stateNode;break;default:throw Error(d(314))}I!==null&&I.delete(h),Z(c,M)}var nt;nt=function(c,h,M){if(c!==null)if(c.memoizedProps!==h.pendingProps||da.current)Js=!0;else{if(!(c.lanes&M)&&!(h.flags&128))return Js=!1,ce(c,h,M);Js=!!(c.flags&131072)}else Js=!1,hs&&h.flags&1048576&&Dc(h,Ol,h.index);switch(h.lanes=0,h.tag){case 2:var I=h.type;Gc(c,h),c=h.pendingProps;var Q=qa(h,$s.current);fu(h,M),Q=mf(null,h,I,c,Q,M);var se=lc();return h.flags|=1,typeof Q=="object"&&Q!==null&&typeof Q.render=="function"&&Q.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,na(I)?(se=!0,au(h)):se=!1,h.memoizedState=Q.state!==null&&Q.state!==void 0?Q.state:null,$c(h),Q.updater=Iu,h.stateNode=Q,Q._reactInternals=h,ff(h,I,c,M),h=Nu(null,h,I,!0,se,M)):(h.tag=0,hs&&se&&Tu(h),ma(null,h,Q,M),h=h.child),h;case 16:I=h.elementType;e:{switch(Gc(c,h),c=h.pendingProps,Q=I._init,I=Q(I._payload),h.type=I,Q=h.tag=Nt(I),c=ja(I,c),Q){case 0:h=yc(null,h,I,c,M);break e;case 1:h=Zc(null,h,I,c,M);break e;case 11:h=Sf(null,h,I,c,M);break e;case 14:h=Of(null,h,I,ja(I.type,c),M);break e}throw Error(d(306,I,""))}return h;case 0:return I=h.type,Q=h.pendingProps,Q=h.elementType===I?Q:ja(I,Q),yc(c,h,I,Q,M);case 1:return I=h.type,Q=h.pendingProps,Q=h.elementType===I?Q:ja(I,Q),Zc(c,h,I,Q,M);case 3:e:{if(jf(h),c===null)throw Error(d(387));I=h.pendingProps,se=h.memoizedState,Q=se.element,Nc(c,h),nc(h,I,null,M);var Ve=h.memoizedState;if(I=Ve.element,se.isDehydrated)if(se={element:I,isDehydrated:!1,cache:Ve.cache,pendingSuspenseBoundaries:Ve.pendingSuspenseBoundaries,transitions:Ve.transitions},h.updateQueue.baseState=se,h.memoizedState=se,h.flags&256){Q=zl(Error(d(423)),h),h=Tf(c,h,I,M,Q);break e}else if(I!==Q){Q=zl(Error(d(424)),h),h=Tf(c,h,I,M,Q);break e}else for(xa=Is(h.stateNode.containerInfo.firstChild),ha=h,hs=!0,hl=null,M=hf(h,null,I,M),h.child=M;M;)M.flags=M.flags&-3|4096,M=M.sibling;else{if(cu(),I===Q){h=nu(c,h,M);break e}ma(c,h,I,M)}h=h.child}return h;case 5:return pf(h),c===null&&wu(h),I=h.type,Q=h.pendingProps,se=c!==null?c.memoizedProps:null,Ve=Q.children,es(I,Q)?Ve=null:se!==null&&es(I,se)&&(h.flags|=32),vc(c,h),ma(c,h,Ve,M),h.child;case 6:return c===null&&wu(h),null;case 13:return Uf(c,h,M);case 4:return oc(h,h.stateNode.containerInfo),I=h.pendingProps,c===null?h.child=ic(h,null,I,M):ma(c,h,I,M),h.child;case 11:return I=h.type,Q=h.pendingProps,Q=h.elementType===I?Q:ja(I,Q),Sf(c,h,I,Q,M);case 7:return ma(c,h,h.pendingProps,M),h.child;case 8:return ma(c,h,h.pendingProps.children,M),h.child;case 12:return ma(c,h,h.pendingProps.children,M),h.child;case 10:e:{if(I=h.type._context,Q=h.pendingProps,se=h.memoizedProps,Ve=Q.value,Bo(Du,I._currentValue),I._currentValue=Ve,se!==null)if(bs(se.value,Ve)){if(se.children===Q.children&&!da.current){h=nu(c,h,M);break e}}else for(se=h.child,se!==null&&(se.return=h);se!==null;){var Gt=se.dependencies;if(Gt!==null){Ve=se.child;for(var pn=Gt.firstContext;pn!==null;){if(pn.context===I){if(se.tag===1){pn=il(-1,M&-M),pn.tag=2;var ir=se.updateQueue;if(ir!==null){ir=ir.shared;var zr=ir.pending;zr===null?pn.next=pn:(pn.next=zr.next,zr.next=pn),ir.pending=pn}}se.lanes|=M,pn=se.alternate,pn!==null&&(pn.lanes|=M),tc(se.return,M,h),Gt.lanes|=M;break}pn=pn.next}}else if(se.tag===10)Ve=se.type===h.type?null:se.child;else if(se.tag===18){if(Ve=se.return,Ve===null)throw Error(d(341));Ve.lanes|=M,Gt=Ve.alternate,Gt!==null&&(Gt.lanes|=M),tc(Ve,M,h),Ve=se.sibling}else Ve=se.child;if(Ve!==null)Ve.return=se;else for(Ve=se;Ve!==null;){if(Ve===h){Ve=null;break}if(se=Ve.sibling,se!==null){se.return=Ve.return,Ve=se;break}Ve=Ve.return}se=Ve}ma(c,h,Q.children,M),h=h.child}return h;case 9:return Q=h.type,I=h.pendingProps.children,fu(h,M),Q=Ua(Q),I=I(Q),h.flags|=1,ma(c,h,I,M),h.child;case 14:return I=h.type,Q=ja(I,h.pendingProps),Q=ja(I.type,Q),Of(c,h,I,Q,M);case 15:return kf(c,h,h.type,h.pendingProps,M);case 17:return I=h.type,Q=h.pendingProps,Q=h.elementType===I?Q:ja(I,Q),Gc(c,h),h.tag=1,na(I)?(c=!0,au(h)):c=!1,fu(h,M),_f(h,I,Q),ff(h,I,Q,M),Nu(null,h,I,!0,c,M);case 19:return nd(c,h,M);case 22:return Va(c,h,M)}throw Error(d(156,h.tag))};function oe(c,h){return Jr(c,h)}function wt(c,h,M,I){this.tag=c,this.key=M,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=I,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(c,h,M,I){return new wt(c,h,M,I)}function Je(c){return c=c.prototype,!(!c||!c.isReactComponent)}function Nt(c){if(typeof c=="function")return Je(c)?1:0;if(c!=null){if(c=c.$$typeof,c===le)return 11;if(c===q)return 14}return 2}function sn(c,h){var M=c.alternate;return M===null?(M=Ft(c.tag,h,c.key,c.mode),M.elementType=c.elementType,M.type=c.type,M.stateNode=c.stateNode,M.alternate=c,c.alternate=M):(M.pendingProps=h,M.type=c.type,M.flags=0,M.subtreeFlags=0,M.deletions=null),M.flags=c.flags&14680064,M.childLanes=c.childLanes,M.lanes=c.lanes,M.child=c.child,M.memoizedProps=c.memoizedProps,M.memoizedState=c.memoizedState,M.updateQueue=c.updateQueue,h=c.dependencies,M.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},M.sibling=c.sibling,M.index=c.index,M.ref=c.ref,M}function Dn(c,h,M,I,Q,se){var Ve=2;if(I=c,typeof c=="function")Je(c)&&(Ve=1);else if(typeof c=="string")Ve=5;else e:switch(c){case G:return Kn(M.children,Q,se,h);case Y:Ve=8,Q|=8;break;case ae:return c=Ft(12,M,h,Q|2),c.elementType=ae,c.lanes=se,c;case be:return c=Ft(13,M,h,Q),c.elementType=be,c.lanes=se,c;case te:return c=Ft(19,M,h,Q),c.elementType=te,c.lanes=se,c;case Se:return Dr(M,Q,se,h);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case Ce:Ve=10;break e;case J:Ve=9;break e;case le:Ve=11;break e;case q:Ve=14;break e;case ee:Ve=16,I=null;break e}throw Error(d(130,c==null?c:typeof c,""))}return h=Ft(Ve,M,h,Q),h.elementType=c,h.type=I,h.lanes=se,h}function Kn(c,h,M,I){return c=Ft(7,c,I,h),c.lanes=M,c}function Dr(c,h,M,I){return c=Ft(22,c,I,h),c.elementType=Se,c.lanes=M,c.stateNode={isHidden:!1},c}function mr(c,h,M){return c=Ft(6,c,null,h),c.lanes=M,c}function Nr(c,h,M){return h=Ft(4,c.children!==null?c.children:[],c.key,h),h.lanes=M,h.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},h}function ti(c,h,M,I,Q){this.tag=h,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=it(0),this.expirationTimes=it(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=it(0),this.identifierPrefix=I,this.onRecoverableError=Q,this.mutableSourceEagerHydrationData=null}function Tr(c,h,M,I,Q,se,Ve,Gt,pn){return c=new ti(c,h,M,Gt,pn),h===1?(h=1,se===!0&&(h|=8)):h=0,se=Ft(3,null,null,h),c.current=se,se.stateNode=c,se.memoizedState={element:I,isDehydrated:M,cache:null,transitions:null,pendingSuspenseBoundaries:null},$c(se),c}function Ai(c,h,M){var I=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:K,key:I==null?null:""+I,children:c,containerInfo:h,implementation:M}}function Yi(c){if(!c)return Wo;c=c._reactInternals;e:{if(Qe(c)!==c||c.tag!==1)throw Error(d(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if(na(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(d(171))}if(c.tag===1){var M=c.type;if(na(M))return Ps(c,M,h)}return h}function yi(c,h,M,I,Q,se,Ve,Gt,pn){return c=Tr(M,I,!0,c,Q,se,Ve,Gt,pn),c.context=Yi(null),M=c.current,I=va(),Q=Zl(M),se=il(I,Q),se.callback=h??null,Aa(M,se,Q),c.current.lanes=Q,Rt(c,Q,I),ol(c,I),c}function Ji(c,h,M,I){var Q=h.current,se=va(),Ve=Zl(Q);return M=Yi(M),h.context===null?h.context=M:h.pendingContext=M,h=il(se,Ve),h.payload={element:c},I=I===void 0?null:I,I!==null&&(h.callback=I),c=Aa(Q,h,Ve),c!==null&&(Kl(c,Q,Ve,se),Fc(c,Q,Ve)),Ve}function ko(c){if(c=c.current,!c.child)return null;switch(c.child.tag){case 5:return c.child.stateNode;default:return c.child.stateNode}}function Ri(c,h){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var M=c.retryLane;c.retryLane=M!==0&&M<h?M:h}}function jo(c,h){Ri(c,h),(c=c.alternate)&&Ri(c,h)}function vo(){return null}var Cs=typeof reportError=="function"?reportError:function(c){console.error(c)};function al(c){this._internalRoot=c}fs.prototype.render=al.prototype.render=function(c){var h=this._internalRoot;if(h===null)throw Error(d(409));Ji(c,h,null,null)},fs.prototype.unmount=al.prototype.unmount=function(){var c=this._internalRoot;if(c!==null){this._internalRoot=null;var h=c.containerInfo;Mc(function(){Ji(null,c,null,null)}),h[fl]=null}};function fs(c){this._internalRoot=c}fs.prototype.unstable_scheduleHydration=function(c){if(c){var h=Ir();c={blockedOn:null,target:c,priority:h};for(var M=0;M<ft.length&&h!==0&&h<ft[M].priority;M++);ft.splice(M,0,c),M===0&&ot(c)}};function ps(c){return!(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)}function ys(c){return!(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11&&(c.nodeType!==8||c.nodeValue!==" react-mount-point-unstable "))}function Xi(){}function ls(c,h,M,I,Q){if(Q){if(typeof I=="function"){var se=I;I=function(){var ir=ko(Ve);se.call(ir)}}var Ve=yi(h,I,c,0,null,!1,!1,"",Xi);return c._reactRootContainer=Ve,c[fl]=Ve.current,Ks(c.nodeType===8?c.parentNode:c),Mc(),Ve}for(;Q=c.lastChild;)c.removeChild(Q);if(typeof I=="function"){var Gt=I;I=function(){var ir=ko(pn);Gt.call(ir)}}var pn=Tr(c,0,!1,null,null,!1,!1,"",Xi);return c._reactRootContainer=pn,c[fl]=pn.current,Ks(c.nodeType===8?c.parentNode:c),Mc(function(){Ji(h,pn,M,I)}),pn}function _a(c,h,M,I,Q){var se=M._reactRootContainer;if(se){var Ve=se;if(typeof Q=="function"){var Gt=Q;Q=function(){var pn=ko(Ve);Gt.call(pn)}}Ji(h,Ve,c,Q)}else Ve=ls(M,h,c,Q,I);return ko(Ve)}dn=function(c){switch(c.tag){case 3:var h=c.stateNode;if(h.current.memoizedState.isDehydrated){var M=Ye(h.pendingLanes);M!==0&&(qt(h,M|1),ol(h,Ke()),!($o&6)&&(sr=Ke()+500,dl()))}break;case 13:Mc(function(){var I=rl(c,1);if(I!==null){var Q=va();Kl(I,c,1,Q)}}),jo(c,1)}},Jn=function(c){if(c.tag===13){var h=rl(c,134217728);if(h!==null){var M=va();Kl(h,c,134217728,M)}jo(c,134217728)}},Hn=function(c){if(c.tag===13){var h=Zl(c),M=rl(c,h);if(M!==null){var I=va();Kl(M,c,h,I)}jo(c,h)}},Ir=function(){return Vt},vr=function(c,h){var M=Vt;try{return Vt=c,h()}finally{Vt=M}},Be=function(c,h,M){switch(h){case"input":if(hn(c,M),h=M.name,M.type==="radio"&&h!=null){for(M=c;M.parentNode;)M=M.parentNode;for(M=M.querySelectorAll("input[name="+JSON.stringify(""+h)+'][type="radio"]'),h=0;h<M.length;h++){var I=M[h];if(I!==c&&I.form===c.form){var Q=Da(I);if(!Q)throw Error(d(90));at(I),hn(I,Q)}}}break;case"textarea":st(c,M);break;case"select":h=M.value,h!=null&&yn(c,!!M.multiple,h,!1)}},rr=Hf,Wn=Mc;var Ya={usingClientEntryPoint:!1,Events:[xl,jl,Da,an,In,Hf]},ea={findFiberByHostInstance:Xa,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ll={bundleType:ea.bundleType,version:ea.version,rendererPackageName:ea.rendererPackageName,rendererConfig:ea.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(c){return c=Cr(c),c===null?null:c.stateNode},findFiberByHostInstance:ea.findFiberByHostInstance||vo,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vl.isDisabled&&vl.supportsFiber)try{At=vl.inject(ll),Bt=vl}catch{}}b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ya,b.createPortal=function(c,h){var M=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ps(h))throw Error(d(200));return Ai(c,h,null,M)},b.createRoot=function(c,h){if(!ps(c))throw Error(d(299));var M=!1,I="",Q=Cs;return h!=null&&(h.unstable_strictMode===!0&&(M=!0),h.identifierPrefix!==void 0&&(I=h.identifierPrefix),h.onRecoverableError!==void 0&&(Q=h.onRecoverableError)),h=Tr(c,1,!1,null,null,M,!1,I,Q),c[fl]=h.current,Ks(c.nodeType===8?c.parentNode:c),new al(h)},b.findDOMNode=function(c){if(c==null)return null;if(c.nodeType===1)return c;var h=c._reactInternals;if(h===void 0)throw typeof c.render=="function"?Error(d(188)):(c=Object.keys(c).join(","),Error(d(268,c)));return c=Cr(h),c=c===null?null:c.stateNode,c},b.flushSync=function(c){return Mc(c)},b.hydrate=function(c,h,M){if(!ys(h))throw Error(d(200));return _a(null,c,h,!0,M)},b.hydrateRoot=function(c,h,M){if(!ps(c))throw Error(d(405));var I=M!=null&&M.hydratedSources||null,Q=!1,se="",Ve=Cs;if(M!=null&&(M.unstable_strictMode===!0&&(Q=!0),M.identifierPrefix!==void 0&&(se=M.identifierPrefix),M.onRecoverableError!==void 0&&(Ve=M.onRecoverableError)),h=yi(h,null,c,1,M??null,Q,!1,se,Ve),c[fl]=h.current,Ks(c),I)for(c=0;c<I.length;c++)M=I[c],Q=M._getVersion,Q=Q(M._source),h.mutableSourceEagerHydrationData==null?h.mutableSourceEagerHydrationData=[M,Q]:h.mutableSourceEagerHydrationData.push(M,Q);return new fs(h)},b.render=function(c,h,M){if(!ys(h))throw Error(d(200));return _a(null,c,h,!1,M)},b.unmountComponentAtNode=function(c){if(!ys(c))throw Error(d(40));return c._reactRootContainer?(Mc(function(){_a(null,null,c,!1,function(){c._reactRootContainer=null,c[fl]=null})}),!0):!1},b.unstable_batchedUpdates=Hf,b.unstable_renderSubtreeIntoContainer=function(c,h,M,I){if(!ys(M))throw Error(d(200));if(c==null||c._reactInternals===void 0)throw Error(d(38));return _a(c,h,M,!1,I)},b.version="18.2.0-next-9e3b772b8-20220608"},44645:function(_,b,i){"use strict";var l,f=i(12788);if(!0)b.s=f.createRoot,l=f.hydrateRoot;else var d},12788:function(_,b,i){"use strict";function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(f){console.error(f)}}l(),_.exports=i(83975)},8266:function(_){"use strict";var b=Array.isArray,i=Object.keys,l=Object.prototype.hasOwnProperty,f=typeof Element<"u";function d(g,E){if(g===E)return!0;if(g&&E&&typeof g=="object"&&typeof E=="object"){var m=b(g),C=b(E),x,P,T;if(m&&C){if(P=g.length,P!=E.length)return!1;for(x=P;x--!==0;)if(!d(g[x],E[x]))return!1;return!0}if(m!=C)return!1;var O=g instanceof Date,w=E instanceof Date;if(O!=w)return!1;if(O&&w)return g.getTime()==E.getTime();var R=g instanceof RegExp,F=E instanceof RegExp;if(R!=F)return!1;if(R&&F)return g.toString()==E.toString();var V=i(g);if(P=V.length,P!==i(E).length)return!1;for(x=P;x--!==0;)if(!l.call(E,V[x]))return!1;if(f&&g instanceof Element&&E instanceof Element)return g===E;for(x=P;x--!==0;)if(T=V[x],!(T==="_owner"&&g.$$typeof)&&!d(g[T],E[T]))return!1;return!0}return g!==g&&E!==E}_.exports=function(E,m){try{return d(E,m)}catch(C){if(C.message&&C.message.match(/stack|recursion/i)||C.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",C.name,C.message),!1;throw C}}},74758:function(_,b,i){"use strict";i.d(b,{q:function(){return yn}});var l=i(60216),f=i.n(l),d=i(25824),g=i.n(d),E=i(77594),m=i.n(E),C=i(32735),x=i(54516),P=i.n(x),T={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},O={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},w=Object.keys(O).map(function(cn){return O[cn]}),R={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},F={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},V={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},L=Object.keys(F).reduce(function(cn,st){return cn[F[st]]=st,cn},{}),$=[O.NOSCRIPT,O.SCRIPT,O.STYLE],U="data-react-helmet",N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(cn){return typeof cn}:function(cn){return cn&&typeof Symbol=="function"&&cn.constructor===Symbol&&cn!==Symbol.prototype?"symbol":typeof cn},k=function(cn,st){if(!(cn instanceof st))throw new TypeError("Cannot call a class as a function")},j=function(){function cn(st,on){for(var dt=0;dt<on.length;dt++){var Dt=on[dt];Dt.enumerable=Dt.enumerable||!1,Dt.configurable=!0,"value"in Dt&&(Dt.writable=!0),Object.defineProperty(st,Dt.key,Dt)}}return function(st,on,dt){return on&&cn(st.prototype,on),dt&&cn(st,dt),st}}(),z=Object.assign||function(cn){for(var st=1;st<arguments.length;st++){var on=arguments[st];for(var dt in on)Object.prototype.hasOwnProperty.call(on,dt)&&(cn[dt]=on[dt])}return cn},K=function(cn,st){if(typeof st!="function"&&st!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof st);cn.prototype=Object.create(st&&st.prototype,{constructor:{value:cn,enumerable:!1,writable:!0,configurable:!0}}),st&&(Object.setPrototypeOf?Object.setPrototypeOf(cn,st):cn.__proto__=st)},G=function(cn,st){var on={};for(var dt in cn)st.indexOf(dt)>=0||Object.prototype.hasOwnProperty.call(cn,dt)&&(on[dt]=cn[dt]);return on},Y=function(cn,st){if(!cn)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return st&&(typeof st=="object"||typeof st=="function")?st:cn},ae=function(st){var on=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return on===!1?String(st):String(st).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},Ce=function(st){var on=q(st,O.TITLE),dt=q(st,V.TITLE_TEMPLATE);if(dt&&on)return dt.replace(/%s/g,function(){return Array.isArray(on)?on.join(""):on});var Dt=q(st,V.DEFAULT_TITLE);return on||Dt||void 0},J=function(st){return q(st,V.ON_CHANGE_CLIENT_STATE)||function(){}},le=function(st,on){return on.filter(function(dt){return typeof dt[st]<"u"}).map(function(dt){return dt[st]}).reduce(function(dt,Dt){return z({},dt,Dt)},{})},be=function(st,on){return on.filter(function(dt){return typeof dt[O.BASE]<"u"}).map(function(dt){return dt[O.BASE]}).reverse().reduce(function(dt,Dt){if(!dt.length)for(var Ht=Object.keys(Dt),rn=0;rn<Ht.length;rn++){var ke=Ht[rn],ct=ke.toLowerCase();if(st.indexOf(ct)!==-1&&Dt[ct])return dt.concat(Dt)}return dt},[])},te=function(st,on,dt){var Dt={};return dt.filter(function(Ht){return Array.isArray(Ht[st])?!0:(typeof Ht[st]<"u"&&Pe("Helmet: "+st+' should be of type "Array". Instead found type "'+N(Ht[st])+'"'),!1)}).map(function(Ht){return Ht[st]}).reverse().reduce(function(Ht,rn){var ke={};rn.filter(function(Oe){for(var Ze=void 0,pt=Object.keys(Oe),$e=0;$e<pt.length;$e++){var Re=pt[$e],Be=Re.toLowerCase();on.indexOf(Be)!==-1&&!(Ze===R.REL&&Oe[Ze].toLowerCase()==="canonical")&&!(Be===R.REL&&Oe[Be].toLowerCase()==="stylesheet")&&(Ze=Be),on.indexOf(Re)!==-1&&(Re===R.INNER_HTML||Re===R.CSS_TEXT||Re===R.ITEM_PROP)&&(Ze=Re)}if(!Ze||!Oe[Ze])return!1;var Ne=Oe[Ze].toLowerCase();return Dt[Ze]||(Dt[Ze]={}),ke[Ze]||(ke[Ze]={}),Dt[Ze][Ne]?!1:(ke[Ze][Ne]=!0,!0)}).reverse().forEach(function(Oe){return Ht.push(Oe)});for(var ct=Object.keys(ke),D=0;D<ct.length;D++){var W=ct[D],re=P()({},Dt[W],ke[W]);Dt[W]=re}return Ht},[]).reverse()},q=function(st,on){for(var dt=st.length-1;dt>=0;dt--){var Dt=st[dt];if(Dt.hasOwnProperty(on))return Dt[on]}return null},ee=function(st){return{baseTag:be([R.HREF,R.TARGET],st),bodyAttributes:le(T.BODY,st),defer:q(st,V.DEFER),encode:q(st,V.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:le(T.HTML,st),linkTags:te(O.LINK,[R.REL,R.HREF],st),metaTags:te(O.META,[R.NAME,R.CHARSET,R.HTTPEQUIV,R.PROPERTY,R.ITEM_PROP],st),noscriptTags:te(O.NOSCRIPT,[R.INNER_HTML],st),onChangeClientState:J(st),scriptTags:te(O.SCRIPT,[R.SRC,R.INNER_HTML],st),styleTags:te(O.STYLE,[R.CSS_TEXT],st),title:Ce(st),titleAttributes:le(T.TITLE,st)}},Se=function(){var cn=Date.now();return function(st){var on=Date.now();on-cn>16?(cn=on,st(on)):setTimeout(function(){Se(st)},0)}}(),tt=function(st){return clearTimeout(st)},Ae=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Se:i.g.requestAnimationFrame||Se,pe=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||tt:i.g.cancelAnimationFrame||tt,Pe=function(st){return console&&typeof console.warn=="function"&&console.warn(st)},ye=null,Ee=function(st){ye&&pe(ye),st.defer?ye=Ae(function(){_e(st,function(){ye=null})}):(_e(st),ye=null)},_e=function(st,on){var dt=st.baseTag,Dt=st.bodyAttributes,Ht=st.htmlAttributes,rn=st.linkTags,ke=st.metaTags,ct=st.noscriptTags,D=st.onChangeClientState,W=st.scriptTags,re=st.styleTags,Oe=st.title,Ze=st.titleAttributes;Fe(O.BODY,Dt),Fe(O.HTML,Ht),Ie(Oe,Ze);var pt={baseTag:ut(O.BASE,dt),linkTags:ut(O.LINK,rn),metaTags:ut(O.META,ke),noscriptTags:ut(O.NOSCRIPT,ct),scriptTags:ut(O.SCRIPT,W),styleTags:ut(O.STYLE,re)},$e={},Re={};Object.keys(pt).forEach(function(Be){var Ne=pt[Be],bt=Ne.newTags,Kt=Ne.oldTags;bt.length&&($e[Be]=bt),Kt.length&&(Re[Be]=pt[Be].oldTags)}),on&&on(),D(st,$e,Re)},We=function(st){return Array.isArray(st)?st.join(""):st},Ie=function(st,on){typeof st<"u"&&document.title!==st&&(document.title=We(st)),Fe(O.TITLE,on)},Fe=function(st,on){var dt=document.getElementsByTagName(st)[0];if(dt){for(var Dt=dt.getAttribute(U),Ht=Dt?Dt.split(","):[],rn=[].concat(Ht),ke=Object.keys(on),ct=0;ct<ke.length;ct++){var D=ke[ct],W=on[D]||"";dt.getAttribute(D)!==W&&dt.setAttribute(D,W),Ht.indexOf(D)===-1&&Ht.push(D);var re=rn.indexOf(D);re!==-1&&rn.splice(re,1)}for(var Oe=rn.length-1;Oe>=0;Oe--)dt.removeAttribute(rn[Oe]);Ht.length===rn.length?dt.removeAttribute(U):dt.getAttribute(U)!==ke.join(",")&&dt.setAttribute(U,ke.join(","))}},ut=function(st,on){var dt=document.head||document.querySelector(O.HEAD),Dt=dt.querySelectorAll(st+"["+U+"]"),Ht=Array.prototype.slice.call(Dt),rn=[],ke=void 0;return on&&on.length&&on.forEach(function(ct){var D=document.createElement(st);for(var W in ct)if(ct.hasOwnProperty(W))if(W===R.INNER_HTML)D.innerHTML=ct.innerHTML;else if(W===R.CSS_TEXT)D.styleSheet?D.styleSheet.cssText=ct.cssText:D.appendChild(document.createTextNode(ct.cssText));else{var re=typeof ct[W]>"u"?"":ct[W];D.setAttribute(W,re)}D.setAttribute(U,"true"),Ht.some(function(Oe,Ze){return ke=Ze,D.isEqualNode(Oe)})?Ht.splice(ke,1):rn.push(D)}),Ht.forEach(function(ct){return ct.parentNode.removeChild(ct)}),rn.forEach(function(ct){return dt.appendChild(ct)}),{oldTags:Ht,newTags:rn}},ht=function(st){return Object.keys(st).reduce(function(on,dt){var Dt=typeof st[dt]<"u"?dt+'="'+st[dt]+'"':""+dt;return on?on+" "+Dt:Dt},"")},Ot=function(st,on,dt,Dt){var Ht=ht(dt),rn=We(on);return Ht?"<"+st+" "+U+'="true" '+Ht+">"+ae(rn,Dt)+"</"+st+">":"<"+st+" "+U+'="true">'+ae(rn,Dt)+"</"+st+">"},Ue=function(st,on,dt){return on.reduce(function(Dt,Ht){var rn=Object.keys(Ht).filter(function(D){return!(D===R.INNER_HTML||D===R.CSS_TEXT)}).reduce(function(D,W){var re=typeof Ht[W]>"u"?W:W+'="'+ae(Ht[W],dt)+'"';return D?D+" "+re:re},""),ke=Ht.innerHTML||Ht.cssText||"",ct=$.indexOf(st)===-1;return Dt+"<"+st+" "+U+'="true" '+rn+(ct?"/>":">"+ke+"</"+st+">")},"")},at=function(st){var on=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(st).reduce(function(dt,Dt){return dt[F[Dt]||Dt]=st[Dt],dt},on)},Pt=function(st){var on=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(st).reduce(function(dt,Dt){return dt[L[Dt]||Dt]=st[Dt],dt},on)},lt=function(st,on,dt){var Dt,Ht=(Dt={key:on},Dt[U]=!0,Dt),rn=at(dt,Ht);return[C.createElement(O.TITLE,rn,on)]},kt=function(st,on){return on.map(function(dt,Dt){var Ht,rn=(Ht={key:Dt},Ht[U]=!0,Ht);return Object.keys(dt).forEach(function(ke){var ct=F[ke]||ke;if(ct===R.INNER_HTML||ct===R.CSS_TEXT){var D=dt.innerHTML||dt.cssText;rn.dangerouslySetInnerHTML={__html:D}}else rn[ct]=dt[ke]}),C.createElement(st,rn)})},nn=function(st,on,dt){switch(st){case O.TITLE:return{toComponent:function(){return lt(st,on.title,on.titleAttributes,dt)},toString:function(){return Ot(st,on.title,on.titleAttributes,dt)}};case T.BODY:case T.HTML:return{toComponent:function(){return at(on)},toString:function(){return ht(on)}};default:return{toComponent:function(){return kt(st,on)},toString:function(){return Ue(st,on,dt)}}}},hn=function(st){var on=st.baseTag,dt=st.bodyAttributes,Dt=st.encode,Ht=st.htmlAttributes,rn=st.linkTags,ke=st.metaTags,ct=st.noscriptTags,D=st.scriptTags,W=st.styleTags,re=st.title,Oe=re===void 0?"":re,Ze=st.titleAttributes;return{base:nn(O.BASE,on,Dt),bodyAttributes:nn(T.BODY,dt,Dt),htmlAttributes:nn(T.HTML,Ht,Dt),link:nn(O.LINK,rn,Dt),meta:nn(O.META,ke,Dt),noscript:nn(O.NOSCRIPT,ct,Dt),script:nn(O.SCRIPT,D,Dt),style:nn(O.STYLE,W,Dt),title:nn(O.TITLE,{title:Oe,titleAttributes:Ze},Dt)}},Rn=function(st){var on,dt;return dt=on=function(Dt){K(Ht,Dt);function Ht(){return k(this,Ht),Y(this,Dt.apply(this,arguments))}return Ht.prototype.shouldComponentUpdate=function(ke){return!m()(this.props,ke)},Ht.prototype.mapNestedChildrenToProps=function(ke,ct){if(!ct)return null;switch(ke.type){case O.SCRIPT:case O.NOSCRIPT:return{innerHTML:ct};case O.STYLE:return{cssText:ct}}throw new Error("<"+ke.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},Ht.prototype.flattenArrayTypeChildren=function(ke){var ct,D=ke.child,W=ke.arrayTypeChildren,re=ke.newChildProps,Oe=ke.nestedChildren;return z({},W,(ct={},ct[D.type]=[].concat(W[D.type]||[],[z({},re,this.mapNestedChildrenToProps(D,Oe))]),ct))},Ht.prototype.mapObjectTypeChildren=function(ke){var ct,D,W=ke.child,re=ke.newProps,Oe=ke.newChildProps,Ze=ke.nestedChildren;switch(W.type){case O.TITLE:return z({},re,(ct={},ct[W.type]=Ze,ct.titleAttributes=z({},Oe),ct));case O.BODY:return z({},re,{bodyAttributes:z({},Oe)});case O.HTML:return z({},re,{htmlAttributes:z({},Oe)})}return z({},re,(D={},D[W.type]=z({},Oe),D))},Ht.prototype.mapArrayTypeChildrenToProps=function(ke,ct){var D=z({},ct);return Object.keys(ke).forEach(function(W){var re;D=z({},D,(re={},re[W]=ke[W],re))}),D},Ht.prototype.warnOnInvalidChildren=function(ke,ct){return!0},Ht.prototype.mapChildrenToProps=function(ke,ct){var D=this,W={};return C.Children.forEach(ke,function(re){if(!(!re||!re.props)){var Oe=re.props,Ze=Oe.children,pt=G(Oe,["children"]),$e=Pt(pt);switch(D.warnOnInvalidChildren(re,Ze),re.type){case O.LINK:case O.META:case O.NOSCRIPT:case O.SCRIPT:case O.STYLE:W=D.flattenArrayTypeChildren({child:re,arrayTypeChildren:W,newChildProps:$e,nestedChildren:Ze});break;default:ct=D.mapObjectTypeChildren({child:re,newProps:ct,newChildProps:$e,nestedChildren:Ze});break}}}),ct=this.mapArrayTypeChildrenToProps(W,ct),ct},Ht.prototype.render=function(){var ke=this.props,ct=ke.children,D=G(ke,["children"]),W=z({},D);return ct&&(W=this.mapChildrenToProps(ct,W)),C.createElement(st,W)},j(Ht,null,[{key:"canUseDOM",set:function(ke){st.canUseDOM=ke}}]),Ht}(C.Component),on.propTypes={base:f().object,bodyAttributes:f().object,children:f().oneOfType([f().arrayOf(f().node),f().node]),defaultTitle:f().string,defer:f().bool,encodeSpecialCharacters:f().bool,htmlAttributes:f().object,link:f().arrayOf(f().object),meta:f().arrayOf(f().object),noscript:f().arrayOf(f().object),onChangeClientState:f().func,script:f().arrayOf(f().object),style:f().arrayOf(f().object),title:f().string,titleAttributes:f().object,titleTemplate:f().string},on.defaultProps={defer:!0,encodeSpecialCharacters:!0},on.peek=st.peek,on.rewind=function(){var Dt=st.rewind();return Dt||(Dt=hn({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),Dt},dt},kn=function(){return null},$t=g()(ee,Ee,hn)(kn),yn=Rn($t);yn.renderStatic=yn.rewind;var Yn=null},77594:function(_){var b=typeof Element<"u",i=typeof Map=="function",l=typeof Set=="function",f=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function d(g,E){if(g===E)return!0;if(g&&E&&typeof g=="object"&&typeof E=="object"){if(g.constructor!==E.constructor)return!1;var m,C,x;if(Array.isArray(g)){if(m=g.length,m!=E.length)return!1;for(C=m;C--!==0;)if(!d(g[C],E[C]))return!1;return!0}var P;if(i&&g instanceof Map&&E instanceof Map){if(g.size!==E.size)return!1;for(P=g.entries();!(C=P.next()).done;)if(!E.has(C.value[0]))return!1;for(P=g.entries();!(C=P.next()).done;)if(!d(C.value[1],E.get(C.value[0])))return!1;return!0}if(l&&g instanceof Set&&E instanceof Set){if(g.size!==E.size)return!1;for(P=g.entries();!(C=P.next()).done;)if(!E.has(C.value[0]))return!1;return!0}if(f&&ArrayBuffer.isView(g)&&ArrayBuffer.isView(E)){if(m=g.length,m!=E.length)return!1;for(C=m;C--!==0;)if(g[C]!==E[C])return!1;return!0}if(g.constructor===RegExp)return g.source===E.source&&g.flags===E.flags;if(g.valueOf!==Object.prototype.valueOf)return g.valueOf()===E.valueOf();if(g.toString!==Object.prototype.toString)return g.toString()===E.toString();if(x=Object.keys(g),m=x.length,m!==Object.keys(E).length)return!1;for(C=m;C--!==0;)if(!Object.prototype.hasOwnProperty.call(E,x[C]))return!1;if(b&&g instanceof Element)return!1;for(C=m;C--!==0;)if(!((x[C]==="_owner"||x[C]==="__v"||x[C]==="__o")&&g.$$typeof)&&!d(g[x[C]],E[x[C]]))return!1;return!0}return g!==g&&E!==E}_.exports=function(E,m){try{return d(E,m)}catch(C){if((C.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw C}}},72067:function(_,b,i){"use strict";i.d(b,{_y:function(){return P},zt:function(){return x}});var l=i(32735),f=i(86058),d=i.n(f);function g(O){return O.displayName||O.name||"Component"}var E=typeof window<"u"?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=l.createContext(null)):l.createContext(null),m=E.Consumer,C=E.Provider,x=C,P=E;function T(O,w){var R=w||{},F=R.intlPropName,V=F===void 0?"intl":F,L=R.forwardRef,$=L===void 0?!1:L,U=R.enforceContext,N=U===void 0?!0:U,k=function(j){return React.createElement(m,null,function(z){var K;N&&invariantIntlContext(z);var G=(K={},K[V]=z,K);return React.createElement(O,__assign({},j,G,{ref:$?j.forwardedRef:null}))})};return k.displayName="injectIntl(".concat(g(O),")"),k.WrappedComponent=O,$?hoistNonReactStatics(React.forwardRef(function(j,z){return React.createElement(k,__assign({},j,{forwardedRef:z}))}),O):hoistNonReactStatics(k,O)}},67879:function(_,b,i){"use strict";i.d(b,{Z:function(){return g}});var l=i(32735),f=i(72067),d=i(42447);function g(){var E=l.useContext(f._y);return(0,d.lq)(E),E}},42447:function(_,b,i){"use strict";i.d(b,{Z0:function(){return m},dt:function(){return C},lq:function(){return E},wU:function(){return x}});var l=i(31191),f=i(32735),d=i(26356),g=i(32409);function E(P){(0,d.kG)(P,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var m=(0,l.pi)((0,l.pi)({},g.Z0),{textComponent:f.Fragment});function C(P){return function(T){return P(f.Children.toArray(T))}}function x(P,T){if(P===T)return!0;if(!P||!T)return!1;var O=Object.keys(P),w=Object.keys(T),R=O.length;if(w.length!==R)return!1;for(var F=0;F<R;F++){var V=O[F];if(P[V]!==T[V]||!Object.prototype.hasOwnProperty.call(T,V))return!1}return!0}},26697:function(_,b){"use strict";/**
1157
1157
  * @license React
1158
1158
  * react-is.production.min.js
1159
1159
  *
@@ -2190,13 +2190,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2190
2190
  `,this;t--}else if(u instanceof Bn){let A=u.text[v+(n<0?-1:0)];if(this.offsets[o]+=n,A.length>Math.max(0,t))return this.value=t==0?A:n>0?A.slice(t):A.slice(0,A.length-t),this;t-=A.length}else{let A=u.children[v+(n<0?-1:0)];t>A.length?(t-=A.length,this.offsets[o]+=n):(n<0&&this.offsets[o]--,this.nodes.push(A),this.offsets.push(n>0?1:(A instanceof Bn?A.text.length:A.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class vn{constructor(t,n,o){this.value="",this.done=!1,this.cursor=new Yt(t,n>o?-1:1),this.pos=n>o?t.length:0,this.from=Math.min(n,o),this.to=Math.max(n,o)}nextInner(t,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let o=n<0?this.pos-this.from:this.to-this.pos;t>o&&(t=o),o-=t;let{value:u}=this.cursor.next(t);return this.pos+=(u.length+t)*n,this.value=u.length<=o?u:n<0?u.slice(u.length-o):u.slice(0,o),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Un{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:n,lineBreak:o,value:u}=this.inner.next(t);return n?(this.done=!0,this.value=""):o?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=u,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Cn.prototype[Symbol.iterator]=function(){return this.iter()},Yt.prototype[Symbol.iterator]=vn.prototype[Symbol.iterator]=Un.prototype[Symbol.iterator]=function(){return this});class tr{constructor(t,n,o,u){this.from=t,this.to=n,this.number=o,this.text=u}get length(){return this.to-this.from}}let Nn="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(a=>a?parseInt(a,36):1);for(let a=1;a<Nn.length;a++)Nn[a]+=Nn[a-1];function Vn(a){for(let t=1;t<Nn.length;t+=2)if(Nn[t]>a)return Nn[t-1]<=a;return!1}function Ye(a){return a>=127462&&a<=127487}const de=8205;function ne(a,t,n=!0,o=!0){return(n?ge:je)(a,t,o)}function ge(a,t,n){if(t==a.length)return t;t&&He(a.charCodeAt(t))&&it(a.charCodeAt(t-1))&&t--;let o=Rt(a,t);for(t+=qt(o);t<a.length;){let u=Rt(a,t);if(o==de||u==de||n&&Vn(u))t+=qt(u),o=u;else if(Ye(u)){let p=0,v=t-2;for(;v>=0&&Ye(Rt(a,v));)p++,v-=2;if(p%2==0)break;t+=2}else break}return t}function je(a,t,n){for(;t>0;){let o=ge(a,t-2,n);if(o<t)return o;t--}return 0}function He(a){return a>=56320&&a<57344}function it(a){return a>=55296&&a<56320}function Rt(a,t){let n=a.charCodeAt(t);if(!it(n)||t+1==a.length)return n;let o=a.charCodeAt(t+1);return He(o)?(n-55296<<10)+(o-56320)+65536:n}function fn(a){return a<=65535?String.fromCharCode(a):(a-=65536,String.fromCharCode((a>>10)+55296,(a&1023)+56320))}function qt(a){return a<65536?1:2}const Vt=/\r\n?|\n/;var Jt=function(a){return a[a.Simple=0]="Simple",a[a.TrackDel=1]="TrackDel",a[a.TrackBefore=2]="TrackBefore",a[a.TrackAfter=3]="TrackAfter",a}(Jt||(Jt={}));class dn{constructor(t){this.sections=t}get length(){let t=0;for(let n=0;n<this.sections.length;n+=2)t+=this.sections[n];return t}get newLength(){let t=0;for(let n=0;n<this.sections.length;n+=2){let o=this.sections[n+1];t+=o<0?this.sections[n]:o}return t}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(t){for(let n=0,o=0,u=0;n<this.sections.length;){let p=this.sections[n++],v=this.sections[n++];v<0?(t(o,u,p),u+=p):u+=v,o+=p}}iterChangedRanges(t,n=!1){vr(this,t,n)}get invertedDesc(){let t=[];for(let n=0;n<this.sections.length;){let o=this.sections[n++],u=this.sections[n++];u<0?t.push(o,u):t.push(u,o)}return new dn(t)}composeDesc(t){return this.empty?t:t.empty?this:Er(this,t)}mapDesc(t,n=!1){return t.empty?this:yr(this,t,n)}mapPos(t,n=-1,o=Jt.Simple){let u=0,p=0;for(let v=0;v<this.sections.length;){let S=this.sections[v++],A=this.sections[v++],H=u+S;if(A<0){if(H>t)return p+(t-u);p+=S}else{if(o!=Jt.Simple&&H>=t&&(o==Jt.TrackDel&&u<t&&H>t||o==Jt.TrackBefore&&u<t||o==Jt.TrackAfter&&H>t))return null;if(H>t||H==t&&n<0&&!S)return t==u||n<0?p:p+A;p+=A}u=H}if(t>u)throw new RangeError(`Position ${t} is out of range for changeset of length ${u}`);return p}touchesRange(t,n=t){for(let o=0,u=0;o<this.sections.length&&u<=n;){let p=this.sections[o++],v=this.sections[o++],S=u+p;if(v>=0&&u<=n&&S>=t)return u<t&&S>n?"cover":!0;u=S}return!1}toString(){let t="";for(let n=0;n<this.sections.length;){let o=this.sections[n++],u=this.sections[n++];t+=(t?" ":"")+o+(u>=0?":"+u:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new dn(t)}static create(t){return new dn(t)}}class Jn extends dn{constructor(t,n){super(t),this.inserted=n}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return vr(this,(n,o,u,p,v)=>t=t.replace(u,u+(o-n),v),!1),t}mapDesc(t,n=!1){return yr(this,t,n,!0)}invert(t){let n=this.sections.slice(),o=[];for(let u=0,p=0;u<n.length;u+=2){let v=n[u],S=n[u+1];if(S>=0){n[u]=S,n[u+1]=v;let A=u>>1;for(;o.length<A;)o.push(Cn.empty);o.push(v?t.slice(p,p+v):Cn.empty)}p+=v}return new Jn(n,o)}compose(t){return this.empty?t:t.empty?this:Er(this,t,!0)}map(t,n=!1){return t.empty?this:yr(this,t,n,!0)}iterChanges(t,n=!1){vr(this,t,n)}get desc(){return dn.create(this.sections)}filter(t){let n=[],o=[],u=[],p=new Or(this);e:for(let v=0,S=0;;){let A=v==t.length?1e9:t[v++];for(;S<A||S==A&&p.len==0;){if(p.done)break e;let X=Math.min(p.len,A-S);Hn(u,X,-1);let Me=p.ins==-1?-1:p.off==0?p.ins:0;Hn(n,X,Me),Me>0&&Ir(o,n,p.text),p.forward(X),S+=X}let H=t[v++];for(;S<H;){if(p.done)break e;let X=Math.min(p.len,H-S);Hn(n,X,-1),Hn(u,X,p.ins==-1?-1:p.off==0?p.ins:0),p.forward(X),S+=X}}return{changes:new Jn(n,o),filtered:dn.create(u)}}toJSON(){let t=[];for(let n=0;n<this.sections.length;n+=2){let o=this.sections[n],u=this.sections[n+1];u<0?t.push(o):u==0?t.push([o]):t.push([o].concat(this.inserted[n>>1].toJSON()))}return t}static of(t,n,o){let u=[],p=[],v=0,S=null;function A(X=!1){if(!X&&!u.length)return;v<n&&Hn(u,n-v,-1);let Me=new Jn(u,p);S=S?S.compose(Me.map(S)):Me,u=[],p=[],v=0}function H(X){if(Array.isArray(X))for(let Me of X)H(Me);else if(X instanceof Jn){if(X.length!=n)throw new RangeError(`Mismatched change set length (got ${X.length}, expected ${n})`);A(),S=S?S.compose(X.map(S)):X}else{let{from:Me,to:gt=Me,insert:It}=X;if(Me>gt||Me<0||gt>n)throw new RangeError(`Invalid change range ${Me} to ${gt} (in doc of length ${n})`);let un=It?typeof It=="string"?Cn.of(It.split(o||Vt)):It:Cn.empty,or=un.length;if(Me==gt&&or==0)return;Me<v&&A(),Me>v&&Hn(u,Me-v,-1),Hn(u,gt-Me,or),Ir(p,u,un),v=gt}}return H(t),A(!S),S}static empty(t){return new Jn(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],o=[];for(let u=0;u<t.length;u++){let p=t[u];if(typeof p=="number")n.push(p,-1);else{if(!Array.isArray(p)||typeof p[0]!="number"||p.some((v,S)=>S&&typeof v!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(p.length==1)n.push(p[0],0);else{for(;o.length<u;)o.push(Cn.empty);o[u]=Cn.of(p.slice(1)),n.push(p[0],o[u].length)}}}return new Jn(n,o)}static createSet(t,n){return new Jn(t,n)}}function Hn(a,t,n,o=!1){if(t==0&&n<=0)return;let u=a.length-2;u>=0&&n<=0&&n==a[u+1]?a[u]+=t:t==0&&a[u]==0?a[u+1]+=n:o?(a[u]+=t,a[u+1]+=n):a.push(t,n)}function Ir(a,t,n){if(n.length==0)return;let o=t.length-2>>1;if(o<a.length)a[a.length-1]=a[a.length-1].append(n);else{for(;a.length<o;)a.push(Cn.empty);a.push(n)}}function vr(a,t,n){let o=a.inserted;for(let u=0,p=0,v=0;v<a.sections.length;){let S=a.sections[v++],A=a.sections[v++];if(A<0)u+=S,p+=S;else{let H=u,X=p,Me=Cn.empty;for(;H+=S,X+=A,A&&o&&(Me=Me.append(o[v-2>>1])),!(n||v==a.sections.length||a.sections[v+1]<0);)S=a.sections[v++],A=a.sections[v++];t(u,H,p,X,Me),u=H,p=X}}}function yr(a,t,n,o=!1){let u=[],p=o?[]:null,v=new Or(a),S=new Or(t);for(let A=-1;;)if(v.ins==-1&&S.ins==-1){let H=Math.min(v.len,S.len);Hn(u,H,-1),v.forward(H),S.forward(H)}else if(S.ins>=0&&(v.ins<0||A==v.i||v.off==0&&(S.len<v.len||S.len==v.len&&!n))){let H=S.len;for(Hn(u,S.ins,-1);H;){let X=Math.min(v.len,H);v.ins>=0&&A<v.i&&v.len<=X&&(Hn(u,0,v.ins),p&&Ir(p,u,v.text),A=v.i),v.forward(X),H-=X}S.next()}else if(v.ins>=0){let H=0,X=v.len;for(;X;)if(S.ins==-1){let Me=Math.min(X,S.len);H+=Me,X-=Me,S.forward(Me)}else if(S.ins==0&&S.len<X)X-=S.len,S.next();else break;Hn(u,H,A<v.i?v.ins:0),p&&A<v.i&&Ir(p,u,v.text),A=v.i,v.forward(v.len-X)}else{if(v.done&&S.done)return p?Jn.createSet(u,p):dn.create(u);throw new Error("Mismatched change set lengths")}}function Er(a,t,n=!1){let o=[],u=n?[]:null,p=new Or(a),v=new Or(t);for(let S=!1;;){if(p.done&&v.done)return u?Jn.createSet(o,u):dn.create(o);if(p.ins==0)Hn(o,p.len,0,S),p.next();else if(v.len==0&&!v.done)Hn(o,0,v.ins,S),u&&Ir(u,o,v.text),v.next();else{if(p.done||v.done)throw new Error("Mismatched change set lengths");{let A=Math.min(p.len2,v.len),H=o.length;if(p.ins==-1){let X=v.ins==-1?-1:v.off?0:v.ins;Hn(o,A,X,S),u&&X&&Ir(u,o,v.text)}else v.ins==-1?(Hn(o,p.off?0:p.len,A,S),u&&Ir(u,o,p.textBit(A))):(Hn(o,p.off?0:p.len,v.off?0:v.ins,S),u&&!v.off&&Ir(u,o,v.text));S=(p.ins>A||v.ins>=0&&v.len>A)&&(S||o.length>H),p.forward2(A),v.forward(A)}}}}class Or{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length?Cn.empty:t[n]}textBit(t){let{inserted:n}=this.set,o=this.i-2>>1;return o>=n.length&&!t?Cn.empty:n[o].slice(this.off,t==null?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){this.ins==-1?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class we{constructor(t,n,o){this.from=t,this.to=n,this.flags=o}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let t=this.flags&3;return t==3?null:t}get goalColumn(){let t=this.flags>>5;return t==33554431?void 0:t}map(t,n=-1){let o,u;return this.empty?o=u=t.mapPos(this.from,n):(o=t.mapPos(this.from,1),u=t.mapPos(this.to,-1)),o==this.from&&u==this.to?this:new we(o,u,this.flags)}extend(t,n=t){if(t<=this.anchor&&n>=this.anchor)return ue.range(t,n);let o=Math.abs(t-this.anchor)>Math.abs(n-this.anchor)?t:n;return ue.range(this.anchor,o)}eq(t){return this.anchor==t.anchor&&this.head==t.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ue.range(t.anchor,t.head)}static create(t,n,o){return new we(t,n,o)}}class ue{constructor(t,n){this.ranges=t,this.mainIndex=n}map(t,n=-1){return t.empty?this:ue.create(this.ranges.map(o=>o.map(t,n)),this.mainIndex)}eq(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(t.ranges[n]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ue([this.main],0)}addRange(t,n=!0){return ue.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let o=this.ranges.slice();return o[n]=t,ue.create(o,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ue(t.ranges.map(n=>we.fromJSON(n)),t.main)}static single(t,n=t){return new ue([ue.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw new RangeError("A selection needs at least one range");for(let o=0,u=0;u<t.length;u++){let p=t[u];if(p.empty?p.from<=o:p.from<o)return ue.normalized(t.slice(),n);o=p.to}return new ue(t,n)}static cursor(t,n=0,o,u){return we.create(t,t,(n==0?0:n<0?4:8)|(o==null?3:Math.min(2,o))|(u??33554431)<<5)}static range(t,n,o,u){let p=(o??33554431)<<5|(u==null?3:Math.min(2,u));return n<t?we.create(n,t,24|p):we.create(t,n,(n>t?4:0)|p)}static normalized(t,n=0){let o=t[n];t.sort((u,p)=>u.from-p.from),n=t.indexOf(o);for(let u=1;u<t.length;u++){let p=t[u],v=t[u-1];if(p.empty?p.from<=v.to:p.from<v.to){let S=v.from,A=Math.max(p.to,v.to);u<=n&&n--,t.splice(--u,2,p.anchor>p.head?ue.range(A,S):ue.range(S,A))}}return new ue(t,n)}}function Te(a,t){for(let n of a.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let ze=0;class ft{constructor(t,n,o,u,p){this.combine=t,this.compareInput=n,this.compare=o,this.isStatic=u,this.id=ze++,this.default=t([]),this.extensions=typeof p=="function"?p(this):p}static define(t={}){return new ft(t.combine||(n=>n),t.compareInput||((n,o)=>n===o),t.compare||(t.combine?(n,o)=>n===o:yt),!!t.static,t.enables)}of(t){return new ln([],this,0,t)}compute(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new ln(t,this,1,n)}computeN(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new ln(t,this,2,n)}from(t,n){return n||(n=o=>o),this.compute([t],o=>n(o.field(t)))}}function yt(a,t){return a==t||a.length==t.length&&a.every((n,o)=>n===t[o])}class ln{constructor(t,n,o,u){this.dependencies=t,this.facet=n,this.type=o,this.value=u,this.id=ze++}dynamicSlot(t){var n;let o=this.value,u=this.facet.compareInput,p=this.id,v=t[p]>>1,S=this.type==2,A=!1,H=!1,X=[];for(let Me of this.dependencies)Me=="doc"?A=!0:Me=="selection"?H=!0:((n=t[Me.id])!==null&&n!==void 0?n:1)&1||X.push(t[Me.id]);return{create(Me){return Me.values[v]=o(Me),1},update(Me,gt){if(A&&gt.docChanged||H&&(gt.docChanged||gt.selection)||jr(Me,X)){let It=o(Me);if(S?!En(It,Me.values[v],u):!u(It,Me.values[v]))return Me.values[v]=It,1}return 0},reconfigure:(Me,gt)=>{let It,un=gt.config.address[p];if(un!=null){let or=ai(gt,un);if(this.dependencies.every(ar=>ar instanceof ft?gt.facet(ar)===Me.facet(ar):ar instanceof Ut?gt.field(ar,!1)==Me.field(ar,!1):!0)||(S?En(It=o(Me),or,u):u(It=o(Me),or)))return Me.values[v]=or,0}else It=o(Me);return Me.values[v]=It,1}}}}function En(a,t,n){if(a.length!=t.length)return!1;for(let o=0;o<a.length;o++)if(!n(a[o],t[o]))return!1;return!0}function jr(a,t){let n=!1;for(let o of t)Ar(a,o)&1&&(n=!0);return n}function ot(a,t,n){let o=n.map(A=>a[A.id]),u=n.map(A=>A.type),p=o.filter(A=>!(A&1)),v=a[t.id]>>1;function S(A){let H=[];for(let X=0;X<o.length;X++){let Me=ai(A,o[X]);if(u[X]==2)for(let gt of Me)H.push(gt);else H.push(Me)}return t.combine(H)}return{create(A){for(let H of o)Ar(A,H);return A.values[v]=S(A),1},update(A,H){if(!jr(A,p))return 0;let X=S(A);return t.compare(X,A.values[v])?0:(A.values[v]=X,1)},reconfigure(A,H){let X=jr(A,o),Me=H.config.facets[t.id],gt=H.facet(t);if(Me&&!X&&yt(n,Me))return A.values[v]=gt,0;let It=S(A);return t.compare(It,gt)?(A.values[v]=gt,0):(A.values[v]=It,1)}}}const zt=ft.define({static:!0});class Ut{constructor(t,n,o,u,p){this.id=t,this.createF=n,this.updateF=o,this.compareF=u,this.spec=p,this.provides=void 0}static define(t){let n=new Ut(ze++,t.create,t.update,t.compare||((o,u)=>o===u),t);return t.provide&&(n.provides=t.provide(n)),n}create(t){let n=t.facet(zt).find(o=>o.field==this);return(n?.create||this.createF)(t)}slot(t){let n=t[this.id]>>1;return{create:o=>(o.values[n]=this.create(o),1),update:(o,u)=>{let p=o.values[n],v=this.updateF(p,u);return this.compareF(p,v)?0:(o.values[n]=v,1)},reconfigure:(o,u)=>u.config.address[this.id]!=null?(o.values[n]=u.field(this),0):(o.values[n]=this.create(o),1)}}init(t){return[this,zt.of({field:this,create:t})]}get extension(){return this}}const Ln={lowest:4,low:3,default:2,high:1,highest:0};function Gn(a){return t=>new ur(t,a)}const xn={highest:Gn(Ln.highest),high:Gn(Ln.high),default:Gn(Ln.default),low:Gn(Ln.low),lowest:Gn(Ln.lowest)};class ur{constructor(t,n){this.inner=t,this.prec=n}}class Sr{of(t){return new Fr(this,t)}reconfigure(t){return Sr.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Fr{constructor(t,n){this.compartment=t,this.inner=n}}class ni{constructor(t,n,o,u,p,v){for(this.base=t,this.compartments=n,this.dynamicSlots=o,this.address=u,this.staticValues=p,this.facets=v,this.statusTemplate=[];this.statusTemplate.length<o.length;)this.statusTemplate.push(0)}staticFacet(t){let n=this.address[t.id];return n==null?t.default:this.staticValues[n>>1]}static resolve(t,n,o){let u=[],p=Object.create(null),v=new Map;for(let gt of di(t,n,v))gt instanceof Ut?u.push(gt):(p[gt.facet.id]||(p[gt.facet.id]=[])).push(gt);let S=Object.create(null),A=[],H=[];for(let gt of u)S[gt.id]=H.length<<1,H.push(It=>gt.slot(It));let X=o?.config.facets;for(let gt in p){let It=p[gt],un=It[0].facet,or=X&&X[gt]||[];if(It.every(ar=>ar.type==0))if(S[un.id]=A.length<<1|1,yt(or,It))A.push(o.facet(un));else{let ar=un.combine(It.map(wr=>wr.value));A.push(o&&un.compare(ar,o.facet(un))?o.facet(un):ar)}else{for(let ar of It)ar.type==0?(S[ar.id]=A.length<<1|1,A.push(ar.value)):(S[ar.id]=H.length<<1,H.push(wr=>ar.dynamicSlot(wr)));S[un.id]=H.length<<1,H.push(ar=>ot(ar,un,It))}}let Me=H.map(gt=>gt(S));return new ni(t,v,Me,S,A,p)}}function di(a,t,n){let o=[[],[],[],[],[]],u=new Map;function p(v,S){let A=u.get(v);if(A!=null){if(A<=S)return;let H=o[A].indexOf(v);H>-1&&o[A].splice(H,1),v instanceof Fr&&n.delete(v.compartment)}if(u.set(v,S),Array.isArray(v))for(let H of v)p(H,S);else if(v instanceof Fr){if(n.has(v.compartment))throw new RangeError("Duplicate use of compartment in extensions");let H=t.get(v.compartment)||v.inner;n.set(v.compartment,H),p(H,S)}else if(v instanceof ur)p(v.inner,v.prec);else if(v instanceof Ut)o[S].push(v),v.provides&&p(v.provides,S);else if(v instanceof ln)o[S].push(v),v.facet.extensions&&p(v.facet.extensions,Ln.default);else{let H=v.extension;if(!H)throw new Error(`Unrecognized extension value in extension set (${v}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);p(H,S)}}return p(a,Ln.default),o.reduce((v,S)=>v.concat(S))}function Ar(a,t){if(t&1)return 2;let n=t>>1,o=a.status[n];if(o==4)throw new Error("Cyclic dependency between fields and/or facets");if(o&2)return o;a.status[n]=4;let u=a.computeSlot(a,a.config.dynamicSlots[n]);return a.status[n]=2|u}function ai(a,t){return t&1?a.config.staticValues[t>>1]:a.values[t>>1]}const Oi=ft.define(),$r=ft.define({combine:a=>a.some(t=>t),static:!0}),_i=ft.define({combine:a=>a.length?a[0]:void 0,static:!0}),Wi=ft.define(),so=ft.define(),yo=ft.define(),to=ft.define({combine:a=>a.length?a[0]:!1});class Xe{constructor(t,n){this.type=t,this.value=n}static define(){return new De}}class De{of(t){return new Xe(this,t)}}class _t{constructor(t){this.map=t}of(t){return new Et(this,t)}}class Et{constructor(t,n){this.type=t,this.value=n}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new Et(this.type,n)}is(t){return this.type==t}static define(t={}){return new _t(t.map||(n=>n))}static mapEffects(t,n){if(!t.length)return t;let o=[];for(let u of t){let p=u.map(n);p&&o.push(p)}return o}}Et.reconfigure=Et.define(),Et.appendConfig=Et.define();class Xt{constructor(t,n,o,u,p,v){this.startState=t,this.changes=n,this.selection=o,this.effects=u,this.annotations=p,this.scrollIntoView=v,this._doc=null,this._state=null,o&&Te(o,n.newLength),p.some(S=>S.type==Xt.time)||(this.annotations=p.concat(Xt.time.of(Date.now())))}static create(t,n,o,u,p,v){return new Xt(t,n,o,u,p,v)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let n of this.annotations)if(n.type==t)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(Xt.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]=="."))}}Xt.time=Xe.define(),Xt.userEvent=Xe.define(),Xt.addToHistory=Xe.define(),Xt.remote=Xe.define();function Sn(a,t){let n=[];for(let o=0,u=0;;){let p,v;if(o<a.length&&(u==t.length||t[u]>=a[o]))p=a[o++],v=a[o++];else if(u<t.length)p=t[u++],v=t[u++];else return n;!n.length||n[n.length-1]<p?n.push(p,v):n[n.length-1]<v&&(n[n.length-1]=v)}}function On(a,t,n){var o;let u,p,v;return n?(u=t.changes,p=Jn.empty(t.changes.length),v=a.changes.compose(t.changes)):(u=t.changes.map(a.changes),p=a.changes.mapDesc(t.changes,!0),v=a.changes.compose(u)),{changes:v,selection:t.selection?t.selection.map(p):(o=a.selection)===null||o===void 0?void 0:o.map(u),effects:Et.mapEffects(a.effects,u).concat(Et.mapEffects(t.effects,p)),annotations:a.annotations.length?a.annotations.concat(t.annotations):t.annotations,scrollIntoView:a.scrollIntoView||t.scrollIntoView}}function jn(a,t,n){let o=t.selection,u=oi(t.annotations);return t.userEvent&&(u=u.concat(Xt.userEvent.of(t.userEvent))),{changes:t.changes instanceof Jn?t.changes:Jn.of(t.changes||[],n,a.facet(_i)),selection:o&&(o instanceof ue?o:ue.single(o.anchor,o.head)),effects:oi(t.effects),annotations:u,scrollIntoView:!!t.scrollIntoView}}function cr(a,t,n){let o=jn(a,t.length?t[0]:{},a.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let p=1;p<t.length;p++){t[p].filter===!1&&(n=!1);let v=!!t[p].sequential;o=On(o,jn(a,t[p],v?o.changes.newLength:a.doc.length),v)}let u=Xt.create(a,o.changes,o.selection,o.effects,o.annotations,o.scrollIntoView);return li(n?ii(u):u)}function ii(a){let t=a.startState,n=!0;for(let u of t.facet(Wi)){let p=u(a);if(p===!1){n=!1;break}Array.isArray(p)&&(n=n===!0?p:Sn(n,p))}if(n!==!0){let u,p;if(n===!1)p=a.changes.invertedDesc,u=Jn.empty(t.doc.length);else{let v=a.changes.filter(n);u=v.changes,p=v.filtered.mapDesc(v.changes).invertedDesc}a=Xt.create(t,u,a.selection&&a.selection.map(p),Et.mapEffects(a.effects,p),a.annotations,a.scrollIntoView)}let o=t.facet(so);for(let u=o.length-1;u>=0;u--){let p=o[u](a);p instanceof Xt?a=p:Array.isArray(p)&&p.length==1&&p[0]instanceof Xt?a=p[0]:a=cr(t,oi(p),!1)}return a}function li(a){let t=a.startState,n=t.facet(yo),o=a;for(let u=n.length-1;u>=0;u--){let p=n[u](a);p&&Object.keys(p).length&&(o=On(o,jn(t,p,a.changes.newLength),!0))}return o==a?a:Xt.create(t,a.changes,a.selection,o.effects,o.annotations,o.scrollIntoView)}const Yr=[];function oi(a){return a==null?Yr:Array.isArray(a)?a:[a]}var qr=function(a){return a[a.Word=0]="Word",a[a.Space=1]="Space",a[a.Other=2]="Other",a}(qr||(qr={}));const gi=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Qi;try{Qi=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function zi(a){if(Qi)return Qi.test(a);for(let t=0;t<a.length;t++){let n=a[t];if(/\w/.test(n)||n>"\x80"&&(n.toUpperCase()!=n.toLowerCase()||gi.test(n)))return!0}return!1}function Li(a){return t=>{if(!/\S/.test(t))return qr.Space;if(zi(t))return qr.Word;for(let n=0;n<a.length;n++)if(t.indexOf(a[n])>-1)return qr.Word;return qr.Other}}class ui{constructor(t,n,o,u,p,v){this.config=t,this.doc=n,this.selection=o,this.values=u,this.status=t.statusTemplate.slice(),this.computeSlot=p,v&&(v._state=this);for(let S=0;S<this.config.dynamicSlots.length;S++)Ar(this,S<<1);this.computeSlot=null}field(t,n=!0){let o=this.config.address[t.id];if(o==null){if(n)throw new RangeError("Field is not present in this state");return}return Ar(this,o),ai(this,o)}update(...t){return cr(this,t,!0)}applyTransaction(t){let n=this.config,{base:o,compartments:u}=n;for(let v of t.effects)v.is(Sr.reconfigure)?(n&&(u=new Map,n.compartments.forEach((S,A)=>u.set(A,S)),n=null),u.set(v.value.compartment,v.value.extension)):v.is(Et.reconfigure)?(n=null,o=v.value):v.is(Et.appendConfig)&&(n=null,o=oi(o).concat(v.value));let p;n?p=t.startState.values.slice():(n=ni.resolve(o,u,this),p=new ui(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(S,A)=>A.reconfigure(S,this),null).values),new ui(n,t.newDoc,t.newSelection,p,(v,S)=>S.update(v,t),t)}replaceSelection(t){return typeof t=="string"&&(t=this.toText(t)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:t},range:ue.cursor(n.from+t.length)}))}changeByRange(t){let n=this.selection,o=t(n.ranges[0]),u=this.changes(o.changes),p=[o.range],v=oi(o.effects);for(let S=1;S<n.ranges.length;S++){let A=t(n.ranges[S]),H=this.changes(A.changes),X=H.map(u);for(let gt=0;gt<S;gt++)p[gt]=p[gt].map(X);let Me=u.mapDesc(H,!0);p.push(A.range.map(Me)),u=u.compose(X),v=Et.mapEffects(v,X).concat(Et.mapEffects(oi(A.effects),Me))}return{changes:u,selection:ue.create(p,n.mainIndex),effects:v}}changes(t=[]){return t instanceof Jn?t:Jn.of(t,this.doc.length,this.facet(ui.lineSeparator))}toText(t){return Cn.of(t.split(this.facet(ui.lineSeparator)||Vt))}sliceDoc(t=0,n=this.doc.length){return this.doc.sliceString(t,n,this.lineBreak)}facet(t){let n=this.config.address[t.id];return n==null?t.default:(Ar(this,n),ai(this,n))}toJSON(t){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let o in t){let u=t[o];u instanceof Ut&&this.config.address[u.id]!=null&&(n[o]=u.spec.toJSON(this.field(t[o]),this))}return n}static fromJSON(t,n={},o){if(!t||typeof t.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let u=[];if(o){for(let p in o)if(Object.prototype.hasOwnProperty.call(t,p)){let v=o[p],S=t[p];u.push(v.init(A=>v.spec.fromJSON(S,A)))}}return ui.create({doc:t.doc,selection:ue.fromJSON(t.selection),extensions:n.extensions?u.concat([n.extensions]):u})}static create(t={}){let n=ni.resolve(t.extensions||[],new Map),o=t.doc instanceof Cn?t.doc:Cn.of((t.doc||"").split(n.staticFacet(ui.lineSeparator)||Vt)),u=t.selection?t.selection instanceof ue?t.selection:ue.single(t.selection.anchor,t.selection.head):ue.single(0);return Te(u,o.length),n.staticFacet($r)||(u=u.asSingle()),new ui(n,o,u,n.dynamicSlots.map(()=>null),(p,v)=>v.create(p),null)}get tabSize(){return this.facet(ui.tabSize)}get lineBreak(){return this.facet(ui.lineSeparator)||`
2191
2191
  `}get readOnly(){return this.facet(to)}phrase(t,...n){for(let o of this.facet(ui.phrases))if(Object.prototype.hasOwnProperty.call(o,t)){t=o[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(o,u)=>{if(u=="$")return"$";let p=+(u||1);return!p||p>n.length?o:n[p-1]})),t}languageDataAt(t,n,o=-1){let u=[];for(let p of this.facet(Oi))for(let v of p(this,n,o))Object.prototype.hasOwnProperty.call(v,t)&&u.push(v[t]);return u}charCategorizer(t){return Li(this.languageDataAt("wordChars",t).join(""))}wordAt(t){let{text:n,from:o,length:u}=this.doc.lineAt(t),p=this.charCategorizer(t),v=t-o,S=t-o;for(;v>0;){let A=ne(n,v,!1);if(p(n.slice(A,v))!=qr.Word)break;v=A}for(;S<u;){let A=ne(n,S);if(p(n.slice(S,A))!=qr.Word)break;S=A}return v==S?null:ue.range(v+o,S+o)}}ui.allowMultipleSelections=$r,ui.tabSize=ft.define({combine:a=>a.length?a[0]:4}),ui.lineSeparator=_i,ui.readOnly=to,ui.phrases=ft.define({compare(a,t){let n=Object.keys(a),o=Object.keys(t);return n.length==o.length&&n.every(u=>a[u]==t[u])}}),ui.languageData=Oi,ui.changeFilter=Wi,ui.transactionFilter=so,ui.transactionExtender=yo,Sr.reconfigure=Et.define();function Vi(a,t,n={}){let o={};for(let u of a)for(let p of Object.keys(u)){let v=u[p],S=o[p];if(S===void 0)o[p]=v;else if(!(S===v||v===void 0))if(Object.hasOwnProperty.call(n,p))o[p]=n[p](S,v);else throw new Error("Config merge conflict for field "+p)}for(let u in t)o[u]===void 0&&(o[u]=t[u]);return o}class Bi{eq(t){return this==t}range(t,n=t){return ho.create(t,n,this)}}Bi.prototype.startSide=Bi.prototype.endSide=0,Bi.prototype.point=!1,Bi.prototype.mapMode=Jt.TrackDel;class ho{constructor(t,n,o){this.from=t,this.to=n,this.value=o}static create(t,n,o){return new ho(t,n,o)}}function Hi(a,t){return a.from-t.from||a.value.startSide-t.value.startSide}class Eo{constructor(t,n,o,u){this.from=t,this.to=n,this.value=o,this.maxPoint=u}get length(){return this.to[this.to.length-1]}findIndex(t,n,o,u=0){let p=o?this.to:this.from;for(let v=u,S=p.length;;){if(v==S)return v;let A=v+S>>1,H=p[A]-t||(o?this.value[A].endSide:this.value[A].startSide)-n;if(A==v)return H>=0?v:S;H>=0?S=A:v=A+1}}between(t,n,o,u){for(let p=this.findIndex(n,-1e9,!0),v=this.findIndex(o,1e9,!1,p);p<v;p++)if(u(this.from[p]+t,this.to[p]+t,this.value[p])===!1)return!1}map(t,n){let o=[],u=[],p=[],v=-1,S=-1;for(let A=0;A<this.value.length;A++){let H=this.value[A],X=this.from[A]+t,Me=this.to[A]+t,gt,It;if(X==Me){let un=n.mapPos(X,H.startSide,H.mapMode);if(un==null||(gt=It=un,H.startSide!=H.endSide&&(It=n.mapPos(X,H.endSide),It<gt)))continue}else if(gt=n.mapPos(X,H.startSide),It=n.mapPos(Me,H.endSide),gt>It||gt==It&&H.startSide>0&&H.endSide<=0)continue;(It-gt||H.endSide-H.startSide)<0||(v<0&&(v=gt),H.point&&(S=Math.max(S,It-gt)),o.push(H),u.push(gt-v),p.push(It-v))}return{mapped:o.length?new Eo(u,p,o,S):null,pos:v}}}class hi{constructor(t,n,o,u){this.chunkPos=t,this.chunk=n,this.nextLayer=o,this.maxPoint=u}static create(t,n,o,u){return new hi(t,n,o,u)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let n of this.chunk)t+=n.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:n=[],sort:o=!1,filterFrom:u=0,filterTo:p=this.length}=t,v=t.filter;if(n.length==0&&!v)return this;if(o&&(n=n.slice().sort(Hi)),this.isEmpty)return n.length?hi.of(n):this;let S=new B(this,null,-1).goto(0),A=0,H=[],X=new Uo;for(;S.value||A<n.length;)if(A<n.length&&(S.from-n[A].from||S.startSide-n[A].value.startSide)>=0){let Me=n[A++];X.addInner(Me.from,Me.to,Me.value)||H.push(Me)}else S.rangeIndex==1&&S.chunkIndex<this.chunk.length&&(A==n.length||this.chunkEnd(S.chunkIndex)<n[A].from)&&(!v||u>this.chunkEnd(S.chunkIndex)||p<this.chunkPos[S.chunkIndex])&&X.addChunk(this.chunkPos[S.chunkIndex],this.chunk[S.chunkIndex])?S.nextChunk():((!v||u>S.to||p<S.from||v(S.from,S.to,S.value))&&(X.addInner(S.from,S.to,S.value)||H.push(ho.create(S.from,S.to,S.value))),S.next());return X.finishInner(this.nextLayer.isEmpty&&!H.length?hi.empty:this.nextLayer.update({add:H,filter:v,filterFrom:u,filterTo:p}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],o=[],u=-1;for(let v=0;v<this.chunk.length;v++){let S=this.chunkPos[v],A=this.chunk[v],H=t.touchesRange(S,S+A.length);if(H===!1)u=Math.max(u,A.maxPoint),n.push(A),o.push(t.mapPos(S));else if(H===!0){let{mapped:X,pos:Me}=A.map(S,t);X&&(u=Math.max(u,X.maxPoint),n.push(X),o.push(Me))}}let p=this.nextLayer.map(t);return n.length==0?p:new hi(o,n,p||hi.empty,u)}between(t,n,o){if(!this.isEmpty){for(let u=0;u<this.chunk.length;u++){let p=this.chunkPos[u],v=this.chunk[u];if(n>=p&&t<=p+v.length&&v.between(p,t-p,n-p,o)===!1)return}this.nextLayer.between(t,n,o)}}iter(t=0){return he.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,n=0){return he.from(t).goto(n)}static compare(t,n,o,u,p=-1){let v=t.filter(Me=>Me.maxPoint>0||!Me.isEmpty&&Me.maxPoint>=p),S=n.filter(Me=>Me.maxPoint>0||!Me.isEmpty&&Me.maxPoint>=p),A=ie(v,S,o),H=new rt(v,A,p),X=new rt(S,A,p);o.iterGaps((Me,gt,It)=>Lt(H,Me,X,gt,It,u)),o.empty&&o.length==0&&Lt(H,0,X,0,0,u)}static eq(t,n,o=0,u){u==null&&(u=1e9-1);let p=t.filter(X=>!X.isEmpty&&n.indexOf(X)<0),v=n.filter(X=>!X.isEmpty&&t.indexOf(X)<0);if(p.length!=v.length)return!1;if(!p.length)return!0;let S=ie(p,v),A=new rt(p,S,0).goto(o),H=new rt(v,S,0).goto(o);for(;;){if(A.to!=H.to||!en(A.active,H.active)||A.point&&(!H.point||!A.point.eq(H.point)))return!1;if(A.to>u)return!0;A.next(),H.next()}}static spans(t,n,o,u,p=-1){let v=new rt(t,null,p).goto(n),S=n,A=v.openStart;for(;;){let H=Math.min(v.to,o);if(v.point){let X=v.activeForPoint(v.to),Me=v.pointFrom<n?X.length+1:Math.min(X.length,A);u.point(S,H,v.point,X,Me,v.pointRank),A=Math.min(v.openEnd(H),X.length)}else H>S&&(u.span(S,H,v.active,A),A=v.openEnd(H));if(v.to>o)return A+(v.point&&v.to>o?1:0);S=v.to,v.next()}}static of(t,n=!1){let o=new Uo;for(let u of t instanceof ho?[t]:n?wo(t):t)o.add(u.from,u.to,u.value);return o.finish()}}hi.empty=new hi([],[],null,-1);function wo(a){if(a.length>1)for(let t=a[0],n=1;n<a.length;n++){let o=a[n];if(Hi(t,o)>0)return a.slice().sort(Hi);t=o}return a}hi.empty.nextLayer=hi.empty;class Uo{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(t){this.chunks.push(new Eo(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}add(t,n,o){this.addInner(t,n,o)||(this.nextLayer||(this.nextLayer=new Uo)).add(t,n,o)}addInner(t,n,o){let u=t-this.lastTo||o.startSide-this.last.endSide;if(u<=0&&(t-this.lastFrom||o.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return u<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(n-this.chunkStart),this.last=o,this.lastFrom=t,this.lastTo=n,this.value.push(o),o.point&&(this.maxPoint=Math.max(this.maxPoint,n-t)),!0)}addChunk(t,n){if((t-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(t);let o=n.value.length-1;return this.last=n.value[o],this.lastFrom=n.from[o]+t,this.lastTo=n.to[o]+t,!0}finish(){return this.finishInner(hi.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return t;let n=hi.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,n}}function ie(a,t,n){let o=new Map;for(let p of a)for(let v=0;v<p.chunk.length;v++)p.chunk[v].maxPoint<=0&&o.set(p.chunk[v],p.chunkPos[v]);let u=new Set;for(let p of t)for(let v=0;v<p.chunk.length;v++){let S=o.get(p.chunk[v]);S!=null&&(n?n.mapPos(S):S)==p.chunkPos[v]&&!n?.touchesRange(S,S+p.chunk[v].length)&&u.add(p.chunk[v])}return u}class B{constructor(t,n,o,u=0){this.layer=t,this.skip=n,this.minPoint=o,this.rank=u}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,n,!1),this}gotoInner(t,n,o){for(;this.chunkIndex<this.layer.chunk.length;){let u=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(u)||this.layer.chunkEnd(this.chunkIndex)<t||u.maxPoint<this.minPoint))break;this.chunkIndex++,o=!1}if(this.chunkIndex<this.layer.chunk.length){let u=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],n,!0);(!o||this.rangeIndex<u)&&this.setRangeIndex(u)}this.next()}forward(t,n){(this.to-t||this.endSide-n)<0&&this.gotoInner(t,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let t=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],o=t+n.from[this.rangeIndex];if(this.from=o,this.to=t+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class he{constructor(t){this.heap=t}static from(t,n=null,o=-1){let u=[];for(let p=0;p<t.length;p++)for(let v=t[p];!v.isEmpty;v=v.nextLayer)v.maxPoint>=o&&u.push(new B(v,n,o,p));return u.length==1?u[0]:new he(u)}get startSide(){return this.value?this.value.startSide:0}goto(t,n=-1e9){for(let o of this.heap)o.goto(t,n);for(let o=this.heap.length>>1;o>=0;o--)xe(this.heap,o);return this.next(),this}forward(t,n){for(let o of this.heap)o.forward(t,n);for(let o=this.heap.length>>1;o>=0;o--)xe(this.heap,o);(this.to-t||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),xe(this.heap,0)}}}function xe(a,t){for(let n=a[t];;){let o=(t<<1)+1;if(o>=a.length)break;let u=a[o];if(o+1<a.length&&u.compare(a[o+1])>=0&&(u=a[o+1],o++),n.compare(u)<0)break;a[o]=n,a[t]=u,t=o}}class rt{constructor(t,n,o){this.minPoint=o,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=he.from(t,n,o)}goto(t,n=-1e9){return this.cursor.goto(t,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=n,this.openStart=-1,this.next(),this}forward(t,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(t,n)}removeActive(t){An(this.active,t),An(this.activeTo,t),An(this.activeRank,t),this.minActive=Mr(this.active,this.activeTo)}addActive(t){let n=0,{value:o,to:u,rank:p}=this.cursor;for(;n<this.activeRank.length&&this.activeRank[n]<=p;)n++;_n(this.active,n,o),_n(this.activeTo,n,u),_n(this.activeRank,n,p),t&&_n(t,n,this.cursor.from),this.minActive=Mr(this.active,this.activeTo)}next(){let t=this.to,n=this.point;this.point=null;let o=this.openStart<0?[]:null;for(;;){let u=this.minActive;if(u>-1&&(this.activeTo[u]-this.cursor.from||this.active[u].endSide-this.cursor.startSide)<0){if(this.activeTo[u]>t){this.to=this.activeTo[u],this.endSide=this.active[u].endSide;break}this.removeActive(u),o&&An(o,u)}else if(this.cursor.value)if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let p=this.cursor.value;if(!p.point)this.addActive(o),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=p,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=p.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(o){this.openStart=0;for(let u=o.length-1;u>=0&&o[u]<t;u--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let n=[];for(let o=this.active.length-1;o>=0&&!(this.activeRank[o]<this.pointRank);o--)(this.activeTo[o]>t||this.activeTo[o]==t&&this.active[o].endSide>=this.point.endSide)&&n.push(this.active[o]);return n.reverse()}openEnd(t){let n=0;for(let o=this.activeTo.length-1;o>=0&&this.activeTo[o]>t;o--)n++;return n}}function Lt(a,t,n,o,u,p){a.goto(t),n.goto(o);let v=o+u,S=o,A=o-t;for(;;){let H=a.to+A-n.to||a.endSide-n.endSide,X=H<0?a.to+A:n.to,Me=Math.min(X,v);if(a.point||n.point?a.point&&n.point&&(a.point==n.point||a.point.eq(n.point))&&en(a.activeForPoint(a.to+A),n.activeForPoint(n.to))||p.comparePoint(S,Me,a.point,n.point):Me>S&&!en(a.active,n.active)&&p.compareRange(S,Me,a.active,n.active),X>v)break;S=X,H<=0&&a.next(),H>=0&&n.next()}}function en(a,t){if(a.length!=t.length)return!1;for(let n=0;n<a.length;n++)if(a[n]!=t[n]&&!a[n].eq(t[n]))return!1;return!0}function An(a,t){for(let n=t,o=a.length-1;n<o;n++)a[n]=a[n+1];a.pop()}function _n(a,t,n){for(let o=a.length-1;o>=t;o--)a[o+1]=a[o];a[t]=n}function Mr(a,t){let n=-1,o=1e9;for(let u=0;u<t.length;u++)(t[u]-o||a[u].endSide-a[n].endSide)<0&&(n=u,o=t[u]);return n}function Ur(a,t,n=a.length){let o=0;for(let u=0;u<n;)a.charCodeAt(u)==9?(o+=t-o%t,u++):(o++,u=ne(a,u));return o}function Pr(a,t,n,o){for(let u=0,p=0;;){if(p>=t)return u;if(u==a.length)break;p+=a.charCodeAt(u)==9?n-p%n:1,u=ne(a,u)}return o===!0?-1:a.length}const Kr="\u037C",Qr=typeof Symbol>"u"?"__"+Kr:Symbol.for(Kr),Wr=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),ci=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class pr{constructor(t,n){this.rules=[];let{finish:o}=n||{};function u(v){return/^@/.test(v)?[v]:v.split(/,\s*/)}function p(v,S,A,H){let X=[],Me=/^@(\w+)\b/.exec(v[0]),gt=Me&&Me[1]=="keyframes";if(Me&&S==null)return A.push(v[0]+";");for(let It in S){let un=S[It];if(/&/.test(It))p(It.split(/,\s*/).map(or=>v.map(ar=>or.replace(/&/,ar))).reduce((or,ar)=>or.concat(ar)),un,A);else if(un&&typeof un=="object"){if(!Me)throw new RangeError("The value of a property ("+It+") should be a primitive value.");p(u(It),un,X,gt)}else un!=null&&X.push(It.replace(/_.*/,"").replace(/[A-Z]/g,or=>"-"+or.toLowerCase())+": "+un+";")}(X.length||gt)&&A.push((o&&!Me&&!H?v.map(o):v).join(", ")+" {"+X.join(" ")+"}")}for(let v in t)p(u(v),t[v],this.rules)}getRules(){return this.rules.join(`
2192
2192
  `)}static newName(){let t=ci[Qr]||1;return ci[Qr]=t+1,Kr+t.toString(36)}static mount(t,n){(t[Wr]||new Br(t)).mount(Array.isArray(n)?n:[n])}}let Xr=null;class Br{constructor(t){if(!t.head&&t.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(Xr)return t.adoptedStyleSheets=[Xr.sheet].concat(t.adoptedStyleSheets),t[Wr]=Xr;this.sheet=new CSSStyleSheet,t.adoptedStyleSheets=[this.sheet].concat(t.adoptedStyleSheets),Xr=this}else{this.styleTag=(t.ownerDocument||t).createElement("style");let n=t.head||t;n.insertBefore(this.styleTag,n.firstChild)}this.modules=[],t[Wr]=this}mount(t){let n=this.sheet,o=0,u=0;for(let p=0;p<t.length;p++){let v=t[p],S=this.modules.indexOf(v);if(S<u&&S>-1&&(this.modules.splice(S,1),u--,S=-1),S==-1){if(this.modules.splice(u++,0,v),n)for(let A=0;A<v.rules.length;A++)n.insertRule(v.rules[A],o++)}else{for(;u<S;)o+=this.modules[u++].rules.length;o+=v.rules.length,u++}}if(!n){let p="";for(let v=0;v<this.modules.length;v++)p+=this.modules[v].getRules()+`
2193
- `;this.styleTag.textContent=p}}}for(var Mn={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},qi={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Po=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),mo=typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent),Ko=typeof navigator<"u"&&/Mac/.test(navigator.platform),Co=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),No=Ko||Po&&+Po[1]<57,Ao=0;Ao<10;Ao++)Mn[48+Ao]=Mn[96+Ao]=String(Ao);for(var Ao=1;Ao<=24;Ao++)Mn[Ao+111]="F"+Ao;for(var Ao=65;Ao<=90;Ao++)Mn[Ao]=String.fromCharCode(Ao+32),qi[Ao]=String.fromCharCode(Ao);for(var vt in Mn)qi.hasOwnProperty(vt)||(qi[vt]=Mn[vt]);function la(a){var t=No&&(a.ctrlKey||a.altKey||a.metaKey)||Co&&a.shiftKey&&a.key&&a.key.length==1||a.key=="Unidentified",n=!t&&a.key||(a.shiftKey?qi:Mn)[a.keyCode]||a.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Es(a){let t;return a.nodeType==11?t=a.getSelection?a:a.ownerDocument:t=a,t.getSelection()}function Qn(a,t){return t?a==t||a.contains(t.nodeType!=1?t.parentNode:t):!1}function ms(a){let t=a.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function ua(a,t){if(!t.anchorNode)return!1;try{return Qn(a,t.anchorNode)}catch{return!1}}function co(a){return a.nodeType==3?go(a,0,a.nodeValue.length).getClientRects():a.nodeType==1?a.getClientRects():[]}function Zs(a,t,n,o){return n?qe(a,t,n,o,-1)||qe(a,t,n,o,1):!1}function ya(a){for(var t=0;;t++)if(a=a.previousSibling,!a)return t}function qe(a,t,n,o,u){for(;;){if(a==n&&t==o)return!0;if(t==(u<0?0:Oa(a))){if(a.nodeName=="DIV")return!1;let p=a.parentNode;if(!p||p.nodeType!=1)return!1;t=ya(a)+(u<0?0:1),a=p}else if(a.nodeType==1){if(a=a.childNodes[t+(u<0?-1:0)],a.nodeType==1&&a.contentEditable=="false")return!1;t=u<0?Oa(a):0}else return!1}}function Oa(a){return a.nodeType==3?a.nodeValue.length:a.childNodes.length}const ul={left:0,right:0,top:0,bottom:0};function Mo(a,t){let n=t?a.left:a.right;return{left:n,right:n,top:a.top,bottom:a.bottom}}function bs(a){return{left:0,right:a.innerWidth,top:0,bottom:a.innerHeight}}function ca(a,t,n,o,u,p,v,S){let A=a.ownerDocument,H=A.defaultView||window;for(let X=a;X;)if(X.nodeType==1){let Me,gt=X==A.body;if(gt)Me=bs(H);else{if(X.scrollHeight<=X.clientHeight&&X.scrollWidth<=X.clientWidth){X=X.assignedSlot||X.parentNode;continue}let or=X.getBoundingClientRect();Me={left:or.left,right:or.left+X.clientWidth,top:or.top,bottom:or.top+X.clientHeight}}let It=0,un=0;if(u=="nearest")t.top<Me.top?(un=-(Me.top-t.top+v),n>0&&t.bottom>Me.bottom+un&&(un=t.bottom-Me.bottom+un+v)):t.bottom>Me.bottom&&(un=t.bottom-Me.bottom+v,n<0&&t.top-un<Me.top&&(un=-(Me.top+un-t.top+v)));else{let or=t.bottom-t.top,ar=Me.bottom-Me.top;un=(u=="center"&&or<=ar?t.top+or/2-ar/2:u=="start"||u=="center"&&n<0?t.top-v:t.bottom-ar+v)-Me.top}if(o=="nearest"?t.left<Me.left?(It=-(Me.left-t.left+p),n>0&&t.right>Me.right+It&&(It=t.right-Me.right+It+p)):t.right>Me.right&&(It=t.right-Me.right+p,n<0&&t.left<Me.left+It&&(It=-(Me.left+It-t.left+p))):It=(o=="center"?t.left+(t.right-t.left)/2-(Me.right-Me.left)/2:o=="start"==S?t.left-p:t.right-(Me.right-Me.left)+p)-Me.left,It||un)if(gt)H.scrollBy(It,un);else{let or=0,ar=0;if(un){let wr=X.scrollTop;X.scrollTop+=un,ar=X.scrollTop-wr}if(It){let wr=X.scrollLeft;X.scrollLeft+=It,or=X.scrollLeft-wr}t={left:t.left-or,top:t.top-ar,right:t.right-or,bottom:t.bottom-ar},or&&Math.abs(or-It)<1&&(o="nearest"),ar&&Math.abs(ar-un)<1&&(u="nearest")}if(gt)break;X=X.assignedSlot||X.parentNode}else if(X.nodeType==11)X=X.host;else break}function El(a){let t=a.ownerDocument;for(let n=a.parentNode;n&&n!=t.body;)if(n.nodeType==1){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class Ds{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){this.set(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset)}set(t,n,o,u){this.anchorNode=t,this.anchorOffset=n,this.focusNode=o,this.focusOffset=u}}let Zi=null;function Xo(a){if(a.setActive)return a.setActive();if(Zi)return a.focus(Zi);let t=[];for(let n=a;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(a.focus(Zi==null?{get preventScroll(){return Zi={preventScroll:!0},!0}}:void 0),!Zi){Zi=!1;for(let n=0;n<t.length;){let o=t[n++],u=t[n++],p=t[n++];o.scrollTop!=u&&(o.scrollTop=u),o.scrollLeft!=p&&(o.scrollLeft=p)}}}let po;function go(a,t,n=t){let o=po||(po=document.createRange());return o.setEnd(a,n),o.setStart(a,t),o}function Fo(a,t,n){let o={key:t,code:t,keyCode:n,which:n,cancelable:!0},u=new KeyboardEvent("keydown",o);u.synthetic=!0,a.dispatchEvent(u);let p=new KeyboardEvent("keyup",o);return p.synthetic=!0,a.dispatchEvent(p),u.defaultPrevented||p.defaultPrevented}function xs(a){for(;a;){if(a&&(a.nodeType==9||a.nodeType==11&&a.host))return a;a=a.assignedSlot||a.parentNode}return null}function fa(a){for(;a.attributes.length;)a.removeAttributeNode(a.attributes[0])}function $a(a,t){let n=t.focusNode,o=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=o)return!1;for(;;)if(o){if(n.nodeType!=1)return!1;let u=n.childNodes[o-1];u.contentEditable=="false"?o--:(n=u,o=Oa(n))}else{if(n==a)return!0;o=ya(n),n=n.parentNode}}class us{constructor(t,n,o=!0){this.node=t,this.offset=n,this.precise=o}static before(t,n){return new us(t.parentNode,ya(t),n)}static after(t,n){return new us(t.parentNode,ya(t)+1,n)}}const bl=[];class Go{constructor(){this.parent=null,this.dom=null,this.dirty=2}get editorView(){if(!this.parent)throw new Error("Accessing view in orphan content view");return this.parent.editorView}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t){let n=this.posAtStart;for(let o of this.children){if(o==t)return n;n+=o.length+o.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}coordsAt(t,n){return null}sync(t){if(this.dirty&2){let n=this.dom,o=null,u;for(let p of this.children){if(p.dirty){if(!p.dom&&(u=o?o.nextSibling:n.firstChild)){let v=Go.get(u);(!v||!v.parent&&v.canReuseDOM(p))&&p.reuseDOM(u)}p.sync(t),p.dirty=0}if(u=o?o.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&u!=p.dom&&(t.written=!0),p.dom.parentNode==n)for(;u&&u!=p.dom;)u=xt(u);else n.insertBefore(p.dom,u);o=p.dom}for(u=o?o.nextSibling:n.firstChild,u&&t&&t.node==n&&(t.written=!0);u;)u=xt(u)}else if(this.dirty&1)for(let n of this.children)n.dirty&&(n.sync(t),n.dirty=0)}reuseDOM(t){}localPosFromDOM(t,n){let o;if(t==this.dom)o=this.dom.childNodes[n];else{let u=Oa(t)==0?0:n==0?-1:1;for(;;){let p=t.parentNode;if(p==this.dom)break;u==0&&p.firstChild!=p.lastChild&&(t==p.firstChild?u=-1:u=1),t=p}u<0?o=t:o=t.nextSibling}if(o==this.dom.firstChild)return 0;for(;o&&!Go.get(o);)o=o.nextSibling;if(!o)return this.length;for(let u=0,p=0;;u++){let v=this.children[u];if(v.dom==o)return p;p+=v.length+v.breakAfter}}domBoundsAround(t,n,o=0){let u=-1,p=-1,v=-1,S=-1;for(let A=0,H=o,X=o;A<this.children.length;A++){let Me=this.children[A],gt=H+Me.length;if(H<t&&gt>n)return Me.domBoundsAround(t,n,H);if(gt>=t&&u==-1&&(u=A,p=H),H>n&&Me.dom.parentNode==this.dom){v=A,S=X;break}X=gt,H=gt+Me.breakAfter}return{from:p,to:S<0?o+this.length:S,startDOM:(u?this.children[u-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:v<this.children.length&&v>=0?this.children[v].dom:null}}markDirty(t=!1){this.dirty|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let n=this.parent;n;n=n.parent){if(t&&(n.dirty|=2),n.dirty&1)return;n.dirty|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,this.dirty&&this.markParentsDirty(!0))}setDOM(t){this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this}get rootView(){for(let t=this;;){let n=t.parent;if(!n)return t;t=n}}replaceChildren(t,n,o=bl){this.markDirty();for(let u=t;u<n;u++){let p=this.children[u];p.parent==this&&p.destroy()}this.children.splice(t,n-t,...o);for(let u=0;u<o.length;u++)o[u].setParent(this)}ignoreMutation(t){return!1}ignoreEvent(t){return!1}childCursor(t=this.length){return new Tn(this.children,t,this.children.length)}childPos(t,n=1){return this.childCursor().findPos(t,n)}toString(){let t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+(t=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(t){return t.cmView}get isEditable(){return!0}merge(t,n,o,u,p,v){return!1}become(t){return!1}canReuseDOM(t){return t.constructor==this.constructor}getSide(){return 0}destroy(){this.parent=null}}Go.prototype.breakAfter=0;function xt(a){let t=a.nextSibling;return a.parentNode.removeChild(a),t}class Tn{constructor(t,n,o){this.children=t,this.pos=n,this.i=o,this.off=0}findPos(t,n=1){for(;;){if(t>this.pos||t==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let o=this.children[--this.i];this.pos-=o.length+o.breakAfter}}}function $n(a,t,n,o,u,p,v,S,A){let{children:H}=a,X=H.length?H[t]:null,Me=p.length?p[p.length-1]:null,gt=Me?Me.breakAfter:v;if(!(t==o&&X&&!v&&!gt&&p.length<2&&X.merge(n,u,p.length?Me:null,n==0,S,A))){if(o<H.length){let It=H[o];It&&u<It.length?(t==o&&(It=It.split(u),u=0),!gt&&Me&&It.merge(0,u,Me,!0,0,A)?p[p.length-1]=It:(u&&It.merge(0,u,null,!1,0,A),p.push(It))):It?.breakAfter&&(Me?Me.breakAfter=1:v=1),o++}for(X&&(X.breakAfter=v,n>0&&(!v&&p.length&&X.merge(n,X.length,p[0],!1,S,0)?X.breakAfter=p.shift().breakAfter:(n<X.length||X.children.length&&X.children[X.children.length-1].length==0)&&X.merge(n,X.length,null,!1,S,0),t++));t<o&&p.length;)if(H[o-1].become(p[p.length-1]))o--,p.pop(),A=p.length?0:S;else if(H[t].become(p[0]))t++,p.shift(),S=p.length?0:A;else break;!p.length&&t&&o<H.length&&!H[t-1].breakAfter&&H[o].merge(0,0,H[t-1],!1,S,A)&&t--,(t<o||p.length)&&a.replaceChildren(t,o,p)}}function lr(a,t,n,o,u,p){let v=a.childCursor(),{i:S,off:A}=v.findPos(n,1),{i:H,off:X}=v.findPos(t,-1),Me=t-n;for(let gt of o)Me+=gt.length;a.length+=Me,$n(a,H,X,S,A,o,0,u,p)}let br=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Gr=typeof document<"u"?document:{documentElement:{style:{}}};const vi=/Edge\/(\d+)/.exec(br.userAgent),xi=/MSIE \d/.test(br.userAgent),Ti=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(br.userAgent),bi=!!(xi||Ti||vi),wi=!bi&&/gecko\/(\d+)/i.test(br.userAgent),fi=!bi&&/Chrome\/(\d+)/.exec(br.userAgent),ji="webkitFontSmoothing"in Gr.documentElement.style,lo=!bi&&/Apple Computer/.test(br.vendor),uo=lo&&(/Mobile\/\w+/.test(br.userAgent)||br.maxTouchPoints>2);var xr={mac:uo||/Mac/.test(br.platform),windows:/Win/.test(br.platform),linux:/Linux|X11/.test(br.platform),ie:bi,ie_version:xi?Gr.documentMode||6:Ti?+Ti[1]:vi?+vi[1]:0,gecko:wi,gecko_version:wi?+(/Firefox\/(\d+)/.exec(br.userAgent)||[0,0])[1]:0,chrome:!!fi,chrome_version:fi?+fi[1]:0,ios:uo,android:/Android\b/.test(br.userAgent),webkit:ji,safari:lo,webkit_version:ji?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:Gr.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const So=256;class Do extends Go{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){t.nodeType==3&&this.createDOM(t)}merge(t,n,o){return o&&(!(o instanceof Do)||this.length-(n-t)+o.length>So)?!1:(this.text=this.text.slice(0,t)+(o?o.text:"")+this.text.slice(n),this.markDirty(),!0)}split(t){let n=new Do(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),n}localPosFromDOM(t,n){return t==this.dom?n:n?this.text.length:0}domAtPos(t){return new us(this.dom,t)}domBoundsAround(t,n,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,n){return no(this.dom,t,n)}}class bo extends Go{constructor(t,n=[],o=0){super(),this.mark=t,this.children=n,this.length=o;for(let u of n)u.setParent(this)}setAttrs(t){if(fa(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)t.setAttribute(n,this.mark.attrs[n]);return t}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.dirty|=6)}sync(t){this.dom?this.dirty&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t)}merge(t,n,o,u,p,v){return o&&(!(o instanceof bo&&o.mark.eq(this.mark))||t&&p<=0||n<this.length&&v<=0)?!1:(lr(this,t,n,o?o.children:[],p-1,v-1),this.markDirty(),!0)}split(t){let n=[],o=0,u=-1,p=0;for(let S of this.children){let A=o+S.length;A>t&&n.push(o<t?S.split(t-o):S),u<0&&o>=t&&(u=p),o=A,p++}let v=this.length-t;return this.length=t,u>-1&&(this.children.length=u,this.markDirty()),new bo(this.mark,n,v)}domAtPos(t){return Ea(this,t)}coordsAt(t,n){return Ta(this,t,n)}}function no(a,t,n){let o=a.nodeValue.length;t>o&&(t=o);let u=t,p=t,v=0;t==0&&n<0||t==o&&n>=0?xr.chrome||xr.gecko||(t?(u--,v=1):p<o&&(p++,v=-1)):n<0?u--:p<o&&p++;let S=go(a,u,p).getClientRects();if(!S.length)return ul;let A=S[(v?v<0:n>=0)?0:S.length-1];return xr.safari&&!v&&A.width==0&&(A=Array.prototype.find.call(S,H=>H.width)||A),v?Mo(A,v<0):A||null}class Yo extends Go{constructor(t,n,o){super(),this.widget=t,this.length=n,this.side=o,this.prevWidget=null}static create(t,n,o){return new(t.customView||Yo)(t,n,o)}split(t){let n=Yo.create(this.widget,this.length-t,this.side);return this.length-=t,n}sync(){(!this.dom||!this.widget.updateDOM(this.dom))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}getSide(){return this.side}merge(t,n,o,u,p,v){return o&&(!(o instanceof Yo)||!this.widget.compare(o.widget)||t>0&&p<=0||n<this.length&&v<=0)?!1:(this.length=t+(o?o.length:0)+(this.length-n),!0)}become(t){return t.length==this.length&&t instanceof Yo&&t.side==this.side&&this.widget.constructor==t.widget.constructor?(this.widget.eq(t.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,!0):!1}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get overrideDOMText(){if(this.length==0)return Cn.empty;let t=this;for(;t.parent;)t=t.parent;let n=t.editorView,o=n&&n.state.doc,u=this.posAtStart;return o?o.slice(u,u+this.length):Cn.empty}domAtPos(t){return t==0?us.before(this.dom):us.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,n){let o=this.dom.getClientRects(),u=null;if(!o.length)return ul;for(let p=t>0?o.length-1:0;u=o[p],!(t>0?p==0:p==o.length-1||u.top<u.bottom);p+=t>0?-1:1);return this.length?u:Mo(u,this.side>0)}get isEditable(){return!1}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class as extends Yo{domAtPos(t){let{topView:n,text:o}=this.widget;return n?Ks(t,0,n,o,(u,p)=>u.domAtPos(p),u=>new us(o,Math.min(u,o.nodeValue.length))):new us(o,Math.min(t,o.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(t,n){let{topView:o,text:u}=this.widget;return o?qo(t,n,o,u):Math.min(n,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(t,n){let{topView:o,text:u}=this.widget;return o?Ks(t,n,o,u,(p,v,S)=>p.coordsAt(v,S),(p,v)=>no(u,p,v)):no(u,t,n)}destroy(){var t;super.destroy(),(t=this.widget.topView)===null||t===void 0||t.destroy()}get isEditable(){return!0}canReuseDOM(){return!0}}function Ks(a,t,n,o,u,p){if(n instanceof bo){for(let v=n.dom.firstChild;v;v=v.nextSibling){let S=Go.get(v);if(!S)return p(a,t);let A=Qn(v,o),H=S.length+(A?o.nodeValue.length:0);if(a<H||a==H&&S.getSide()<=0)return A?Ks(a,t,S,o,u,p):u(S,a,t);a-=H}return u(n,n.length,-1)}else return n.dom==o?p(a,t):u(n,a,t)}function qo(a,t,n,o){if(n instanceof bo)for(let u of n.children){let p=0,v=Qn(u.dom,o);if(Qn(u.dom,a))return p+(v?qo(a,t,u,o):u.localPosFromDOM(a,t));p+=v?o.nodeValue.length:u.length}else if(n.dom==o)return Math.min(t,o.nodeValue.length);return n.localPosFromDOM(a,t)}class Gs extends Go{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof Gs&&t.side==this.side}split(){return new Gs(this.side)}sync(){if(!this.dom){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),this.setDOM(t)}}getSide(){return this.side}domAtPos(t){return us.before(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){let n=this.dom.getBoundingClientRect(),o=Ys(this,this.side>0?-1:1);return o&&o.top<n.bottom&&o.bottom>n.top?{left:n.left,right:n.right,top:o.top,bottom:o.bottom}:n}get overrideDOMText(){return Cn.empty}}Do.prototype.children=Yo.prototype.children=Gs.prototype.children=bl;function Ys(a,t){let n=a.parent,o=n?n.children.indexOf(a):-1;for(;n&&o>=0;)if(t<0?o>0:o<n.children.length){let u=n.children[o+t];if(u instanceof Do){let p=u.coordsAt(t<0?u.length:0,t);if(p)return p}o+=t}else if(n instanceof bo&&n.parent)o=n.parent.children.indexOf(n)+(t<0?0:1),n=n.parent;else{let u=n.dom.lastChild;if(u&&u.nodeName=="BR")return u.getClientRects()[0];break}}function Ea(a,t){let n=a.dom,{children:o}=a,u=0;for(let p=0;u<o.length;u++){let v=o[u],S=p+v.length;if(!(S==p&&v.getSide()<=0)){if(t>p&&t<S&&v.dom.parentNode==n)return v.domAtPos(t-p);if(t<=p)break;p=S}}for(let p=u;p>0;p--){let v=o[p-1];if(v.dom.parentNode==n)return v.domAtPos(v.length)}for(let p=u;p<o.length;p++){let v=o[p];if(v.dom.parentNode==n)return v.domAtPos(0)}return new us(n,0)}function Na(a,t,n){let o,{children:u}=a;n>0&&t instanceof bo&&u.length&&(o=u[u.length-1])instanceof bo&&o.mark.eq(t.mark)?Na(o,t.children[0],n-1):(u.push(t),t.setParent(a)),a.length+=t.length}function Ta(a,t,n){let o=null,u=-1,p=null,v=-1;function S(H,X){for(let Me=0,gt=0;Me<H.children.length&&gt<=X;Me++){let It=H.children[Me],un=gt+It.length;un>=X&&(It.children.length?S(It,X-gt):!p&&(un>X||gt==un&&It.getSide()>0)?(p=It,v=X-gt):(gt<X||gt==un&&It.getSide()<0)&&(o=It,u=X-gt)),gt=un}}S(a,t);let A=(n<0?o:p)||o||p;return A?A.coordsAt(Math.max(0,A==o?u:v),n):Ms(a)}function Ms(a){let t=a.dom.lastChild;if(!t)return a.dom.getBoundingClientRect();let n=co(t);return n[n.length-1]||null}function Fl(a,t){for(let n in a)n=="class"&&t.class?t.class+=" "+a.class:n=="style"&&t.style?t.style+=";"+a.style:t[n]=a[n];return t}function wa(a,t){if(a==t)return!0;if(!a||!t)return!1;let n=Object.keys(a),o=Object.keys(t);if(n.length!=o.length)return!1;for(let u of n)if(o.indexOf(u)==-1||a[u]!==t[u])return!1;return!0}function Bl(a,t,n){let o=null;if(t)for(let u in t)n&&u in n||a.removeAttribute(o=u);if(n)for(let u in n)t&&t[u]==n[u]||a.setAttribute(o=u,n[u]);return!!o}class ba{eq(t){return!1}updateDOM(t){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}ignoreEvent(t){return!0}get customView(){return null}destroy(t){}}var Ro=function(a){return a[a.Text=0]="Text",a[a.WidgetBefore=1]="WidgetBefore",a[a.WidgetAfter=2]="WidgetAfter",a[a.WidgetRange=3]="WidgetRange",a}(Ro||(Ro={}));class Lr extends Bi{constructor(t,n,o,u){super(),this.startSide=t,this.endSide=n,this.widget=o,this.spec=u}get heightRelevant(){return!1}static mark(t){return new es(t)}static widget(t){let n=t.side||0,o=!!t.block;return n+=o?n>0?3e8:-4e8:n>0?1e8:-1e8,new ta(t,n,n,o,t.widget||null,!1)}static replace(t){let n=!!t.block,o,u;if(t.isBlockGap)o=-5e8,u=4e8;else{let{start:p,end:v}=Ja(t,n);o=(p?n?-3e8:-1:5e8)-1,u=(v?n?2e8:1:-6e8)+1}return new ta(t,o,u,n,t.widget||null,!0)}static line(t){return new Ws(t)}static set(t,n=!1){return hi.of(t,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Lr.none=hi.empty;class es extends Lr{constructor(t){let{start:n,end:o}=Ja(t);super(n?-1:5e8,o?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){return this==t||t instanceof es&&this.tagName==t.tagName&&this.class==t.class&&wa(this.attrs,t.attrs)}range(t,n=t){if(t>=n)throw new RangeError("Mark decorations may not be empty");return super.range(t,n)}}es.prototype.point=!1;class Ws extends Lr{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof Ws&&this.spec.class==t.spec.class&&wa(this.spec.attributes,t.spec.attributes)}range(t,n=t){if(n!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,n)}}Ws.prototype.mapMode=Jt.TrackBefore,Ws.prototype.point=!0;class ta extends Lr{constructor(t,n,o,u,p,v){super(n,o,p,t),this.block=u,this.isReplace=v,this.mapMode=u?n<=0?Jt.TrackBefore:Jt.TrackAfter:Jt.TrackDel}get type(){return this.startSide<this.endSide?Ro.WidgetRange:this.startSide<=0?Ro.WidgetBefore:Ro.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&this.widget.estimatedHeight>=5}eq(t){return t instanceof ta&&kl(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,n=t){if(this.isReplace&&(t>n||t==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,n)}}ta.prototype.point=!0;function Ja(a,t=!1){let{inclusiveStart:n,inclusiveEnd:o}=a;return n==null&&(n=a.inclusive),o==null&&(o=a.inclusive),{start:n??t,end:o??t}}function kl(a,t){return a==t||!!(a&&t&&a.compare(t))}function ou(a,t,n,o=0){let u=n.length-1;u>=0&&n[u]+o>=a?n[u]=Math.max(n[u],t):n.push(a,t)}class gs extends Go{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,n,o,u,p,v){if(o){if(!(o instanceof gs))return!1;this.dom||o.transferDOM(this)}return u&&this.setDeco(o?o.attrs:null),lr(this,t,n,o?o.children:[],p,v),!0}split(t){let n=new gs;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:o,off:u}=this.childPos(t);u&&(n.append(this.children[o].split(u),0),this.children[o].merge(u,this.children[o].length,null,!1,0,0),o++);for(let p=o;p<this.children.length;p++)n.append(this.children[p],0);for(;o>0&&this.children[o-1].length==0;)this.children[--o].destroy();return this.children.length=o,this.markDirty(),this.length=t,n}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){wa(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,n){Na(this,t,n)}addLineDeco(t){let n=t.spec.attributes,o=t.spec.class;n&&(this.attrs=Fl(n,this.attrs||{})),o&&(this.attrs=Fl({class:o},this.attrs||{}))}domAtPos(t){return Ea(this,t)}reuseDOM(t){t.nodeName=="DIV"&&(this.setDOM(t),this.dirty|=6)}sync(t){var n;this.dom?this.dirty&4&&(fa(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Bl(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t);let o=this.dom.lastChild;for(;o&&Go.get(o)instanceof bo;)o=o.lastChild;if(!o||!this.length||o.nodeName!="BR"&&((n=Go.get(o))===null||n===void 0?void 0:n.isEditable)==!1&&(!xr.ios||!this.children.some(u=>u instanceof Do))){let u=document.createElement("BR");u.cmIgnore=!0,this.dom.appendChild(u)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let t=0;for(let n of this.children){if(!(n instanceof Do)||/[^ -~]/.test(n.text))return null;let o=co(n.dom);if(o.length!=1)return null;t+=o[0].width}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length}:null}coordsAt(t,n){return Ta(this,t,n)}become(t){return!1}get type(){return Ro.Text}static find(t,n){for(let o=0,u=0;o<t.children.length;o++){let p=t.children[o],v=u+p.length;if(v>=n){if(p instanceof gs)return p;if(v>n)break}u=v+p.breakAfter}return null}}class Is extends Go{constructor(t,n,o){super(),this.widget=t,this.length=n,this.type=o,this.breakAfter=0,this.prevWidget=null}merge(t,n,o,u,p,v){return o&&(!(o instanceof Is)||!this.widget.compare(o.widget)||t>0&&p<=0||n<this.length&&v<=0)?!1:(this.length=t+(o?o.length:0)+(this.length-n),!0)}domAtPos(t){return t==0?us.before(this.dom):us.after(this.dom,t==this.length)}split(t){let n=this.length-t;this.length=t;let o=new Is(this.widget,n,this.type);return o.breakAfter=this.breakAfter,o}get children(){return bl}sync(){(!this.dom||!this.widget.updateDOM(this.dom))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Cn.empty}domBoundsAround(){return null}become(t){return t instanceof Is&&t.type==this.type&&t.widget.constructor==this.widget.constructor?(t.widget.eq(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,this.breakAfter=t.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class cl{constructor(t,n,o,u){this.doc=t,this.pos=n,this.end=o,this.disallowBlockEffectsFor=u,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!t.breakAfter&&!(t instanceof Is&&t.type==Ro.WidgetBefore)}getLine(){return this.curLine||(this.content.push(this.curLine=new gs),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(_s(new Gs(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}buildText(t,n,o){for(;t>0;){if(this.textOff==this.text.length){let{value:p,lineBreak:v,done:S}=this.cursor.next(this.skip);if(this.skip=0,S)throw new Error("Ran out of text content when drawing inline views");if(v){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}else this.text=p,this.textOff=0}let u=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(n.slice(n.length-o)),this.getLine().append(_s(new Do(this.text.slice(this.textOff,this.textOff+u)),n),o),this.atCursorPos=!0,this.textOff+=u,t-=u,o=0}}span(t,n,o,u){this.buildText(n-t,o,u),this.pos=n,this.openStart<0&&(this.openStart=u)}point(t,n,o,u,p,v){if(this.disallowBlockEffectsFor[v]&&o instanceof ta){if(o.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let S=n-t;if(o instanceof ta)if(o.block){let{type:A}=o;A==Ro.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Is(o.widget||new Fa("div"),S,A))}else{let A=Yo.create(o.widget||new Fa("span"),S,S?0:o.startSide),H=this.atCursorPos&&!A.isEditable&&p<=u.length&&(t<n||o.startSide>0),X=!A.isEditable&&(t<n||p>u.length||o.startSide<=0),Me=this.getLine();this.pendingBuffer==2&&!H&&(this.pendingBuffer=0),this.flushBuffer(u),H&&(Me.append(_s(new Gs(1),u),p),p=u.length+Math.max(0,p-u.length)),Me.append(_s(A,u),p),this.atCursorPos=X,this.pendingBuffer=X?t<n||p>u.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=u.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(o);S&&(this.textOff+S<=this.text.length?this.textOff+=S:(this.skip+=S-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=p)}static build(t,n,o,u,p){let v=new cl(t,n,o,p);return v.openEnd=hi.spans(u,n,o,v),v.openStart<0&&(v.openStart=v.openEnd),v.finish(v.openEnd),v}}function _s(a,t){for(let n of t)a=new bo(n,[a],a.length);return a}class Fa extends ba{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}}const Ss=ft.define(),fl=ft.define(),Gl=ft.define(),Xu=ft.define(),qu=ft.define(),Xa=ft.define(),xl=ft.define({combine:a=>a.some(t=>t)}),Yl=ft.define({combine:a=>a.some(t=>t)});class Da{constructor(t,n="nearest",o="nearest",u=5,p=5){this.range=t,this.y=n,this.x=o,this.yMargin=u,this.xMargin=p}map(t){return t.empty?this:new Da(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin)}}const Cl=Et.define({map:(a,t)=>a.map(t)});function Ls(a,t,n){let o=a.facet(Xu);o.length?o[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const Ba=ft.define({combine:a=>a.length?a[0]:!0});let ds=0;const Bo=ft.define();class Wo{constructor(t,n,o,u){this.id=t,this.create=n,this.domEventHandlers=o,this.extension=u(this)}static define(t,n){const{eventHandlers:o,provide:u,decorations:p}=n||{};return new Wo(ds++,t,o,v=>{let S=[Bo.of(v)];return p&&S.push(qa.of(A=>{let H=A.plugin(v);return H?p(H):Lr.none})),u&&S.push(u(v)),S})}static fromClass(t,n){return Wo.define(o=>new t(o),n)}}class $s{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}update(t){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(o){if(Ls(n.state,o,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(n){Ls(t.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(o){Ls(t.state,o,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const da=ft.define(),Ml=ft.define(),qa=ft.define(),na=ft.define(),su=ft.define(),Sl=ft.define();class Ps{constructor(t,n,o,u){this.fromA=t,this.toA=n,this.fromB=o,this.toB=u}join(t){return new Ps(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let n=t.length,o=this;for(;n>0;n--){let u=t[n-1];if(!(u.fromA>o.toA)){if(u.toA<o.fromA)break;o=o.join(u),t.splice(n-1,1)}}return t.splice(n,0,o),t}static extendWithRanges(t,n){if(n.length==0)return t;let o=[];for(let u=0,p=0,v=0,S=0;;u++){let A=u==t.length?null:t[u],H=v-S,X=A?A.fromB:1e9;for(;p<n.length&&n[p]<X;){let Me=n[p],gt=n[p+1],It=Math.max(S,Me),un=Math.min(X,gt);if(It<=un&&new Ps(It+H,un+H,It,un).addToSet(o),gt>X)break;p+=2}if(!A)return o;new Ps(A.fromA,A.toA,A.fromB,A.toB).addToSet(o),v=A.toA,S=A.toB}}}class au{constructor(t,n,o){this.view=t,this.state=n,this.transactions=o,this.flags=0,this.startState=t.state,this.changes=Jn.empty(this.startState.doc.length);for(let v of o)this.changes=this.changes.compose(v.changes);let u=[];this.changes.iterChangedRanges((v,S,A,H)=>u.push(new Ps(v,S,A,H))),this.changedRanges=u;let p=t.hasFocus;p!=t.inputState.notifiedFocused&&(t.inputState.notifiedFocused=p,this.flags|=1)}static create(t,n,o){return new au(t,n,o)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var ts=function(a){return a[a.LTR=0]="LTR",a[a.RTL=1]="RTL",a}(ts||(ts={}));const el=ts.LTR,Ql=ts.RTL;function lu(a){let t=[];for(let n=0;n<a.length;n++)t.push(1<<+a[n]);return t}const wc=lu("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),of=lu("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),dl=Object.create(null),Os=[];for(let a of["()","[]","{}"]){let t=a.charCodeAt(0),n=a.charCodeAt(1);dl[t]=n,dl[n]=-t}function uu(a){return a<=247?wc[a]:1424<=a&&a<=1524?2:1536<=a&&a<=1785?of[a-1536]:1774<=a&&a<=2220?4:8192<=a&&a<=8203?256:64336<=a&&a<=65023?4:a==8204?256:1}const ec=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Ol{constructor(t,n,o){this.from=t,this.to=n,this.level=o}get dir(){return this.level%2?Ql:el}side(t,n){return this.dir==n==t?this.to:this.from}static find(t,n,o,u){let p=-1;for(let v=0;v<t.length;v++){let S=t[v];if(S.from<=n&&S.to>=n){if(S.level==o)return v;(p<0||(u!=0?u<0?S.from<n:S.to>n:t[p].level>S.level))&&(p=v)}}if(p<0)throw new RangeError("Index out of range");return p}}const _o=[];function ka(a,t){let n=a.length,o=t==el?1:2,u=t==el?2:1;if(!a||o==1&&!ec.test(a))return Tl(n);for(let v=0,S=o,A=o;v<n;v++){let H=uu(a.charCodeAt(v));H==512?H=S:H==8&&A==4&&(H=16),_o[v]=H==4?2:H,H&7&&(A=H),S=H}for(let v=0,S=o,A=o;v<n;v++){let H=_o[v];if(H==128)v<n-1&&S==_o[v+1]&&S&24?H=_o[v]=S:_o[v]=256;else if(H==64){let X=v+1;for(;X<n&&_o[X]==64;)X++;let Me=v&&S==8||X<n&&_o[X]==8?A==1?1:8:256;for(let gt=v;gt<X;gt++)_o[gt]=Me;v=X-1}else H==8&&A==1&&(_o[v]=1);S=H,H&7&&(A=H)}for(let v=0,S=0,A=0,H,X,Me;v<n;v++)if(X=dl[H=a.charCodeAt(v)])if(X<0){for(let gt=S-3;gt>=0;gt-=3)if(Os[gt+1]==-X){let It=Os[gt+2],un=It&2?o:It&4?It&1?u:o:0;un&&(_o[v]=_o[Os[gt]]=un),S=gt;break}}else{if(Os.length==189)break;Os[S++]=v,Os[S++]=H,Os[S++]=A}else if((Me=_o[v])==2||Me==1){let gt=Me==o;A=gt?0:1;for(let It=S-3;It>=0;It-=3){let un=Os[It+2];if(un&2)break;if(gt)Os[It+2]|=2;else{if(un&4)break;Os[It+2]|=4}}}for(let v=0;v<n;v++)if(_o[v]==256){let S=v+1;for(;S<n&&_o[S]==256;)S++;let A=(v?_o[v-1]:o)==1,H=(S<n?_o[S]:o)==1,X=A==H?A?1:2:o;for(let Me=v;Me<S;Me++)_o[Me]=X;v=S-1}let p=[];if(o==1)for(let v=0;v<n;){let S=v,A=_o[v++]!=1;for(;v<n&&A==(_o[v]!=1);)v++;if(A)for(let H=v;H>S;){let X=H,Me=_o[--H]!=2;for(;H>S&&Me==(_o[H-1]!=2);)H--;p.push(new Ol(H,X,Me?2:1))}else p.push(new Ol(S,v,0))}else for(let v=0;v<n;){let S=v,A=_o[v++]==2;for(;v<n&&A==(_o[v]==2);)v++;p.push(new Ol(S,v,A?1:2))}return p}function Tl(a){return[new Ol(0,a,0)]}let tl="";function nl(a,t,n,o,u){var p;let v=o.head-a.from,S=-1;if(v==0){if(!u||!a.length)return null;t[0].level!=n&&(v=t[0].side(!1,n),S=0)}else if(v==a.length){if(u)return null;let gt=t[t.length-1];gt.level!=n&&(v=gt.side(!0,n),S=t.length-1)}S<0&&(S=Ol.find(t,v,(p=o.bidiLevel)!==null&&p!==void 0?p:-1,o.assoc));let A=t[S];v==A.side(u,n)&&(A=t[S+=u?1:-1],v=A.side(!u,n));let H=u==(A.dir==n),X=ne(a.text,v,H);if(tl=a.text.slice(Math.min(v,X),Math.max(v,X)),X!=A.side(u,n))return ue.cursor(X+a.from,H?-1:1,A.level);let Me=S==(u?t.length-1:0)?null:t[S+(u?1:-1)];return!Me&&A.level!=n?ue.cursor(u?a.to:a.from,u?-1:1,n):Me&&Me.level<A.level?ue.cursor(Me.side(!u,n)+a.from,u?1:-1,Me.level):ue.cursor(X+a.from,u?-1:1,A.level)}const Pa="\uFFFF";class Dc{constructor(t,n){this.points=t,this.text="",this.lineSeparator=n.facet(ui.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=Pa}readRange(t,n){if(!t)return this;let o=t.parentNode;for(let u=t;;){this.findPointBefore(o,u),this.readNode(u);let p=u.nextSibling;if(p==n)break;let v=Go.get(u),S=Go.get(p);(v&&S?v.breakAfter:(v?v.breakAfter:Tu(u))||Tu(p)&&(u.nodeName!="BR"||u.cmIgnore))&&this.lineBreak(),u=p}return this.findPointBefore(o,n),this}readTextNode(t){let n=t.nodeValue;for(let o of this.points)o.node==t&&(o.pos=this.text.length+Math.min(o.offset,n.length));for(let o=0,u=this.lineSeparator?null:/\r\n?|\n/g;;){let p=-1,v=1,S;if(this.lineSeparator?(p=n.indexOf(this.lineSeparator,o),v=this.lineSeparator.length):(S=u.exec(n))&&(p=S.index,v=S[0].length),this.append(n.slice(o,p<0?n.length:p)),p<0)break;if(this.lineBreak(),v>1)for(let A of this.points)A.node==t&&A.pos>this.text.length&&(A.pos-=v-1);o=p+v}}readNode(t){if(t.cmIgnore)return;let n=Go.get(t),o=n&&n.overrideDOMText;if(o!=null){this.findPointInside(t,o.length);for(let u=o.iter();!u.next().done;)u.lineBreak?this.lineBreak():this.append(u.value)}else t.nodeType==3?this.readTextNode(t):t.nodeName=="BR"?t.nextSibling&&this.lineBreak():t.nodeType==1&&this.readRange(t.firstChild,null)}findPointBefore(t,n){for(let o of this.points)o.node==t&&t.childNodes[o.offset]==n&&(o.pos=this.text.length)}findPointInside(t,n){for(let o of this.points)(t.nodeType==3?o.node==t:t.contains(o.node))&&(o.pos=this.text.length+Math.min(n,o.offset))}}function Tu(a){return a.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(a.nodeName)}class Pc{constructor(t,n){this.node=t,this.offset=n,this.pos=-1}}class ha extends Go{constructor(t){super(),this.view=t,this.compositionDeco=Lr.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new gs],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ps(0,0,0,t.state.doc.length)],0)}get editorView(){return this.view}get length(){return this.view.state.doc.length}update(t){let n=t.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:v,toA:S})=>S<this.minWidthFrom||v>this.minWidthTo)?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=Lr.none:(t.transactions.length||this.dirty)&&(this.compositionDeco=sf(this.view,t.changes)),(xr.ie||xr.chrome)&&!this.compositionDeco.size&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,u=this.updateDeco(),p=_c(o,u,t.changes);return n=Ps.extendWithRanges(n,p),this.dirty==0&&n.length==0?!1:(this.updateInner(n,t.startState.doc.length),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,n);let{observer:o}=this.view;o.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let p=xr.chrome||xr.ios?{node:o.selectionRange.focusNode,written:!1}:void 0;this.sync(p),this.dirty=0,p&&(p.written||o.selectionRange.focusNode!=p.node)&&(this.forceSelection=!0),this.dom.style.height=""});let u=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let p of this.children)p instanceof Is&&p.widget instanceof hs&&u.push(p.dom);o.updateGaps(u)}updateChildren(t,n){let o=this.childCursor(n);for(let u=t.length-1;;u--){let p=u>=0?t[u]:null;if(!p)break;let{fromA:v,toA:S,fromB:A,toB:H}=p,{content:X,breakAtStart:Me,openStart:gt,openEnd:It}=cl.build(this.view.state.doc,A,H,this.decorations,this.dynamicDecorationMap),{i:un,off:or}=o.findPos(S,1),{i:ar,off:wr}=o.findPos(v,-1);$n(this,ar,wr,un,or,X,Me,gt,It)}}updateSelection(t=!1,n=!1){if((t||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange(),!(n||this.mayControlSelection()))return;let o=this.forceSelection;this.forceSelection=!1;let u=this.view.state.selection.main,p=this.domAtPos(u.anchor),v=u.empty?p:this.domAtPos(u.head);if(xr.gecko&&u.empty&&xa(p)){let A=document.createTextNode("");this.view.observer.ignore(()=>p.node.insertBefore(A,p.node.childNodes[p.offset]||null)),p=v=new us(A,0),o=!0}let S=this.view.observer.selectionRange;(o||!S.focusNode||!Zs(p.node,p.offset,S.anchorNode,S.anchorOffset)||!Zs(v.node,v.offset,S.focusNode,S.focusOffset))&&(this.view.observer.ignore(()=>{xr.android&&xr.chrome&&this.dom.contains(S.focusNode)&&Qf(S.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let A=Es(this.view.root);if(A)if(u.empty){if(xr.gecko){let H=wu(p.node,p.offset);if(H&&H!=3){let X=Rc(p.node,p.offset,H==1?1:-1);X&&(p=new us(X,H==1?0:X.nodeValue.length))}}A.collapse(p.node,p.offset),u.bidiLevel!=null&&S.cursorBidiLevel!=null&&(S.cursorBidiLevel=u.bidiLevel)}else if(A.extend){A.collapse(p.node,p.offset);try{A.extend(v.node,v.offset)}catch{}}else{let H=document.createRange();u.anchor>u.head&&([p,v]=[v,p]),H.setEnd(v.node,v.offset),H.setStart(p.node,p.offset),A.removeAllRanges(),A.addRange(H)}}),this.view.observer.setSelectionRange(p,v)),this.impreciseAnchor=p.precise?null:new us(S.anchorNode,S.anchorOffset),this.impreciseHead=v.precise?null:new us(S.focusNode,S.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:t}=this,n=t.state.selection.main,o=Es(t.root),{anchorNode:u,anchorOffset:p}=t.observer.selectionRange;if(!o||!n.empty||!n.assoc||!o.modify)return;let v=gs.find(this,n.head);if(!v)return;let S=v.posAtStart;if(n.head==S||n.head==S+v.length)return;let A=this.coordsAt(n.head,-1),H=this.coordsAt(n.head,1);if(!A||!H||A.bottom>H.top)return;let X=this.domAtPos(n.head+n.assoc);o.collapse(X.node,X.offset),o.modify("move",n.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let Me=t.observer.selectionRange;t.docView.posFromDOM(Me.anchorNode,Me.anchorOffset)!=n.from&&o.collapse(u,p)}mayControlSelection(){let t=this.view.root.activeElement;return t==this.dom||ua(this.dom,this.view.observer.selectionRange)&&!(t&&this.dom.contains(t))}nearest(t){for(let n=t;n;){let o=Go.get(n);if(o&&o.rootView==this)return o;n=n.parentNode}return null}posFromDOM(t,n){let o=this.nearest(t);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(t,n)+o.posAtStart}domAtPos(t){let{i:n,off:o}=this.childCursor().findPos(t,-1);for(;n<this.children.length-1;){let u=this.children[n];if(o<u.length||u instanceof gs)break;n++,o=0}return this.children[n].domAtPos(o)}coordsAt(t,n){for(let o=this.length,u=this.children.length-1;;u--){let p=this.children[u],v=o-p.breakAfter-p.length;if(t>v||t==v&&p.type!=Ro.WidgetBefore&&p.type!=Ro.WidgetAfter&&(!u||n==2||this.children[u-1].breakAfter||this.children[u-1].type==Ro.WidgetBefore&&n>-2))return p.coordsAt(t-v,n);o=v}}measureVisibleLineHeights(t){let n=[],{from:o,to:u}=t,p=this.view.contentDOM.clientWidth,v=p>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,S=-1,A=this.view.textDirection==ts.LTR;for(let H=0,X=0;X<this.children.length;X++){let Me=this.children[X],gt=H+Me.length;if(gt>u)break;if(H>=o){let It=Me.dom.getBoundingClientRect();if(n.push(It.height),v){let un=Me.dom.lastChild,or=un?co(un):[];if(or.length){let ar=or[or.length-1],wr=A?ar.right-It.left:It.right-ar.left;wr>S&&(S=wr,this.minWidth=p,this.minWidthFrom=H,this.minWidthTo=gt)}}}H=gt+Me.breakAfter}return n}textDirectionAt(t){let{i:n}=this.childPos(t,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?ts.RTL:ts.LTR}measureTextSize(){for(let u of this.children)if(u instanceof gs){let p=u.measureTextSize();if(p)return p}let t=document.createElement("div"),n,o;return t.className="cm-line",t.style.width="99999px",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(t);let u=co(t.firstChild)[0];n=t.getBoundingClientRect().height,o=u?u.width/27:7,t.remove()}),{lineHeight:n,charWidth:o}}childCursor(t=this.length){let n=this.children.length;return n&&(t-=this.children[--n].length),new Tn(this.children,t,n)}computeBlockGapDeco(){let t=[],n=this.view.viewState;for(let o=0,u=0;;u++){let p=u==n.viewports.length?null:n.viewports[u],v=p?p.from-1:this.length;if(v>o){let S=n.lineBlockAt(v).bottom-n.lineBlockAt(o).top;t.push(Lr.replace({widget:new hs(S),block:!0,inclusive:!0,isBlockGap:!0}).range(o,v))}if(!p)break;o=p.to+1}return Lr.set(t)}updateDeco(){let t=this.view.state.facet(qa).map((n,o)=>(this.dynamicDecorationMap[o]=typeof n=="function")?n(this.view):n);for(let n=t.length;n<t.length+3;n++)this.dynamicDecorationMap[n]=!1;return this.decorations=[...t,this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(t){let{range:n}=t,o=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),u;if(!o)return;!n.empty&&(u=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(o={left:Math.min(o.left,u.left),top:Math.min(o.top,u.top),right:Math.max(o.right,u.right),bottom:Math.max(o.bottom,u.bottom)});let p=0,v=0,S=0,A=0;for(let X of this.view.state.facet(su).map(Me=>Me(this.view)))if(X){let{left:Me,right:gt,top:It,bottom:un}=X;Me!=null&&(p=Math.max(p,Me)),gt!=null&&(v=Math.max(v,gt)),It!=null&&(S=Math.max(S,It)),un!=null&&(A=Math.max(A,un))}let H={left:o.left-p,top:o.top-S,right:o.right+v,bottom:o.bottom+A};ca(this.view.scrollDOM,H,n.head<n.anchor?-1:1,t.x,t.y,t.xMargin,t.yMargin,this.view.textDirection==ts.LTR)}}function xa(a){return a.node.nodeType==1&&a.node.firstChild&&(a.offset==0||a.node.childNodes[a.offset-1].contentEditable=="false")&&(a.offset==a.node.childNodes.length||a.node.childNodes[a.offset].contentEditable=="false")}class hs extends ba{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}}function hl(a){let t=a.observer.selectionRange,n=t.focusNode&&Rc(t.focusNode,t.focusOffset,0);if(!n)return null;let o=a.docView.nearest(n);if(!o)return null;if(o instanceof gs){let u=n;for(;u.parentNode!=o.dom;)u=u.parentNode;let p=u.previousSibling;for(;p&&!Go.get(p);)p=p.previousSibling;let v=p?Go.get(p).posAtEnd:o.posAtStart;return{from:v,to:v,node:u,text:n}}else{for(;;){let{parent:p}=o;if(!p)return null;if(p instanceof gs)break;o=p}let u=o.posAtStart;return{from:u,to:u+o.length,node:o.dom,text:n}}}function sf(a,t){let n=hl(a);if(!n)return Lr.none;let{from:o,to:u,node:p,text:v}=n,S=t.mapPos(o,1),A=Math.max(S,t.mapPos(u,-1)),{state:H}=a,X=p.nodeType==3?p.nodeValue:new Dc([],H).readRange(p.firstChild,null).text;if(A-S<X.length)if(H.doc.sliceString(S,Math.min(H.doc.length,S+X.length),Pa)==X)A=S+X.length;else if(H.doc.sliceString(Math.max(0,A-X.length),A,Pa)==X)S=A-X.length;else return Lr.none;else if(H.doc.sliceString(S,A,Pa)!=X)return Lr.none;let Me=Go.get(p);return Me instanceof as?Me=Me.widget.topView:Me&&(Me.parent=null),Lr.set(Lr.replace({widget:new Ac(p,v,Me),inclusive:!0}).range(S,A))}class Ac extends ba{constructor(t,n,o){super(),this.top=t,this.text=n,this.topView=o}eq(t){return this.top==t.top&&this.text==t.text}toDOM(){return this.top}ignoreEvent(){return!1}get customView(){return as}}function Rc(a,t,n){for(;;){if(a.nodeType==3)return a;if(a.nodeType==1&&t>0&&n<=0)a=a.childNodes[t-1],t=Oa(a);else if(a.nodeType==1&&t<a.childNodes.length&&n>=0)a=a.childNodes[t],t=0;else return null}}function wu(a,t){return a.nodeType!=1?0:(t&&a.childNodes[t-1].contentEditable=="false"?1:0)|(t<a.childNodes.length&&a.childNodes[t].contentEditable=="false"?2:0)}class Ic{constructor(){this.changes=[]}compareRange(t,n){ou(t,n,this.changes)}comparePoint(t,n){ou(t,n,this.changes)}}function _c(a,t,n){let o=new Ic;return hi.compare(a,t,n,o),o.changes}function Qf(a,t){for(let n=a;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function cu(a,t,n=1){let o=a.charCategorizer(t),u=a.doc.lineAt(t),p=t-u.from;if(u.length==0)return ue.cursor(t);p==0?n=1:p==u.length&&(n=-1);let v=p,S=p;n<0?v=ne(u.text,p,!1):S=ne(u.text,p);let A=o(u.text.slice(v,S));for(;v>0;){let H=ne(u.text,v,!1);if(o(u.text.slice(H,v))!=A)break;v=H}for(;S<u.length;){let H=ne(u.text,S);if(o(u.text.slice(S,H))!=A)break;S=H}return ue.range(v+u.from,S+u.from)}function af(a,t){return t.left>a?t.left-a:Math.max(0,a-t.right)}function Jf(a,t){return t.top>a?t.top-a:Math.max(0,a-t.bottom)}function ja(a,t){return a.top<t.bottom-1&&a.bottom>t.top+1}function Du(a,t){return t<a.top?{top:t,left:a.left,right:a.right,bottom:a.bottom}:a}function Pu(a,t){return t>a.bottom?{top:a.top,left:a.left,right:a.right,bottom:t}:a}function jl(a,t,n){let o,u,p,v,S=!1,A,H,X,Me;for(let un=a.firstChild;un;un=un.nextSibling){let or=co(un);for(let ar=0;ar<or.length;ar++){let wr=or[ar];u&&ja(u,wr)&&(wr=Du(Pu(wr,u.bottom),u.top));let Si=af(t,wr),ki=Jf(n,wr);if(Si==0&&ki==0)return un.nodeType==3?pa(un,t,n):jl(un,t,n);if(!o||v>ki||v==ki&&p>Si){o=un,u=wr,p=Si,v=ki;let mi=ki?n<wr.top?-1:1:Si?t<wr.left?-1:1:0;S=!mi||(mi>0?ar<or.length-1:ar>0)}Si==0?n>wr.bottom&&(!X||X.bottom<wr.bottom)?(A=un,X=wr):n<wr.top&&(!Me||Me.top>wr.top)&&(H=un,Me=wr):X&&ja(X,wr)?X=Pu(X,wr.bottom):Me&&ja(Me,wr)&&(Me=Du(Me,wr.top))}}if(X&&X.bottom>=n?(o=A,u=X):Me&&Me.top<=n&&(o=H,u=Me),!o)return{node:a,offset:0};let gt=Math.max(u.left,Math.min(u.right,t));if(o.nodeType==3)return pa(o,gt,n);if(S&&o.contentEditable!="false")return jl(o,gt,n);let It=Array.prototype.indexOf.call(a.childNodes,o)+(t>=(u.left+u.right)/2?1:0);return{node:a,offset:It}}function pa(a,t,n){let o=a.nodeValue.length,u=-1,p=1e9,v=0;for(let S=0;S<o;S++){let A=go(a,S,S+1).getClientRects();for(let H=0;H<A.length;H++){let X=A[H];if(X.top==X.bottom)continue;v||(v=t-X.left);let Me=(X.top>n?X.top-n:n-X.bottom)-1;if(X.left-1<=t&&X.right+1>=t&&Me<p){let gt=t>=(X.left+X.right)/2,It=gt;if((xr.chrome||xr.gecko)&&go(a,S).getBoundingClientRect().left==X.right&&(It=!gt),Me<=0)return{node:a,offset:S+(It?1:0)};u=S+(It?1:0),p=Me}}}return{node:a,offset:u>-1?u:v>0?a.nodeValue.length:0}}function Au(a,{x:t,y:n},o,u=-1){var p;let v=a.contentDOM.getBoundingClientRect(),S=v.top+a.viewState.paddingTop,A,{docHeight:H}=a.viewState,X=n-S;if(X<0)return 0;if(X>H)return a.state.doc.length;for(let wr=a.defaultLineHeight/2,Si=!1;A=a.elementAtHeight(X),A.type!=Ro.Text;)for(;X=u>0?A.bottom+wr:A.top-wr,!(X>=0&&X<=H);){if(Si)return o?null:0;Si=!0,u=-u}n=S+X;let Me=A.from;if(Me<a.viewport.from)return a.viewport.from==0?0:o?null:Ru(a,v,A,t,n);if(Me>a.viewport.to)return a.viewport.to==a.state.doc.length?a.state.doc.length:o?null:Ru(a,v,A,t,n);let gt=a.dom.ownerDocument,It=a.root.elementFromPoint?a.root:gt,un=It.elementFromPoint(t,n);un&&!a.contentDOM.contains(un)&&(un=null),un||(t=Math.max(v.left+1,Math.min(v.right-1,t)),un=It.elementFromPoint(t,n),un&&!a.contentDOM.contains(un)&&(un=null));let or,ar=-1;if(un&&((p=a.docView.nearest(un))===null||p===void 0?void 0:p.isEditable)!=!1){if(gt.caretPositionFromPoint){let wr=gt.caretPositionFromPoint(t,n);wr&&({offsetNode:or,offset:ar}=wr)}else if(gt.caretRangeFromPoint){let wr=gt.caretRangeFromPoint(t,n);wr&&({startContainer:or,startOffset:ar}=wr,(!a.contentDOM.contains(or)||xr.safari&&tc(or,ar,t)||xr.chrome&&fu(or,ar,t))&&(or=void 0))}}if(!or||!a.docView.dom.contains(or)){let wr=gs.find(a.docView,Me);if(!wr)return X>A.top+A.height/2?A.to:A.from;({node:or,offset:ar}=jl(wr.dom,t,n))}return a.docView.posFromDOM(or,ar)}function Ru(a,t,n,o,u){let p=Math.round((o-t.left)*a.defaultCharacterWidth);if(a.lineWrapping&&n.height>a.defaultLineHeight*1.5){let S=Math.floor((u-n.top)/a.defaultLineHeight);p+=S*a.viewState.heightOracle.lineLength}let v=a.state.sliceDoc(n.from,n.to);return n.from+Pr(v,p,a.state.tabSize)}function tc(a,t,n){let o;if(a.nodeType!=3||t!=(o=a.nodeValue.length))return!1;for(let u=a.nextSibling;u;u=u.nextSibling)if(u.nodeType!=1||u.nodeName!="BR")return!1;return go(a,o-1,o).getBoundingClientRect().left>n}function fu(a,t,n){if(t!=0)return!1;for(let u=a;;){let p=u.parentNode;if(!p||p.nodeType!=1||p.firstChild!=u)return!1;if(p.classList.contains("cm-line"))break;u=p}let o=a.nodeType==1?a.getBoundingClientRect():go(a,0,Math.max(a.nodeValue.length,1)).getBoundingClientRect();return n-o.left>5}function Ua(a,t,n,o){let u=a.state.doc.lineAt(t.head),p=!o||!a.lineWrapping?null:a.coordsAtPos(t.assoc<0&&t.head>u.from?t.head-1:t.head);if(p){let A=a.dom.getBoundingClientRect(),H=a.textDirectionAt(u.from),X=a.posAtCoords({x:n==(H==ts.LTR)?A.right-1:A.left+1,y:(p.top+p.bottom)/2});if(X!=null)return ue.cursor(X,n?-1:1)}let v=gs.find(a.docView,t.head),S=v?n?v.posAtEnd:v.posAtStart:n?u.to:u.from;return ue.cursor(S,n?-1:1)}function Jl(a,t,n,o){let u=a.state.doc.lineAt(t.head),p=a.bidiSpans(u),v=a.textDirectionAt(u.from);for(let S=t,A=null;;){let H=nl(u,p,v,S,n),X=tl;if(!H){if(u.number==(n?a.state.doc.lines:1))return S;X=`
2194
- `,u=a.state.doc.line(u.number+(n?1:-1)),p=a.bidiSpans(u),H=ue.cursor(n?u.from:u.to)}if(A){if(!A(X))return S}else{if(!o)return H;A=o(X)}S=H}}function lf(a,t,n){let o=a.state.charCategorizer(t),u=o(n);return p=>{let v=o(p);return u==qr.Space&&(u=v),u==v}}function Lc(a,t,n,o){let u=t.head,p=n?1:-1;if(u==(n?a.state.doc.length:0))return ue.cursor(u,t.assoc);let v=t.goalColumn,S,A=a.contentDOM.getBoundingClientRect(),H=a.coordsAtPos(u),X=a.documentTop;if(H)v==null&&(v=H.left-A.left),S=p<0?H.top:H.bottom;else{let It=a.viewState.lineBlockAt(u);v==null&&(v=Math.min(A.right-A.left,a.defaultCharacterWidth*(u-It.from))),S=(p<0?It.top:It.bottom)+X}let Me=A.left+v,gt=o??a.defaultLineHeight>>1;for(let It=0;;It+=10){let un=S+(gt+It)*p,or=Au(a,{x:Me,y:un},!1,p);if(un<A.top||un>A.bottom||(p<0?or<u:or>u))return ue.cursor(or,t.assoc,void 0,v)}}function rl(a,t,n){let o=a.state.facet(na).map(u=>u(a));for(;;){let u=!1;for(let p of o)p.between(n.from-1,n.from+1,(v,S,A)=>{n.from>v&&n.from<S&&(n=t.head>n.from?ue.cursor(v,1):ue.cursor(S,-1),u=!0)});if(!u)return n}}class wl{constructor(t){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;let n=(o,u)=>{this.ignoreDuringComposition(u)||u.type=="keydown"&&this.keydown(t,u)||(this.mustFlushObserver(u)&&t.observer.forceFlush(),this.runCustomHandlers(u.type,t,u)?u.preventDefault():o(t,u))};for(let o in As){let u=As[o];t.contentDOM.addEventListener(o,p=>{Bc(t,p)&&n(u,p)},Iu[o]),this.registeredEvents.push(o)}t.scrollDOM.addEventListener("mousedown",o=>{o.target==t.scrollDOM&&n(As.mousedown,o)}),xr.chrome&&xr.chrome_version==102&&t.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?t.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,t.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=t.hasFocus,xr.safari&&t.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}ensureHandlers(t,n){var o;let u;this.customHandlers=[];for(let p of n)if(u=(o=p.update(t).spec)===null||o===void 0?void 0:o.domEventHandlers){this.customHandlers.push({plugin:p.value,handlers:u});for(let v in u)this.registeredEvents.indexOf(v)<0&&v!="scroll"&&(this.registeredEvents.push(v),t.contentDOM.addEventListener(v,S=>{Bc(t,S)&&this.runCustomHandlers(v,t,S)&&S.preventDefault()}))}}runCustomHandlers(t,n,o){for(let u of this.customHandlers){let p=u.handlers[t];if(p)try{if(p.call(u.plugin,o,n)||o.defaultPrevented)return!0}catch(v){Ls(n.state,v)}}return!1}runScrollHandlers(t,n){this.lastScrollTop=t.scrollDOM.scrollTop,this.lastScrollLeft=t.scrollDOM.scrollLeft;for(let o of this.customHandlers){let u=o.handlers.scroll;if(u)try{u.call(o.plugin,n,t)}catch(p){Ls(t.state,p)}}}keydown(t,n){if(this.lastKeyCode=n.keyCode,this.lastKeyTime=Date.now(),n.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(xr.android&&xr.chrome&&!n.synthetic&&(n.keyCode==13||n.keyCode==8))return t.observer.delayAndroidKey(n.key,n.keyCode),!0;let o;return xr.ios&&!n.synthetic&&!n.altKey&&!n.metaKey&&((o=$c.find(u=>u.keyCode==n.keyCode))&&!n.ctrlKey||Nc.indexOf(n.key)>-1&&n.ctrlKey&&!n.shiftKey)?(this.pendingIOSKey=o||n,setTimeout(()=>this.flushIOSKey(t),250),!0):!1}flushIOSKey(t){let n=this.pendingIOSKey;return n?(this.pendingIOSKey=void 0,Fo(t.contentDOM,n.key,n.keyCode)):!1}ignoreDuringComposition(t){return/^key/.test(t.type)?this.composing>0?!0:xr.safari&&!xr.ios&&Date.now()-this.compositionEndedAt<100?(this.compositionEndedAt=0,!0):!1:!1}mustFlushObserver(t){return t.type=="keydown"&&t.keyCode!=229}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.mouseSelection&&this.mouseSelection.update(t),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const $c=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Nc="dthko",il=[16,17,18,20,91,92,224,225];function Aa(a){return a*.7+8}class Fc{constructor(t,n,o,u){this.view=t,this.style=o,this.mustSelect=u,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=El(t.contentDOM);let p=t.contentDOM.ownerDocument;p.addEventListener("mousemove",this.move=this.move.bind(this)),p.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=t.state.facet(ui.allowMultipleSelections)&&Xf(t,n),this.dragMove=nc(t,n),this.dragging=rc(t,n)&&Xl(n)==1?null:!1,this.dragging===!1&&(n.preventDefault(),this.select(n))}move(t){var n;if(t.buttons==0)return this.destroy();if(this.dragging!==!1)return;this.select(this.lastEvent=t);let o=0,u=0,p=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};t.clientX<=p.left?o=-Aa(p.left-t.clientX):t.clientX>=p.right&&(o=Aa(t.clientX-p.right)),t.clientY<=p.top?u=-Aa(p.top-t.clientY):t.clientY>=p.bottom&&(u=Aa(t.clientY-p.bottom)),this.setScrollSpeed(o,u)}up(t){this.dragging==null&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(t,n){this.scrollSpeed={x:t,y:n},t||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}select(t){let n=this.style.get(t,this.extend,this.multiple);(this.mustSelect||!n.eq(this.view.state.selection)||n.main.assoc!=this.view.state.selection.main.assoc)&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.docChanged&&this.dragging&&(this.dragging=this.dragging.map(t.changes)),this.style.update(t)&&setTimeout(()=>this.select(this.lastEvent),20)}}function Xf(a,t){let n=a.state.facet(Ss);return n.length?n[0](t):xr.mac?t.metaKey:t.ctrlKey}function nc(a,t){let n=a.state.facet(fl);return n.length?n[0](t):xr.mac?!t.altKey:!t.ctrlKey}function rc(a,t){let{main:n}=a.state.selection;if(n.empty)return!1;let o=Es(a.root);if(!o||o.rangeCount==0)return!0;let u=o.getRangeAt(0).getClientRects();for(let p=0;p<u.length;p++){let v=u[p];if(v.left<=t.clientX&&v.right>=t.clientX&&v.top<=t.clientY&&v.bottom>=t.clientY)return!0}return!1}function Bc(a,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,o;n!=a.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(o=Go.get(n))&&o.ignoreEvent(t))return!1;return!0}const As=Object.create(null),Iu=Object.create(null),uf=xr.ie&&xr.ie_version<15||xr.ios&&xr.webkit_version<604;function _f(a){let t=a.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{a.focus(),n.remove(),cf(a,n.value)},50)}function cf(a,t){let{state:n}=a,o,u=1,p=n.toText(t),v=p.lines==n.selection.ranges.length;if(ql!=null&&n.selection.ranges.every(A=>A.empty)&&ql==p.toString()){let A=-1;o=n.changeByRange(H=>{let X=n.doc.lineAt(H.from);if(X.from==A)return{range:H};A=X.from;let Me=n.toText((v?p.line(u++).text:t)+n.lineBreak);return{changes:{from:X.from,insert:Me},range:ue.cursor(H.from+Me.length)}})}else v?o=n.changeByRange(A=>{let H=p.line(u++);return{changes:{from:A.from,to:A.to,insert:H.text},range:ue.cursor(A.from+H.length)}}):o=n.replaceSelection(p);a.dispatch(o,{userEvent:"input.paste",scrollIntoView:!0})}As.keydown=(a,t)=>{a.inputState.setSelectionOrigin("select"),t.keyCode==27?a.inputState.lastEscPress=Date.now():il.indexOf(t.keyCode)<0&&(a.inputState.lastEscPress=0)},As.touchstart=(a,t)=>{a.inputState.lastTouchTime=Date.now(),a.inputState.setSelectionOrigin("select.pointer")},As.touchmove=a=>{a.inputState.setSelectionOrigin("select.pointer")},Iu.touchstart=Iu.touchmove={passive:!0},As.mousedown=(a,t)=>{if(a.observer.flush(),a.inputState.lastTouchTime>Date.now()-2e3)return;let n=null;for(let o of a.state.facet(Gl))if(n=o(a,t),n)break;if(!n&&t.button==0&&(n=Vo(a,t)),n){let o=a.root.activeElement!=a.contentDOM;o&&a.observer.ignore(()=>Xo(a.contentDOM)),a.inputState.startMouseSelection(new Fc(a,t,n,o))}};function ff(a,t,n,o){if(o==1)return ue.cursor(t,n);if(o==2)return cu(a.state,t,n);{let u=gs.find(a.docView,t),p=a.state.doc.lineAt(u?u.posAtEnd:t),v=u?u.posAtStart:p.from,S=u?u.posAtEnd:p.to;return S<a.state.doc.length&&S==p.to&&S++,ue.range(v,S)}}let du=(a,t)=>a>=t.top&&a<=t.bottom,hu=(a,t,n)=>du(t,n)&&a>=n.left&&a<=n.right;function kc(a,t,n,o){let u=gs.find(a.docView,t);if(!u)return 1;let p=t-u.posAtStart;if(p==0)return 1;if(p==u.length)return-1;let v=u.coordsAt(p,-1);if(v&&hu(n,o,v))return-1;let S=u.coordsAt(p,1);return S&&hu(n,o,S)?1:v&&du(o,v)?-1:1}function df(a,t){let n=a.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:kc(a,n,t.clientX,t.clientY)}}const ic=xr.ie&&xr.ie_version<=11;let hf=null,pu=0,pl=0;function Xl(a){if(!ic)return a.detail;let t=hf,n=pl;return hf=a,pl=Date.now(),pu=!t||n>Date.now()-400&&Math.abs(t.clientX-a.clientX)<2&&Math.abs(t.clientY-a.clientY)<2?(pu+1)%3:1}function Vo(a,t){let n=df(a,t),o=Xl(t),u=a.state.selection;return{update(p){p.docChanged&&(n.pos=p.changes.mapPos(n.pos),u=u.map(p.changes))},get(p,v,S){let A=df(a,p),H=ff(a,A.pos,A.bias,o);if(n.pos!=A.pos&&!v){let X=ff(a,n.pos,n.bias,o),Me=Math.min(X.from,H.from),gt=Math.max(X.to,H.to);H=Me<H.from?ue.range(Me,gt):ue.range(gt,Me)}return v?u.replaceRange(u.main.extend(H.from,H.to)):S&&u.ranges.length>1&&u.ranges.some(X=>X.eq(H))?Dl(u,H):S?u.addRange(H):ue.create([H])}}}function Dl(a,t){for(let n=0;;n++)if(a.ranges[n].eq(t))return ue.create(a.ranges.slice(0,n).concat(a.ranges.slice(n+1)),a.mainIndex==n?0:a.mainIndex-(a.mainIndex>n?1:0))}As.dragstart=(a,t)=>{let{selection:{main:n}}=a.state,{mouseSelection:o}=a.inputState;o&&(o.dragging=n),t.dataTransfer&&(t.dataTransfer.setData("Text",a.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove")};function oc(a,t,n,o){if(!n)return;let u=a.posAtCoords({x:t.clientX,y:t.clientY},!1);t.preventDefault();let{mouseSelection:p}=a.inputState,v=o&&p&&p.dragging&&p.dragMove?{from:p.dragging.from,to:p.dragging.to}:null,S={from:u,insert:n},A=a.state.changes(v?[v,S]:S);a.focus(),a.dispatch({changes:A,selection:{anchor:A.mapPos(u,-1),head:A.mapPos(u,1)},userEvent:v?"move.drop":"input.drop"})}As.drop=(a,t)=>{if(!t.dataTransfer)return;if(a.state.readOnly)return t.preventDefault();let n=t.dataTransfer.files;if(n&&n.length){t.preventDefault();let o=Array(n.length),u=0,p=()=>{++u==n.length&&oc(a,t,o.filter(v=>v!=null).join(a.state.lineBreak),!1)};for(let v=0;v<n.length;v++){let S=new FileReader;S.onerror=p,S.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(S.result)||(o[v]=S.result),p()},S.readAsText(n[v])}}else oc(a,t,t.dataTransfer.getData("Text"),!0)},As.paste=(a,t)=>{if(a.state.readOnly)return t.preventDefault();a.observer.flush();let n=uf?null:t.clipboardData;n?(cf(a,n.getData("text/plain")),t.preventDefault()):_f(a)};function sc(a,t){let n=a.dom.parentNode;if(!n)return;let o=n.appendChild(document.createElement("textarea"));o.style.cssText="position: fixed; left: -10000px; top: 10px",o.value=t,o.focus(),o.selectionEnd=t.length,o.selectionStart=0,setTimeout(()=>{o.remove(),a.focus()},50)}function pf(a){let t=[],n=[],o=!1;for(let u of a.selection.ranges)u.empty||(t.push(a.sliceDoc(u.from,u.to)),n.push(u));if(!t.length){let u=-1;for(let{from:p}of a.selection.ranges){let v=a.doc.lineAt(p);v.number>u&&(t.push(v.text),n.push({from:v.from,to:Math.min(a.doc.length,v.to+1)})),u=v.number}o=!0}return{text:t.join(a.lineBreak),ranges:n,linewise:o}}let ql=null;As.copy=As.cut=(a,t)=>{let{text:n,ranges:o,linewise:u}=pf(a.state);if(!n&&!u)return;ql=u?n:null;let p=uf?null:t.clipboardData;p?(t.preventDefault(),p.clearData(),p.setData("text/plain",n)):sc(a,n),t.type=="cut"&&!a.state.readOnly&&a.dispatch({changes:o,scrollIntoView:!0,userEvent:"delete.cut"})};function vs(a){setTimeout(()=>{a.hasFocus!=a.inputState.notifiedFocused&&a.update([])},10)}As.focus=a=>{a.inputState.lastFocusTime=Date.now(),!a.scrollDOM.scrollTop&&(a.inputState.lastScrollTop||a.inputState.lastScrollLeft)&&(a.scrollDOM.scrollTop=a.inputState.lastScrollTop,a.scrollDOM.scrollLeft=a.inputState.lastScrollLeft),vs(a)},As.blur=a=>{a.observer.clearSelectionRange(),vs(a)},As.compositionstart=As.compositionupdate=a=>{a.inputState.compositionFirstChange==null&&(a.inputState.compositionFirstChange=!0),a.inputState.composing<0&&(a.inputState.composing=0)},As.compositionend=a=>{a.inputState.composing=-1,a.inputState.compositionEndedAt=Date.now(),a.inputState.compositionFirstChange=null,xr.chrome&&xr.android&&a.observer.flushSoon(),setTimeout(()=>{a.inputState.composing<0&&a.docView.compositionDeco.size&&a.update([])},50)},As.contextmenu=a=>{a.inputState.lastContextMenu=Date.now()},As.beforeinput=(a,t)=>{var n;let o;if(xr.chrome&&xr.android&&(o=$c.find(u=>u.inputType==t.inputType))&&(a.observer.delayAndroidKey(o.key,o.keyCode),o.key=="Backspace"||o.key=="Delete")){let u=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var p;(((p=window.visualViewport)===null||p===void 0?void 0:p.height)||0)>u+10&&a.hasFocus&&(a.contentDOM.blur(),a.focus())},100)}};const mu=["pre-wrap","normal","pre-line","break-spaces"];class ac{constructor(t){this.lineWrapping=t,this.doc=Cn.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}heightForGap(t,n){let o=this.doc.lineAt(n).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(o+=Math.ceil((n-t-o*this.lineLength*.5)/this.lineLength)),this.lineHeight*o}heightForLine(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return mu.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let n=!1;for(let o=0;o<t.length;o++){let u=t[o];u<0?o++:this.heightSamples[Math.floor(u*10)]||(n=!0,this.heightSamples[Math.floor(u*10)]=!0)}return n}refresh(t,n,o,u,p){let v=mu.indexOf(t)>-1,S=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=v;if(this.lineWrapping=v,this.lineHeight=n,this.charWidth=o,this.lineLength=u,S){this.heightSamples={};for(let A=0;A<p.length;A++){let H=p[A];H<0?A++:this.heightSamples[Math.floor(H*10)]=!0}}return S}}class jc{constructor(t,n){this.from=t,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Wa{constructor(t,n,o,u,p){this.from=t,this.length=n,this.top=o,this.height=u,this.type=p}get to(){return this.from+this.length}get bottom(){return this.top+this.height}join(t){let n=(Array.isArray(this.type)?this.type:[this]).concat(Array.isArray(t.type)?t.type:[t]);return new Wa(this.from,this.length+t.length,this.top,this.height+t.height,n)}}var rs=function(a){return a[a.ByPos=0]="ByPos",a[a.ByHeight=1]="ByHeight",a[a.ByPosNoHeight=2]="ByPosNoHeight",a}(rs||(rs={}));const za=.001;class Oo{constructor(t,n,o=2){this.length=t,this.height=n,this.flags=o}get outdated(){return(this.flags&2)>0}set outdated(t){this.flags=(t?2:0)|this.flags&-3}setHeight(t,n){this.height!=n&&(Math.abs(this.height-n)>za&&(t.heightChanged=!0),this.height=n)}replace(t,n,o){return Oo.of(o)}decomposeLeft(t,n){n.push(this)}decomposeRight(t,n){n.push(this)}applyChanges(t,n,o,u){let p=this;for(let v=u.length-1;v>=0;v--){let{fromA:S,toA:A,fromB:H,toB:X}=u[v],Me=p.lineAt(S,rs.ByPosNoHeight,n,0,0),gt=Me.to>=A?Me:p.lineAt(A,rs.ByPosNoHeight,n,0,0);for(X+=gt.to-A,A=gt.to;v>0&&Me.from<=u[v-1].toA;)S=u[v-1].fromA,H=u[v-1].fromB,v--,S<Me.from&&(Me=p.lineAt(S,rs.ByPosNoHeight,n,0,0));H+=Me.from-S,S=Me.from;let It=Fs.build(o,t,H,X);p=p.replace(S,A,It)}return p.updateHeight(o,0)}static empty(){return new Ho(0,0)}static of(t){if(t.length==1)return t[0];let n=0,o=t.length,u=0,p=0;for(;;)if(n==o)if(u>p*2){let S=t[n-1];S.break?t.splice(--n,1,S.left,null,S.right):t.splice(--n,1,S.left,S.right),o+=1+S.break,u-=S.size}else if(p>u*2){let S=t[o];S.break?t.splice(o,1,S.left,null,S.right):t.splice(o,1,S.left,S.right),o+=2+S.break,p-=S.size}else break;else if(u<p){let S=t[n++];S&&(u+=S.size)}else{let S=t[--o];S&&(p+=S.size)}let v=0;return t[n-1]==null?(v=1,n--):t[n]==null&&(v=1,o++),new gu(Oo.of(t.slice(0,n)),v,Oo.of(t.slice(o)))}}Oo.prototype.size=1;class Ts extends Oo{constructor(t,n,o){super(t,n),this.type=o}blockAt(t,n,o,u){return new Wa(u,this.length,o,this.height,this.type)}lineAt(t,n,o,u,p){return this.blockAt(0,o,u,p)}forEachLine(t,n,o,u,p,v){t<=p+this.length&&n>=p&&v(this.blockAt(0,o,u,p))}updateHeight(t,n=0,o=!1,u){return u&&u.from<=n&&u.more&&this.setHeight(t,u.heights[u.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ho extends Ts{constructor(t,n){super(t,n,Ro.Text),this.collapsed=0,this.widgetHeight=0}replace(t,n,o){let u=o[0];return o.length==1&&(u instanceof Ho||u instanceof Ns&&u.flags&4)&&Math.abs(this.length-u.length)<10?(u instanceof Ns?u=new Ho(u.length,this.height):u.height=this.height,this.outdated||(u.outdated=!1),u):Oo.of(o)}updateHeight(t,n=0,o=!1,u){return u&&u.from<=n&&u.more?this.setHeight(t,u.heights[u.index++]):(o||this.outdated)&&this.setHeight(t,Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ns extends Oo{constructor(t){super(t,0)}lines(t,n){let o=t.lineAt(n).number,u=t.lineAt(n+this.length).number;return{firstLine:o,lastLine:u,lineHeight:this.height/(u-o+1)}}blockAt(t,n,o,u){let{firstLine:p,lastLine:v,lineHeight:S}=this.lines(n,u),A=Math.max(0,Math.min(v-p,Math.floor((t-o)/S))),{from:H,length:X}=n.line(p+A);return new Wa(H,X,o+S*A,S,Ro.Text)}lineAt(t,n,o,u,p){if(n==rs.ByHeight)return this.blockAt(t,o,u,p);if(n==rs.ByPosNoHeight){let{from:Me,to:gt}=o.lineAt(t);return new Wa(Me,gt-Me,0,0,Ro.Text)}let{firstLine:v,lineHeight:S}=this.lines(o,p),{from:A,length:H,number:X}=o.lineAt(t);return new Wa(A,H,u+S*(X-v),S,Ro.Text)}forEachLine(t,n,o,u,p,v){let{firstLine:S,lineHeight:A}=this.lines(o,p);for(let H=Math.max(t,p),X=Math.min(p+this.length,n);H<=X;){let Me=o.lineAt(H);H==t&&(u+=A*(Me.number-S)),v(new Wa(Me.from,Me.length,u,A,Ro.Text)),u+=A,H=Me.to+1}}replace(t,n,o){let u=this.length-n;if(u>0){let p=o[o.length-1];p instanceof Ns?o[o.length-1]=new Ns(p.length+u):o.push(null,new Ns(u-1))}if(t>0){let p=o[0];p instanceof Ns?o[0]=new Ns(t+p.length):o.unshift(new Ns(t-1),null)}return Oo.of(o)}decomposeLeft(t,n){n.push(new Ns(t-1),null)}decomposeRight(t,n){n.push(null,new Ns(this.length-t-1))}updateHeight(t,n=0,o=!1,u){let p=n+this.length;if(u&&u.from<=n+this.length&&u.more){let v=[],S=Math.max(n,u.from),A=-1,H=t.heightChanged;for(u.from>n&&v.push(new Ns(u.from-n-1).updateHeight(t,n));S<=p&&u.more;){let Me=t.doc.lineAt(S).length;v.length&&v.push(null);let gt=u.heights[u.index++];A==-1?A=gt:Math.abs(gt-A)>=za&&(A=-2);let It=new Ho(Me,gt);It.outdated=!1,v.push(It),S+=Me+1}S<=p&&v.push(null,new Ns(p-S).updateHeight(t,S));let X=Oo.of(v);return t.heightChanged=H||A<0||Math.abs(X.height-this.height)>=za||Math.abs(A-this.lines(t.doc,n).lineHeight)>=za,X}else(o||this.outdated)&&(this.setHeight(t,t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class gu extends Oo{constructor(t,n,o){super(t.length+n+o.length,t.height+o.height,n|(t.outdated||o.outdated?2:0)),this.left=t,this.right=o,this.size=t.size+o.size}get break(){return this.flags&1}blockAt(t,n,o,u){let p=o+this.left.height;return t<p?this.left.blockAt(t,n,o,u):this.right.blockAt(t,n,p,u+this.left.length+this.break)}lineAt(t,n,o,u,p){let v=u+this.left.height,S=p+this.left.length+this.break,A=n==rs.ByHeight?t<v:t<S,H=A?this.left.lineAt(t,n,o,u,p):this.right.lineAt(t,n,o,v,S);if(this.break||(A?H.to<S:H.from>S))return H;let X=n==rs.ByPosNoHeight?rs.ByPosNoHeight:rs.ByPos;return A?H.join(this.right.lineAt(S,X,o,v,S)):this.left.lineAt(S,X,o,u,p).join(H)}forEachLine(t,n,o,u,p,v){let S=u+this.left.height,A=p+this.left.length+this.break;if(this.break)t<A&&this.left.forEachLine(t,n,o,u,p,v),n>=A&&this.right.forEachLine(t,n,o,S,A,v);else{let H=this.lineAt(A,rs.ByPos,o,u,p);t<H.from&&this.left.forEachLine(t,H.from-1,o,u,p,v),H.to>=t&&H.from<=n&&v(H),n>H.to&&this.right.forEachLine(H.to+1,n,o,S,A,v)}}replace(t,n,o){let u=this.left.length+this.break;if(n<u)return this.balanced(this.left.replace(t,n,o),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-u,n-u,o));let p=[];t>0&&this.decomposeLeft(t,p);let v=p.length;for(let S of o)p.push(S);if(t>0&&eu(p,v-1),n<this.length){let S=p.length;this.decomposeRight(n,p),eu(p,S)}return Oo.of(p)}decomposeLeft(t,n){let o=this.left.length;if(t<=o)return this.left.decomposeLeft(t,n);n.push(this.left),this.break&&(o++,t>=o&&n.push(null)),t>o&&this.right.decomposeLeft(t-o,n)}decomposeRight(t,n){let o=this.left.length,u=o+this.break;if(t>=u)return this.right.decomposeRight(t-u,n);t<o&&this.left.decomposeRight(t,n),this.break&&t<u&&n.push(null),n.push(this.right)}balanced(t,n){return t.size>2*n.size||n.size>2*t.size?Oo.of(this.break?[t,null,n]:[t,n]):(this.left=t,this.right=n,this.height=t.height+n.height,this.outdated=t.outdated||n.outdated,this.size=t.size+n.size,this.length=t.length+this.break+n.length,this)}updateHeight(t,n=0,o=!1,u){let{left:p,right:v}=this,S=n+p.length+this.break,A=null;return u&&u.from<=n+p.length&&u.more?A=p=p.updateHeight(t,n,o,u):p.updateHeight(t,n,o),u&&u.from<=S+v.length&&u.more?A=v=v.updateHeight(t,S,o,u):v.updateHeight(t,S,o),A?this.balanced(p,v):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function eu(a,t){let n,o;a[t]==null&&(n=a[t-1])instanceof Ns&&(o=a[t+1])instanceof Ns&&a.splice(t-1,3,new Ns(n.length+1+o.length))}const qf=5;class Fs{constructor(t,n){this.pos=t,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,n){if(this.lineStart>-1){let o=Math.min(n,this.lineEnd),u=this.nodes[this.nodes.length-1];u instanceof Ho?u.length+=o-this.pos:(o>this.pos||!this.isCovered)&&this.nodes.push(new Ho(o-this.pos,-1)),this.writtenTo=o,n>o&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(t,n,o){if(t<n||o.heightRelevant){let u=o.widget?o.widget.estimatedHeight:0;u<0&&(u=this.oracle.lineHeight);let p=n-t;o.block?this.addBlock(new Ts(p,u,o.type)):(p||u>=qf)&&this.addLineDeco(u,p)}else n>t&&this.span(t,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=n,this.writtenTo<t&&((this.writtenTo<t-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new Ho(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,n){let o=new Ns(n-t);return this.oracle.doc.lineAt(t).to==n&&(o.flags|=4),o}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Ho)return t;let n=new Ho(0,-1);return this.nodes.push(n),n}addBlock(t){this.enterLine(),t.type==Ro.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,t.type!=Ro.WidgetBefore&&(this.covering=t)}addLineDeco(t,n){let o=this.ensureLine();o.length+=n,o.collapsed+=n,o.widgetHeight=Math.max(o.widgetHeight,t),this.writtenTo=this.pos=this.pos+n}finish(t){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ho)&&!this.isCovered?this.nodes.push(new Ho(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let o=t;for(let u of this.nodes)u instanceof Ho&&u.updateHeight(this.oracle,o),o+=u?u.length:1;return this.nodes}static build(t,n,o,u){let p=new Fs(o,t);return hi.spans(n,o,u,p,0),p.finish(o)}}function Uc(a,t,n){let o=new mf;return hi.compare(a,t,n,o,0),o.changes}class mf{constructor(){this.changes=[]}compareRange(){}comparePoint(t,n,o,u){(t<n||o&&o.heightRelevant||u&&u.heightRelevant)&&ou(t,n,this.changes,5)}}function lc(a,t){let n=a.getBoundingClientRect(),o=a.ownerDocument,u=o.defaultView||window,p=Math.max(0,n.left),v=Math.min(u.innerWidth,n.right),S=Math.max(0,n.top),A=Math.min(u.innerHeight,n.bottom);for(let H=a.parentNode;H&&H!=o.body;)if(H.nodeType==1){let X=H,Me=window.getComputedStyle(X);if((X.scrollHeight>X.clientHeight||X.scrollWidth>X.clientWidth)&&Me.overflow!="visible"){let gt=X.getBoundingClientRect();p=Math.max(p,gt.left),v=Math.min(v,gt.right),S=Math.max(S,gt.top),A=H==a.parentNode?gt.bottom:Math.min(A,gt.bottom)}H=Me.position=="absolute"||Me.position=="fixed"?X.offsetParent:X.parentNode}else if(H.nodeType==11)H=H.host;else break;return{left:p-n.left,right:Math.max(p,v)-n.left,top:S-(n.top+t),bottom:Math.max(S,A)-(n.top+t)}}function ml(a,t){let n=a.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class Ca{constructor(t,n,o){this.from=t,this.to=n,this.size=o}static same(t,n){if(t.length!=n.length)return!1;for(let o=0;o<t.length;o++){let u=t[o],p=n[o];if(u.from!=p.from||u.to!=p.to||u.size!=p.size)return!1}return!0}draw(t){return Lr.replace({widget:new _u(this.size,t)}).range(this.from,this.to)}}class _u extends ba{constructor(t,n){super(),this.size=t,this.vertical=n}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");return this.vertical?t.style.height=this.size+"px":(t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block"),t}get estimatedHeight(){return this.vertical?this.size:-1}}class uc{constructor(t){this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaler=yf,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=ts.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(Ml).some(o=>typeof o!="function"&&o.class=="cm-lineWrapping");this.heightOracle=new ac(n),this.stateDeco=t.facet(qa).filter(o=>typeof o!="function"),this.heightMap=Oo.empty().applyChanges(this.stateDeco,Cn.empty,this.heightOracle.setDoc(t.doc),[new Ps(0,0,0,t.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Lr.set(this.lineGaps.map(o=>o.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:n}=this.state.selection;for(let o=0;o<=1;o++){let u=o?n.head:n.anchor;if(!t.some(({from:p,to:v})=>u>=p&&u<=v)){let{from:p,to:v}=this.lineBlockAt(u);t.push(new vu(p,v))}}this.viewports=t.sort((o,u)=>o.from-u.from),this.scaler=this.heightMap.height<=7e6?yf:new Lf(this.heightOracle.doc,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,t=>{this.viewportLines.push(this.scaler.scale==1?t:Pl(t,this.scaler))})}update(t,n=null){this.state=t.state;let o=this.stateDeco;this.stateDeco=this.state.facet(qa).filter(H=>typeof H!="function");let u=t.changedRanges,p=Ps.extendWithRanges(u,Uc(o,this.stateDeco,t?t.changes:Jn.empty(this.state.doc.length))),v=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),p),this.heightMap.height!=v&&(t.flags|=2);let S=p.length?this.mapViewport(this.viewport,t.changes):this.viewport;(n&&(n.range.head<S.from||n.range.head>S.to)||!this.viewportIsAppropriate(S))&&(S=this.getViewport(0,n));let A=!t.changes.empty||t.flags&2||S.from!=this.viewport.from||S.to!=this.viewport.to;this.viewport=S,this.updateForViewport(),A&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(Yl)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let n=t.contentDOM,o=window.getComputedStyle(n),u=this.heightOracle,p=o.whiteSpace;this.defaultTextDirection=o.direction=="rtl"?ts.RTL:ts.LTR;let v=this.heightOracle.mustRefreshForWrapping(p),S=v||this.mustMeasureContent||this.contentDOMHeight!=n.clientHeight;this.contentDOMHeight=n.clientHeight,this.mustMeasureContent=!1;let A=0,H=0,X=parseInt(o.paddingTop)||0,Me=parseInt(o.paddingBottom)||0;(this.paddingTop!=X||this.paddingBottom!=Me)&&(this.paddingTop=X,this.paddingBottom=Me,A|=10),this.editorWidth!=t.scrollDOM.clientWidth&&(u.lineWrapping&&(S=!0),this.editorWidth=t.scrollDOM.clientWidth,A|=8);let gt=(this.printing?ml:lc)(n,this.paddingTop),It=gt.top-this.pixelViewport.top,un=gt.bottom-this.pixelViewport.bottom;this.pixelViewport=gt;let or=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(or!=this.inView&&(this.inView=or,or&&(S=!0)),!this.inView&&!this.scrollTarget)return 0;let ar=n.clientWidth;if((this.contentDOMWidth!=ar||this.editorHeight!=t.scrollDOM.clientHeight)&&(this.contentDOMWidth=ar,this.editorHeight=t.scrollDOM.clientHeight,A|=8),S){let Si=t.docView.measureVisibleLineHeights(this.viewport);if(u.mustRefreshForHeights(Si)&&(v=!0),v||u.lineWrapping&&Math.abs(ar-this.contentDOMWidth)>u.charWidth){let{lineHeight:ki,charWidth:mi}=t.docView.measureTextSize();v=ki>0&&u.refresh(p,ki,mi,ar/mi,Si),v&&(t.docView.minWidth=0,A|=8)}It>0&&un>0?H=Math.max(It,un):It<0&&un<0&&(H=Math.min(It,un)),u.heightChanged=!1;for(let ki of this.viewports){let mi=ki.from==this.viewport.from?Si:t.docView.measureVisibleLineHeights(ki);this.heightMap=(v?Oo.empty().applyChanges(this.stateDeco,Cn.empty,this.heightOracle,[new Ps(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(u,0,v,new jc(ki.from,mi))}u.heightChanged&&(A|=2)}let wr=!this.viewportIsAppropriate(this.viewport,H)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return wr&&(this.viewport=this.getViewport(H,this.scrollTarget)),this.updateForViewport(),(A&2||wr)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(v?[]:this.lineGaps,t)),A|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),A}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,n){let o=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),u=this.heightMap,p=this.state.doc,{visibleTop:v,visibleBottom:S}=this,A=new vu(u.lineAt(v-o*1e3,rs.ByHeight,p,0,0).from,u.lineAt(S+(1-o)*1e3,rs.ByHeight,p,0,0).to);if(n){let{head:H}=n.range;if(H<A.from||H>A.to){let X=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),Me=u.lineAt(H,rs.ByPos,p,0,0),gt;n.y=="center"?gt=(Me.top+Me.bottom)/2-X/2:n.y=="start"||n.y=="nearest"&&H<A.from?gt=Me.top:gt=Me.bottom-X,A=new vu(u.lineAt(gt-1e3/2,rs.ByHeight,p,0,0).from,u.lineAt(gt+X+1e3/2,rs.ByHeight,p,0,0).to)}}return A}mapViewport(t,n){let o=n.mapPos(t.from,-1),u=n.mapPos(t.to,1);return new vu(this.heightMap.lineAt(o,rs.ByPos,this.state.doc,0,0).from,this.heightMap.lineAt(u,rs.ByPos,this.state.doc,0,0).to)}viewportIsAppropriate({from:t,to:n},o=0){if(!this.inView)return!0;let{top:u}=this.heightMap.lineAt(t,rs.ByPos,this.state.doc,0,0),{bottom:p}=this.heightMap.lineAt(n,rs.ByPos,this.state.doc,0,0),{visibleTop:v,visibleBottom:S}=this;return(t==0||u<=v-Math.max(10,Math.min(-o,250)))&&(n==this.state.doc.length||p>=S+Math.max(10,Math.min(o,250)))&&u>v-2*1e3&&p<S+2*1e3}mapLineGaps(t,n){if(!t.length||n.empty)return t;let o=[];for(let u of t)n.touchesRange(u.from,u.to)||o.push(new Ca(n.mapPos(u.from),n.mapPos(u.to),u.size));return o}ensureLineGaps(t,n){let o=this.heightOracle.lineWrapping,u=o?1e4:2e3,p=u>>1,v=u<<1;if(this.defaultTextDirection!=ts.LTR&&!o)return[];let S=[],A=(H,X,Me,gt)=>{if(X-H<p)return;let It=this.state.selection.main,un=[It.from];It.empty||un.push(It.to);for(let ar of un)if(ar>H&&ar<X){A(H,ar-10,Me,gt),A(ar+10,X,Me,gt);return}let or=vf(t,ar=>ar.from>=Me.from&&ar.to<=Me.to&&Math.abs(ar.from-H)<p&&Math.abs(ar.to-X)<p&&!un.some(wr=>ar.from<wr&&ar.to>wr));if(!or){if(X<Me.to&&n&&o&&n.visibleRanges.some(ar=>ar.from<=X&&ar.to>=X)){let ar=n.moveToLineBoundary(ue.cursor(X),!1,!0).head;ar>H&&(X=ar)}or=new Ca(H,X,this.gapSize(Me,H,X,gt))}S.push(or)};for(let H of this.viewportLines){if(H.length<v)continue;let X=gf(H.from,H.to,this.stateDeco);if(X.total<v)continue;let Me=this.scrollTarget?this.scrollTarget.range.head:null,gt,It;if(o){let un=u/this.heightOracle.lineLength*this.heightOracle.lineHeight,or,ar;if(Me!=null){let wr=cc(X,Me),Si=((this.visibleBottom-this.visibleTop)/2+un)/H.height;or=wr-Si,ar=wr+Si}else or=(this.visibleTop-H.top-un)/H.height,ar=(this.visibleBottom-H.top+un)/H.height;gt=yu(X,or),It=yu(X,ar)}else{let un=X.total*this.heightOracle.charWidth,or=u*this.heightOracle.charWidth,ar,wr;if(Me!=null){let Si=cc(X,Me),ki=((this.pixelViewport.right-this.pixelViewport.left)/2+or)/un;ar=Si-ki,wr=Si+ki}else ar=(this.pixelViewport.left-or)/un,wr=(this.pixelViewport.right+or)/un;gt=yu(X,ar),It=yu(X,wr)}gt>H.from&&A(H.from,gt,H,X),It<H.to&&A(It,H.to,H,X)}return S}gapSize(t,n,o,u){let p=cc(u,o)-cc(u,n);return this.heightOracle.lineWrapping?t.height*p:u.total*this.heightOracle.charWidth*p}updateLineGaps(t){Ca.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=Lr.set(t.map(n=>n.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];hi.spans(t,this.viewport.from,this.viewport.to,{span(u,p){n.push({from:u,to:p})},point(){}},20);let o=n.length!=this.visibleRanges.length||this.visibleRanges.some((u,p)=>u.from!=n[p].from||u.to!=n[p].to);return this.visibleRanges=n,o?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find(n=>n.from<=t&&n.to>=t)||Pl(this.heightMap.lineAt(t,rs.ByPos,this.state.doc,0,0),this.scaler)}lineBlockAtHeight(t){return Pl(this.heightMap.lineAt(this.scaler.fromDOM(t),rs.ByHeight,this.state.doc,0,0),this.scaler)}elementAtHeight(t){return Pl(this.heightMap.blockAt(this.scaler.fromDOM(t),this.state.doc,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class vu{constructor(t,n){this.from=t,this.to=n}}function gf(a,t,n){let o=[],u=a,p=0;return hi.spans(n,a,t,{span(){},point(v,S){v>u&&(o.push({from:u,to:v}),p+=v-u),u=S}},20),u<t&&(o.push({from:u,to:t}),p+=t-u),{total:p,ranges:o}}function yu({total:a,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let o=Math.floor(a*n);for(let u=0;;u++){let{from:p,to:v}=t[u],S=v-p;if(o<=S)return p+o;o-=S}}function cc(a,t){let n=0;for(let{from:o,to:u}of a.ranges){if(t<=u){n+=t-o;break}n+=u-o}return n/a.total}function vf(a,t){for(let n of a)if(t(n))return n}const yf={toDOM(a){return a},fromDOM(a){return a},scale:1};class Lf{constructor(t,n,o){let u=0,p=0,v=0;this.viewports=o.map(({from:S,to:A})=>{let H=n.lineAt(S,rs.ByPos,t,0,0).top,X=n.lineAt(A,rs.ByPos,t,0,0).bottom;return u+=X-H,{from:S,to:A,top:H,bottom:X,domTop:0,domBottom:0}}),this.scale=(7e6-u)/(n.height-u);for(let S of this.viewports)S.domTop=v+(S.top-p)*this.scale,v=S.domBottom=S.domTop+(S.bottom-S.top),p=S.bottom}toDOM(t){for(let n=0,o=0,u=0;;n++){let p=n<this.viewports.length?this.viewports[n]:null;if(!p||t<p.top)return u+(t-o)*this.scale;if(t<=p.bottom)return p.domTop+(t-p.top);o=p.bottom,u=p.domBottom}}fromDOM(t){for(let n=0,o=0,u=0;;n++){let p=n<this.viewports.length?this.viewports[n]:null;if(!p||t<p.domTop)return o+(t-u)/this.scale;if(t<=p.domBottom)return p.top+(t-p.domTop);o=p.bottom,u=p.domBottom}}}function Pl(a,t){if(t.scale==1)return a;let n=t.toDOM(a.top),o=t.toDOM(a.bottom);return new Wa(a.from,a.length,n,o-n,Array.isArray(a.type)?a.type.map(u=>Pl(u,t)):a.type)}const Lu=ft.define({combine:a=>a.join(" ")}),tu=ft.define({combine:a=>a.indexOf(!0)>-1}),Wc=pr.newName(),fc=pr.newName(),dc=pr.newName(),Ef={"&light":"."+fc,"&dark":"."+dc};function zo(a,t,n){return new pr(t,{finish(o){return/&/.test(o)?o.replace(/&\w*/,u=>{if(u=="&")return a;if(!n||!n[u])throw new RangeError(`Unsupported selector: ${u}`);return n[u]}):a+" "+o}})}const $f=zo("."+Wc,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Ef);class Al{constructor(t,n,o,u){this.typeOver=u,this.bounds=null,this.text="";let{impreciseHead:p,impreciseAnchor:v}=t.docView;if(t.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=t.docView.domBoundsAround(n,o,0))){let S=p||v?[]:Qs(t),A=new Dc(S,t.state);A.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=A.text,this.newSel=Ul(S,this.bounds.from)}else{let S=t.observer.selectionRange,A=p&&p.node==S.focusNode&&p.offset==S.focusOffset||!Qn(t.contentDOM,S.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(S.focusNode,S.focusOffset),H=v&&v.node==S.anchorNode&&v.offset==S.anchorOffset||!Qn(t.contentDOM,S.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(S.anchorNode,S.anchorOffset);this.newSel=ue.single(H,A)}}}function zc(a,t){let n,{newSel:o}=t,u=a.state.selection.main;if(t.bounds){let{from:p,to:v}=t.bounds,S=u.from,A=null;(a.inputState.lastKeyCode===8&&a.inputState.lastKeyTime>Date.now()-100||xr.android&&t.text.length<v-p)&&(S=u.to,A="end");let H=bf(a.state.doc.sliceString(p,v,Pa),t.text,S-p,A);H&&(xr.chrome&&a.inputState.lastKeyCode==13&&H.toB==H.from+2&&t.text.slice(H.from,H.toB)==Pa+Pa&&H.toB--,n={from:p+H.from,to:p+H.toA,insert:Cn.of(t.text.slice(H.from,H.toB).split(Pa))})}else o&&(!a.hasFocus&&a.state.facet(Ba)||o.main.eq(u))&&(o=null);if(!n&&!o)return!1;if(!n&&t.typeOver&&!u.empty&&o&&o.main.empty?n={from:u.from,to:u.to,insert:a.state.doc.slice(u.from,u.to)}:n&&n.from>=u.from&&n.to<=u.to&&(n.from!=u.from||n.to!=u.to)&&u.to-u.from-(n.to-n.from)<=4?n={from:u.from,to:u.to,insert:a.state.doc.slice(u.from,n.from).append(n.insert).append(a.state.doc.slice(n.to,u.to))}:(xr.mac||xr.android)&&n&&n.from==n.to&&n.from==u.head-1&&/^\. ?$/.test(n.insert.toString())?(o&&n.insert.length==2&&(o=ue.single(o.main.anchor-1,o.main.head-1)),n={from:u.from,to:u.to,insert:Cn.of([" "])}):xr.chrome&&n&&n.from==n.to&&n.from==u.head&&n.insert.toString()==`
2195
- `&&a.lineWrapping&&(o&&(o=ue.single(o.main.anchor-1,o.main.head-1)),n={from:u.from,to:u.to,insert:Cn.of([" "])}),n){let p=a.state;if(xr.ios&&a.inputState.flushIOSKey(a)||xr.android&&(n.from==u.from&&n.to==u.to&&n.insert.length==1&&n.insert.lines==2&&Fo(a.contentDOM,"Enter",13)||n.from==u.from-1&&n.to==u.to&&n.insert.length==0&&Fo(a.contentDOM,"Backspace",8)||n.from==u.from&&n.to==u.to+1&&n.insert.length==0&&Fo(a.contentDOM,"Delete",46)))return!0;let v=n.insert.toString();if(a.state.facet(Xa).some(H=>H(a,n.from,n.to,v)))return!0;a.inputState.composing>=0&&a.inputState.composing++;let S;if(n.from>=u.from&&n.to<=u.to&&n.to-n.from>=(u.to-u.from)/3&&(!o||o.main.empty&&o.main.from==n.from+n.insert.length)&&a.inputState.composing<0){let H=u.from<n.from?p.sliceDoc(u.from,n.from):"",X=u.to>n.to?p.sliceDoc(n.to,u.to):"";S=p.replaceSelection(a.state.toText(H+n.insert.sliceString(0,void 0,a.state.lineBreak)+X))}else{let H=p.changes(n),X=o&&!p.selection.main.eq(o.main)&&o.main.to<=H.newLength?o.main:void 0;if(p.selection.ranges.length>1&&a.inputState.composing>=0&&n.to<=u.to&&n.to>=u.to-10){let Me=a.state.sliceDoc(n.from,n.to),gt=hl(a)||a.state.doc.lineAt(u.head),It=u.to-n.to,un=u.to-u.from;S=p.changeByRange(or=>{if(or.from==u.from&&or.to==u.to)return{changes:H,range:X||or.map(H)};let ar=or.to-It,wr=ar-Me.length;if(or.to-or.from!=un||a.state.sliceDoc(wr,ar)!=Me||gt&&or.to>=gt.from&&or.from<=gt.to)return{range:or};let Si=p.changes({from:wr,to:ar,insert:n.insert}),ki=or.to-u.to;return{changes:Si,range:X?ue.range(Math.max(0,X.anchor+ki),Math.max(0,X.head+ki)):or.map(Si)}})}else S={changes:H,selection:X&&p.selection.replaceRange(X)}}let A="input.type";return a.composing&&(A+=".compose",a.inputState.compositionFirstChange&&(A+=".start",a.inputState.compositionFirstChange=!1)),a.dispatch(S,{scrollIntoView:!0,userEvent:A}),!0}else if(o&&!o.main.eq(u)){let p=!1,v="select";return a.inputState.lastSelectionTime>Date.now()-50&&(a.inputState.lastSelectionOrigin=="select"&&(p=!0),v=a.inputState.lastSelectionOrigin),a.dispatch({selection:o,scrollIntoView:p,userEvent:v}),!0}else return!1}function bf(a,t,n,o){let u=Math.min(a.length,t.length),p=0;for(;p<u&&a.charCodeAt(p)==t.charCodeAt(p);)p++;if(p==u&&a.length==t.length)return null;let v=a.length,S=t.length;for(;v>0&&S>0&&a.charCodeAt(v-1)==t.charCodeAt(S-1);)v--,S--;if(o=="end"){let A=Math.max(0,p-Math.min(v,S));n-=v+A-p}if(v<p&&a.length<t.length){let A=n<=p&&n>=v?p-n:0;p-=A,S=p+(S-v),v=p}else if(S<p){let A=n<=p&&n>=S?p-n:0;p-=A,v=p+(v-S),S=p}return{from:p,toA:v,toB:S}}function Qs(a){let t=[];if(a.root.activeElement!=a.contentDOM)return t;let{anchorNode:n,anchorOffset:o,focusNode:u,focusOffset:p}=a.observer.selectionRange;return n&&(t.push(new Pc(n,o)),(u!=n||p!=o)&&t.push(new Pc(u,p))),t}function Ul(a,t){if(a.length==0)return null;let n=a[0].pos,o=a.length==2?a[1].pos:n;return n>-1&&o>-1?ue.single(n+t,o+t):null}const Nf={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},$u=xr.ie&&xr.ie_version<=11;class fd{constructor(t){this.view=t,this.active=!1,this.selectionRange=new Ds,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver(n=>{for(let o of n)this.queue.push(o);(xr.ie&&xr.ie_version<=11||xr.ios&&t.composing)&&n.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),$u&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(t.scrollDOM),this.resizeContent=new ResizeObserver(()=>this.view.requestMeasure()),this.resizeContent.observe(t.contentDOM)),this.addWindowListeners(this.win=t.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runScrollHandlers(this.view,t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some((n,o)=>n!=t[o]))){this.gapIntersection.disconnect();for(let n of t)this.gapIntersection.observe(n);this.gaps=t}}onSelectionChange(t){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:o}=this,u=this.selectionRange;if(o.state.facet(Ba)?o.root.activeElement!=this.dom:!ua(o.dom,u))return;let p=u.anchorNode&&o.docView.nearest(u.anchorNode);if(p&&p.ignoreEvent(t)){n||(this.selectionChanged=!1);return}(xr.ie&&xr.ie_version<=11||xr.android&&xr.chrome)&&!o.state.selection.main.empty&&u.focusNode&&Zs(u.focusNode,u.focusOffset,u.anchorNode,u.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,n=xr.safari&&t.root.nodeType==11&&ms(this.dom.ownerDocument)==this.dom&&xf(this.view)||Es(t.root);if(!n||this.selectionRange.eq(n))return!1;let o=ua(this.dom,n);return o&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&$a(this.dom,n)?(this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1):(this.selectionRange.setRange(n),o&&(this.selectionChanged=!0),!0)}setSelectionRange(t,n){this.selectionRange.set(t.node,t.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,n=null;for(let o=this.dom;o;)if(o.nodeType==1)!n&&t<this.scrollTargets.length&&this.scrollTargets[t]==o?t++:n||(n=this.scrollTargets.slice(0,t)),n&&n.push(o),o=o.assignedSlot||o.parentNode;else if(o.nodeType==11)o=o.host;else break;if(t<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,t)),n){for(let o of this.scrollTargets)o.removeEventListener("scroll",this.onScroll);for(let o of this.scrollTargets=n)o.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Nf),$u&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),$u&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,n){var o;if(!this.delayedAndroidKey){let u=()=>{let p=this.delayedAndroidKey;p&&(this.clearDelayedAndroidKey(),!this.flush()&&p.force&&Fo(this.dom,p.key,p.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(u)}(!this.delayedAndroidKey||t=="Enter")&&(this.delayedAndroidKey={key:t,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((o=this.delayedAndroidKey)===null||o===void 0)&&o.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}processRecords(){let t=this.queue;for(let p of this.observer.takeRecords())t.push(p);t.length&&(this.queue=[]);let n=-1,o=-1,u=!1;for(let p of t){let v=this.readMutation(p);v&&(v.typeOver&&(u=!0),n==-1?{from:n,to:o}=v:(n=Math.min(v.from,n),o=Math.max(v.to,o)))}return{from:n,to:o,typeOver:u}}readChange(){let{from:t,to:n,typeOver:o}=this.processRecords(),u=this.selectionChanged&&ua(this.dom,this.selectionRange);return t<0&&!u?null:(t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new Al(this.view,t,n,o))}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let n=this.readChange();if(!n)return!1;let o=this.view.state,u=zc(this.view,n);return this.view.state==o&&this.view.update([]),u}readMutation(t){let n=this.view.docView.nearest(t.target);if(!n||n.ignoreMutation(t))return null;if(n.markDirty(t.type=="attributes"),t.type=="attributes"&&(n.dirty|=4),t.type=="childList"){let o=Vc(n,t.previousSibling||t.target.previousSibling,-1),u=Vc(n,t.nextSibling||t.target.nextSibling,1);return{from:o?n.posAfter(o):n.posAtStart,to:u?n.posBefore(u):n.posAtEnd,typeOver:!1}}else return t.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var t,n,o,u;this.stop(),(t=this.intersection)===null||t===void 0||t.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(o=this.resizeScroll)===null||o===void 0||o.disconnect(),(u=this.resizeContent)===null||u===void 0||u.disconnect();for(let p of this.scrollTargets)p.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function Vc(a,t,n){for(;t;){let o=Go.get(t);if(o&&o.parent==a)return o;let u=t.parentNode;t=u!=a.dom?u:n>0?t.nextSibling:t.previousSibling}return null}function xf(a){let t=null;function n(A){A.preventDefault(),A.stopImmediatePropagation(),t=A.getTargetRanges()[0]}if(a.contentDOM.addEventListener("beforeinput",n,!0),a.dom.ownerDocument.execCommand("indent"),a.contentDOM.removeEventListener("beforeinput",n,!0),!t)return null;let o=t.startContainer,u=t.startOffset,p=t.endContainer,v=t.endOffset,S=a.docView.domAtPos(a.state.selection.main.anchor);return Zs(S.node,S.offset,p,v)&&([o,u,p,v]=[p,v,o,u]),{anchorNode:o,anchorOffset:u,focusNode:p,focusOffset:v}}class Di{constructor(t={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=t.dispatch||(n=>this.update([n])),this.dispatch=this.dispatch.bind(this),this._root=t.root||xs(t.parent)||document,this.viewState=new uc(t.state||ui.create(t)),this.plugins=this.state.facet(Bo).map(n=>new $s(n));for(let n of this.plugins)n.update(this);this.observer=new fd(this),this.inputState=new wl(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new ha(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),t.parent&&t.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...t){this._dispatch(t.length==1&&t[0]instanceof Xt?t[0]:this.state.update(...t))}update(t){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,o=!1,u,p=this.state;for(let H of t){if(H.startState!=p)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");p=H.state}if(this.destroyed){this.viewState.state=p;return}let v=this.observer.delayedAndroidKey,S=null;if(v?(this.observer.clearDelayedAndroidKey(),S=this.observer.readChange(),(S&&!this.state.doc.eq(p.doc)||!this.state.selection.eq(p.selection))&&(S=null)):this.observer.clear(),p.facet(ui.phrases)!=this.state.facet(ui.phrases))return this.setState(p);u=au.create(this,p,t);let A=this.viewState.scrollTarget;try{this.updateState=2;for(let H of t){if(A&&(A=A.map(H.changes)),H.scrollIntoView){let{main:X}=H.state.selection;A=new Da(X.empty?X:ue.cursor(X.head,X.head>X.anchor?-1:1))}for(let X of H.effects)X.is(Cl)&&(A=X.value)}this.viewState.update(u,A),this.bidiCache=Ra.update(this.bidiCache,u.changes),u.empty||(this.updatePlugins(u),this.inputState.update(u)),n=this.docView.update(u),this.state.facet(Sl)!=this.styleModules&&this.mountStyles(),o=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(H=>H.isUserEvent("select.pointer")))}finally{this.updateState=0}if(u.startState.facet(Lu)!=u.state.facet(Lu)&&(this.viewState.mustMeasureContent=!0),(n||o||A||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!u.empty)for(let H of this.state.facet(qu))H(u);S&&!zc(this,S)&&v.force&&Fo(this.contentDOM,v.key,v.keyCode)}setState(t){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=t;return}this.updateState=2;let n=this.hasFocus;try{for(let o of this.plugins)o.destroy(this);this.viewState=new uc(t),this.plugins=t.facet(Bo).map(o=>new $s(o)),this.pluginMap.clear();for(let o of this.plugins)o.update(this);this.docView=new ha(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(t){let n=t.startState.facet(Bo),o=t.state.facet(Bo);if(n!=o){let u=[];for(let p of o){let v=n.indexOf(p);if(v<0)u.push(new $s(p));else{let S=this.plugins[v];S.mustUpdate=t,u.push(S)}}for(let p of this.plugins)p.mustUpdate!=t&&p.destroy(this);this.plugins=u,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let u of this.plugins)u.mustUpdate=t;for(let u=0;u<this.plugins.length;u++)this.plugins[u].update(this)}measure(t=!0){if(this.destroyed)return;this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,t&&this.observer.forceFlush();let n=null,{scrollHeight:o,scrollTop:u,clientHeight:p}=this.scrollDOM,v=u>o-p-4?o:u;try{for(let S=0;;S++){this.updateState=1;let A=this.viewport,H=this.viewState.lineBlockAtHeight(v),X=this.viewState.measure(this);if(!X&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(S>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let Me=[];X&4||([this.measureRequests,Me]=[Me,this.measureRequests]);let gt=Me.map(ar=>{try{return ar.read(this)}catch(wr){return Ls(this.state,wr),cs}}),It=au.create(this,this.state,[]),un=!1,or=!1;It.flags|=X,n?n.flags|=X:n=It,this.updateState=2,It.empty||(this.updatePlugins(It),this.inputState.update(It),this.updateAttrs(),un=this.docView.update(It));for(let ar=0;ar<Me.length;ar++)if(gt[ar]!=cs)try{let wr=Me[ar];wr.write&&wr.write(gt[ar],this)}catch(wr){Ls(this.state,wr)}if(this.viewState.editorHeight)if(this.viewState.scrollTarget)this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,or=!0;else{let ar=this.viewState.lineBlockAt(H.from).top-H.top;(ar>1||ar<-1)&&(this.scrollDOM.scrollTop+=ar,or=!0)}if(un&&this.docView.updateSelection(!0),this.viewport.from==A.from&&this.viewport.to==A.to&&!or&&this.measureRequests.length==0)break}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let S of this.state.facet(qu))S(n)}get themeClasses(){return Wc+" "+(this.state.facet(tu)?dc:fc)+" "+this.state.facet(Lu)}updateAttrs(){let t=hc(this,da,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Ba)?"true":"false",class:"cm-content",style:`${xr.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),hc(this,Ml,n);let o=this.observer.ignore(()=>{let u=Bl(this.contentDOM,this.contentAttrs,n),p=Bl(this.dom,this.editorAttrs,t);return u||p});return this.editorAttrs=t,this.contentAttrs=n,o}showAnnouncements(t){let n=!0;for(let o of t)for(let u of o.effects)if(u.is(Di.announce)){n&&(this.announceDOM.textContent=""),n=!1;let p=this.announceDOM.appendChild(document.createElement("div"));p.textContent=u.value}}mountStyles(){this.styleModules=this.state.facet(Sl),pr.mount(this.root,this.styleModules.concat($f).reverse())}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),t){if(this.measureRequests.indexOf(t)>-1)return;if(t.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===t.key){this.measureRequests[n]=t;return}}this.measureRequests.push(t)}}plugin(t){let n=this.pluginMap.get(t);return(n===void 0||n&&n.spec!=t)&&this.pluginMap.set(t,n=this.plugins.find(o=>o.spec==t)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,n,o){return rl(this,t,Jl(this,t,n,o))}moveByGroup(t,n){return rl(this,t,Jl(this,t,n,o=>lf(this,t.head,o)))}moveToLineBoundary(t,n,o=!0){return Ua(this,t,n,o)}moveVertically(t,n,o){return rl(this,t,Lc(this,t,n,o))}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,n=0){return this.docView.posFromDOM(t,n)}posAtCoords(t,n=!0){return this.readMeasured(),Au(this,t,n)}coordsAtPos(t,n=1){this.readMeasured();let o=this.docView.coordsAt(t,n);if(!o||o.left==o.right)return o;let u=this.state.doc.lineAt(t),p=this.bidiSpans(u),v=p[Ol.find(p,t-u.from,-1,n)];return Mo(o,v.dir==ts.LTR==n>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(xl)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>dd)return Tl(t.length);let n=this.textDirectionAt(t.from);for(let u of this.bidiCache)if(u.from==t.from&&u.dir==n)return u.order;let o=ka(t.text,n);return this.bidiCache.push(new Ra(t.from,t.to,n,o)),o}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||xr.safari&&((t=this.inputState)===null||t===void 0?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Xo(this.contentDOM),this.docView.updateSelection()})}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((t.nodeType==9?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,n={}){return Cl.of(new Da(typeof t=="number"?ue.cursor(t):t,n.y,n.x,n.yMargin,n.xMargin))}static domEventHandlers(t){return Wo.define(()=>({}),{eventHandlers:t})}static theme(t,n){let o=pr.newName(),u=[Lu.of(o),Sl.of(zo(`.${o}`,t))];return n&&n.dark&&u.push(tu.of(!0)),u}static baseTheme(t){return xn.lowest(Sl.of(zo("."+Wc,t,Ef)))}static findFromDOM(t){var n;let o=t.querySelector(".cm-content"),u=o&&Go.get(o)||Go.get(t);return((n=u?.rootView)===null||n===void 0?void 0:n.view)||null}}Di.styleModule=Sl,Di.inputHandler=Xa,Di.perLineTextDirection=xl,Di.exceptionSink=Xu,Di.updateListener=qu,Di.editable=Ba,Di.mouseSelectionStyle=Gl,Di.dragMovesSelection=fl,Di.clickAddsSelectionRange=Ss,Di.decorations=qa,Di.atomicRanges=na,Di.scrollMargins=su,Di.darkTheme=tu,Di.contentAttributes=Ml,Di.editorAttributes=da,Di.lineWrapping=Di.contentAttributes.of({class:"cm-lineWrapping"}),Di.announce=Et.define();const dd=4096,cs={};class Ra{constructor(t,n,o,u){this.from=t,this.to=n,this.dir=o,this.order=u}static update(t,n){if(n.empty)return t;let o=[],u=t.length?t[t.length-1].dir:ts.LTR;for(let p=Math.max(0,t.length-10);p<t.length;p++){let v=t[p];v.dir==u&&!n.touchesRange(v.from,v.to)&&o.push(new Ra(n.mapPos(v.from,1),n.mapPos(v.to,-1),v.dir,v.order))}return o}}function hc(a,t,n){for(let o=a.state.facet(t),u=o.length-1;u>=0;u--){let p=o[u],v=typeof p=="function"?p(a):p;v&&Fl(v,n)}return n}const pc=xr.mac?"mac":xr.windows?"win":xr.linux?"linux":"key";function Ff(a,t){const n=a.split(/-(?!$)/);let o=n[n.length-1];o=="Space"&&(o=" ");let u,p,v,S;for(let A=0;A<n.length-1;++A){const H=n[A];if(/^(cmd|meta|m)$/i.test(H))S=!0;else if(/^a(lt)?$/i.test(H))u=!0;else if(/^(c|ctrl|control)$/i.test(H))p=!0;else if(/^s(hift)?$/i.test(H))v=!0;else if(/^mod$/i.test(H))t=="mac"?S=!0:p=!0;else throw new Error("Unrecognized modifier name: "+H)}return u&&(o="Alt-"+o),p&&(o="Ctrl-"+o),S&&(o="Meta-"+o),v&&(o="Shift-"+o),o}function Hc(a,t,n){return t.altKey&&(a="Alt-"+a),t.ctrlKey&&(a="Ctrl-"+a),t.metaKey&&(a="Meta-"+a),n!==!1&&t.shiftKey&&(a="Shift-"+a),a}const Wl=xn.default(Di.domEventHandlers({keydown(a,t){return Mf(mc(t.state),a,t,"editor")}})),Eu=ft.define({enables:Wl}),Rl=new WeakMap;function mc(a){let t=a.facet(Eu),n=Rl.get(t);return n||Rl.set(t,n=ed(t.reduce((o,u)=>o.concat(u),[]))),n}function Cf(a,t,n){return Mf(mc(a.state),t,a,n)}let Il=null;const Bf=4e3;function ed(a,t=pc){let n=Object.create(null),o=Object.create(null),u=(v,S)=>{let A=o[v];if(A==null)o[v]=S;else if(A!=S)throw new Error("Key binding "+v+" is used both as a regular binding and as a multi-stroke prefix")},p=(v,S,A,H)=>{var X,Me;let gt=n[v]||(n[v]=Object.create(null)),It=S.split(/ (?!$)/).map(ar=>Ff(ar,t));for(let ar=1;ar<It.length;ar++){let wr=It.slice(0,ar).join(" ");u(wr,!0),gt[wr]||(gt[wr]={preventDefault:!0,run:[Si=>{let ki=Il={view:Si,prefix:wr,scope:v};return setTimeout(()=>{Il==ki&&(Il=null)},Bf),!0}]})}let un=It.join(" ");u(un,!1);let or=gt[un]||(gt[un]={preventDefault:!1,run:((Me=(X=gt._any)===null||X===void 0?void 0:X.run)===null||Me===void 0?void 0:Me.slice())||[]});A&&or.run.push(A),H&&(or.preventDefault=!0)};for(let v of a){let S=v.scope?v.scope.split(" "):["editor"];if(v.any)for(let H of S){let X=n[H]||(n[H]=Object.create(null));X._any||(X._any={preventDefault:!1,run:[]});for(let Me in X)X[Me].run.push(v.any)}let A=v[t]||v.key;if(A)for(let H of S)p(H,A,v.run,v.preventDefault),v.shift&&p(H,"Shift-"+A,v.shift,v.preventDefault)}return n}function Mf(a,t,n,o){let u=la(t),p=Rt(u,0),v=qt(p)==u.length&&u!=" ",S="",A=!1;Il&&Il.view==n&&Il.scope==o&&(S=Il.prefix+" ",(A=il.indexOf(t.keyCode)<0)&&(Il=null));let H=new Set,X=un=>{if(un){for(let or of un.run)if(!H.has(or)&&(H.add(or),or(n,t)))return!0;un.preventDefault&&(A=!0)}return!1},Me=a[o],gt,It;if(Me){if(X(Me[S+Hc(u,t,!v)]))return!0;if(v&&(t.altKey||t.metaKey||t.ctrlKey)&&!(xr.windows&&t.ctrlKey&&t.altKey)&&(gt=Mn[t.keyCode])&&gt!=u){if(X(Me[S+Hc(gt,t,!0)]))return!0;if(t.shiftKey&&(It=qi[t.keyCode])!=u&&It!=gt&&X(Me[S+Hc(It,t,!1)]))return!0}else if(v&&t.shiftKey&&X(Me[S+Hc(u,t,!0)]))return!0;if(X(Me._any))return!0}return A}class gc{constructor(t,n,o,u,p){this.className=t,this.left=n,this.top=o,this.width=u,this.height=p}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,n){return n.className!=this.className?!1:(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",this.width!=null&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,n,o){if(o.empty){let u=t.coordsAtPos(o.head,o.assoc||1);if(!u)return[];let p=Js(t);return[new gc(n,u.left-p.left,u.top-p.top,null,u.bottom-u.top)]}else return Of(t,n,o)}}function Js(a){let t=a.scrollDOM.getBoundingClientRect();return{left:(a.textDirection==ts.LTR?t.left:t.right-a.scrollDOM.clientWidth)-a.scrollDOM.scrollLeft,top:t.top-a.scrollDOM.scrollTop}}function ma(a,t,n){let o=ue.cursor(t);return{from:Math.max(n.from,a.moveToLineBoundary(o,!1,!0).from),to:Math.min(n.to,a.moveToLineBoundary(o,!0,!0).from),type:Ro.Text}}function Sf(a,t){let n=a.lineBlockAt(t);if(Array.isArray(n.type)){for(let o of n.type)if(o.to>t||o.to==t&&(o.to==n.to||o.type==Ro.Text))return o}return n}function Of(a,t,n){if(n.to<=a.viewport.from||n.from>=a.viewport.to)return[];let o=Math.max(n.from,a.viewport.from),u=Math.min(n.to,a.viewport.to),p=a.textDirection==ts.LTR,v=a.contentDOM,S=v.getBoundingClientRect(),A=Js(a),H=window.getComputedStyle(v.firstChild),X=S.left+parseInt(H.paddingLeft)+Math.min(0,parseInt(H.textIndent)),Me=S.right-parseInt(H.paddingRight),gt=Sf(a,o),It=Sf(a,u),un=gt.type==Ro.Text?gt:null,or=It.type==Ro.Text?It:null;if(a.lineWrapping&&(un&&(un=ma(a,o,un)),or&&(or=ma(a,u,or))),un&&or&&un.from==or.from)return wr(Si(n.from,n.to,un));{let mi=un?Si(n.from,null,un):ki(gt,!1),Ci=or?Si(null,n.to,or):ki(It,!0),Pi=[];return(un||gt).to<(or||It).from-1?Pi.push(ar(X,mi.bottom,Me,Ci.top)):mi.bottom<Ci.top&&a.elementAtHeight((mi.bottom+Ci.top)/2).type==Ro.Text&&(mi.bottom=Ci.top=(mi.bottom+Ci.top)/2),wr(mi).concat(Pi).concat(wr(Ci))}function ar(mi,Ci,Pi,Fi){return new gc(t,mi-A.left,Ci-A.top-.01,Pi-mi,Fi-Ci+.01)}function wr({top:mi,bottom:Ci,horizontal:Pi}){let Fi=[];for(let To=0;To<Pi.length;To+=2)Fi.push(ar(Pi[To],mi,Pi[To+1],Ci));return Fi}function Si(mi,Ci,Pi){let Fi=1e9,To=-1e9,eo=[];function oo(oa,Qa,yl,sa,La){let aa=a.coordsAtPos(oa,oa==Pi.to?-2:2),Hs=a.coordsAtPos(yl,yl==Pi.from?2:-2);Fi=Math.min(aa.top,Hs.top,Fi),To=Math.max(aa.bottom,Hs.bottom,To),La==ts.LTR?eo.push(p&&Qa?X:aa.left,p&&sa?Me:Hs.right):eo.push(!p&&sa?X:Hs.left,!p&&Qa?Me:aa.right)}let Zo=mi??Pi.from,Us=Ci??Pi.to;for(let oa of a.visibleRanges)if(oa.to>Zo&&oa.from<Us)for(let Qa=Math.max(oa.from,Zo),yl=Math.min(oa.to,Us);;){let sa=a.state.doc.lineAt(Qa);for(let La of a.bidiSpans(sa)){let aa=La.from+sa.from,Hs=La.to+sa.from;if(aa>=yl)break;Hs>Qa&&oo(Math.max(aa,Qa),mi==null&&aa<=Zo,Math.min(Hs,yl),Ci==null&&Hs>=Us,La.dir)}if(Qa=sa.to+1,Qa>=yl)break}return eo.length==0&&oo(Zo,mi==null,Us,Ci==null,a.textDirection),{top:Fi,bottom:To,horizontal:eo}}function ki(mi,Ci){let Pi=S.top+(Ci?mi.top:mi.bottom);return{top:Pi,bottom:Pi,horizontal:[]}}}function kf(a,t){return a.constructor==t.constructor&&a.eq(t)}class Va{constructor(t,n){this.view=t,this.layer=n,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,t)}update(t){t.startState.facet(vc)!=t.state.facet(vc)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&t.view.requestMeasure(this.measureReq)}setOrder(t){let n=0,o=t.facet(vc);for(;n<o.length&&o[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}draw(t){if(t.length!=this.drawn.length||t.some((n,o)=>!kf(n,this.drawn[o]))){let n=this.dom.firstChild,o=0;for(let u of t)u.update&&n&&u.constructor&&this.drawn[o].constructor&&u.update(n,this.drawn[o])?(n=n.nextSibling,o++):this.dom.insertBefore(u.draw(),n);for(;n;){let u=n.nextSibling;n.remove(),n=u}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const vc=ft.define();function yc(a){return[Wo.define(t=>new Va(t,a)),vc.of(a)]}const Zc=!xr.ios,Nu=ft.define({combine(a){return Vi(a,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,n)=>Math.min(t,n),drawRangeCursor:(t,n)=>t||n})}});function jf(a={}){return[Nu.of(a),wf,Uf,Kc,Yl.of(!0)]}function Tf(a){return a.startState.facet(Nu)!=a.state.facet(Nu)}const wf=yc({above:!0,markers(a){let{state:t}=a,n=t.facet(Nu),o=[];for(let u of t.selection.ranges){let p=u==t.selection.main;if(u.empty?!p||Zc:n.drawRangeCursor){let v=p?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",S=u.empty?u:ue.cursor(u.head,u.head>u.anchor?-1:1);for(let A of gc.forRange(a,v,S))o.push(A)}}return o},update(a,t){a.transactions.some(o=>o.selection)&&(t.style.animationName=t.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=Tf(a);return n&&Ec(a.state,t),a.docChanged||a.selectionSet||n},mount(a,t){Ec(t.state,a)},class:"cm-cursorLayer"});function Ec(a,t){t.style.animationDuration=a.facet(Nu).cursorBlinkRate+"ms"}const Uf=yc({above:!1,markers(a){return a.state.selection.ranges.map(t=>t.empty?[]:gc.forRange(a,"cm-selectionBackground",t)).reduce((t,n)=>t.concat(n))},update(a,t){return a.docChanged||a.selectionSet||a.viewportChanged||Tf(a)},class:"cm-selectionLayer"}),zl={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};Zc&&(zl[".cm-line"].caretColor="transparent !important");const Kc=xn.highest(Di.theme(zl)),Wf=Et.define({map(a,t){return a==null?null:t.mapPos(a)}}),Fu=Ut.define({create(){return null},update(a,t){return a!=null&&(a=t.changes.mapPos(a)),t.effects.reduce((n,o)=>o.is(Wf)?o.value:n,a)}}),td=Wo.fromClass(class{constructor(a){this.view=a,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(a){var t;let n=a.state.field(Fu);n==null?this.cursor!=null&&((t=this.cursor)===null||t===void 0||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(a.startState.field(Fu)!=n||a.docChanged||a.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let a=this.view.state.field(Fu),t=a!=null&&this.view.coordsAtPos(a);if(!t)return null;let n=this.view.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+this.view.scrollDOM.scrollLeft,top:t.top-n.top+this.view.scrollDOM.scrollTop,height:t.bottom-t.top}}drawCursor(a){this.cursor&&(a?(this.cursor.style.left=a.left+"px",this.cursor.style.top=a.top+"px",this.cursor.style.height=a.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(a){this.view.state.field(Fu)!=a&&this.view.dispatch({effects:Wf.of(a)})}},{eventHandlers:{dragover(a){this.setDropPos(this.view.posAtCoords({x:a.clientX,y:a.clientY}))},dragleave(a){(a.target==this.view.contentDOM||!this.view.contentDOM.contains(a.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function nd(){return[Fu,td]}function Gc(a,t,n,o,u){t.lastIndex=0;for(let p=a.iterRange(n,o),v=n,S;!p.next().done;v+=p.value.length)if(!p.lineBreak)for(;S=t.exec(p.value);)u(v+S.index,S)}function nu(a,t){let n=a.visibleRanges;if(n.length==1&&n[0].from==a.viewport.from&&n[0].to==a.viewport.to)return n;let o=[];for(let{from:u,to:p}of n)u=Math.max(a.state.doc.lineAt(u).from,u-t),p=Math.min(a.state.doc.lineAt(p).to,p+t),o.length&&o[o.length-1].to>=u?o[o.length-1].to=p:o.push({from:u,to:p});return o}class ce{constructor(t){const{regexp:n,decoration:o,decorate:u,boundary:p,maxLength:v=1e3}=t;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,u)this.addMatch=(S,A,H,X)=>u(X,H,H+S[0].length,S,A);else if(typeof o=="function")this.addMatch=(S,A,H,X)=>{let Me=o(S,A,H);Me&&X(H,H+S[0].length,Me)};else if(o)this.addMatch=(S,A,H,X)=>X(H,H+S[0].length,o);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=p,this.maxLength=v}createDeco(t){let n=new Uo,o=n.add.bind(n);for(let{from:u,to:p}of nu(t,this.maxLength))Gc(t.state.doc,this.regexp,u,p,(v,S)=>this.addMatch(S,t,v,o));return n.finish()}updateDeco(t,n){let o=1e9,u=-1;return t.docChanged&&t.changes.iterChanges((p,v,S,A)=>{A>t.view.viewport.from&&S<t.view.viewport.to&&(o=Math.min(S,o),u=Math.max(A,u))}),t.viewportChanged||u-o>1e3?this.createDeco(t.view):u>-1?this.updateRange(t.view,n.map(t.changes),o,u):n}updateRange(t,n,o,u){for(let p of t.visibleRanges){let v=Math.max(p.from,o),S=Math.min(p.to,u);if(S>v){let A=t.state.doc.lineAt(v),H=A.to<S?t.state.doc.lineAt(S):A,X=Math.max(p.from,A.from),Me=Math.min(p.to,H.to);if(this.boundary){for(;v>A.from;v--)if(this.boundary.test(A.text[v-1-A.from])){X=v;break}for(;S<H.to;S++)if(this.boundary.test(H.text[S-H.from])){Me=S;break}}let gt=[],It,un=(or,ar,wr)=>gt.push(wr.range(or,ar));if(A==H)for(this.regexp.lastIndex=X-A.from;(It=this.regexp.exec(A.text))&&It.index<Me-A.from;)this.addMatch(It,t,It.index+A.from,un);else Gc(t.state.doc,this.regexp,X,Me,(or,ar)=>this.addMatch(ar,t,or,un));n=n.update({filterFrom:X,filterTo:Me,filter:(or,ar)=>or<X||ar>Me,add:gt})}}return n}}const et=/x/.unicode!=null?"gu":"g",Wt=new RegExp(`[\0-\b
2196
- -\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,et),mn={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let gn=null;function nr(){var a;if(gn==null&&typeof document<"u"&&document.body){let t=document.body.style;gn=((a=t.tabSize)!==null&&a!==void 0?a:t.MozTabSize)!=null}return gn||!1}const dr=ft.define({combine(a){let t=Vi(a,{render:null,specialChars:Wt,addSpecialChars:null});return(t.replaceTabs=!nr())&&(t.specialChars=new RegExp(" |"+t.specialChars.source,et)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,et)),t}});function ri(a={}){return[dr.of(a),$i()]}let Ki=null;function $i(){return Ki||(Ki=Wo.fromClass(class{constructor(a){this.view=a,this.decorations=Lr.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(a.state.facet(dr)),this.decorations=this.decorator.createDeco(a)}makeDecorator(a){return new ce({regexp:a.specialChars,decoration:(t,n,o)=>{let{doc:u}=n.state,p=Rt(t[0],0);if(p==9){let v=u.lineAt(o),S=n.state.tabSize,A=Ur(v.text,S,o-v.from);return Lr.replace({widget:new ns((S-A%S)*this.view.defaultCharacterWidth)})}return this.decorationCache[p]||(this.decorationCache[p]=Lr.replace({widget:new hr(a,p)}))},boundary:a.replaceTabs?void 0:/[^]/})}update(a){let t=a.state.facet(dr);a.startState.facet(dr)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(a.view)):this.decorations=this.decorator.updateDeco(a,this.decorations)}},{decorations:a=>a.decorations}))}const Lo="\u2022";function xo(a){return a>=32?Lo:a==10?"\u2424":String.fromCharCode(9216+a)}class hr extends ba{constructor(t,n){super(),this.options=t,this.code=n}eq(t){return t.code==this.code}toDOM(t){let n=xo(this.code),o=t.state.phrase("Control character")+" "+(mn[this.code]||"0x"+this.code.toString(16)),u=this.options.render&&this.options.render(this.code,o,n);if(u)return u;let p=document.createElement("span");return p.textContent=n,p.title=o,p.setAttribute("aria-label",o),p.className="cm-specialChar",p}ignoreEvent(){return!1}}class ns extends ba{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent=" ",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}const ra=null;function ga(){return[ra,Ml.of(a=>{var t;return((t=a.plugin(ra))===null||t===void 0?void 0:t.attrs)||null})]}function ws(){return Ia}const is=Lr.line({class:"cm-activeLine"}),Ia=Wo.fromClass(class{constructor(a){this.decorations=this.getDeco(a)}update(a){(a.docChanged||a.selectionSet)&&(this.decorations=this.getDeco(a.view))}getDeco(a){let t=-1,n=[];for(let o of a.state.selection.ranges){let u=a.lineBlockAt(o.head);u.from>t&&(n.push(is.range(u.from)),t=u.from)}return Lr.set(n)}},{decorations:a=>a.decorations});class bu extends ba{constructor(t){super(),this.content=t}toDOM(){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}ignoreEvent(){return!1}}function Qo(a){return Wo.fromClass(class{constructor(t){this.view=t,this.placeholder=Lr.set([Lr.widget({widget:new bu(a),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?Lr.none:this.placeholder}},{decorations:t=>t.decorations})}const Jo=2e3;function Df(a,t,n){let o=Math.min(t.line,n.line),u=Math.max(t.line,n.line),p=[];if(t.off>Jo||n.off>Jo||t.col<0||n.col<0){let v=Math.min(t.off,n.off),S=Math.max(t.off,n.off);for(let A=o;A<=u;A++){let H=a.doc.line(A);H.length<=S&&p.push(ue.range(H.from+v,H.to+S))}}else{let v=Math.min(t.col,n.col),S=Math.max(t.col,n.col);for(let A=o;A<=u;A++){let H=a.doc.line(A),X=Pr(H.text,v,a.tabSize,!0);if(X<0)p.push(ue.cursor(H.to));else{let Me=Pr(H.text,S,a.tabSize);p.push(ue.range(H.from+X,H.from+Me))}}}return p}function bc(a,t){let n=a.coordsAtPos(a.viewport.from);return n?Math.round(Math.abs((n.left-t)/a.defaultCharacterWidth)):-1}function Yc(a,t){let n=a.posAtCoords({x:t.clientX,y:t.clientY},!1),o=a.state.doc.lineAt(n),u=n-o.from,p=u>Jo?-1:u==o.length?bc(a,t.clientX):Ur(o.text,a.state.tabSize,n-o.from);return{line:o.number,col:p,off:u}}function Xs(a,t){let n=Yc(a,t),o=a.state.selection;return n?{update(u){if(u.docChanged){let p=u.changes.mapPos(u.startState.doc.line(n.line).from),v=u.state.doc.lineAt(p);n={line:v.number,col:n.col,off:Math.min(n.off,v.length)},o=o.map(u.changes)}},get(u,p,v){let S=Yc(a,u);if(!S)return o;let A=Df(a.state,n,S);return A.length?v?ue.create(A.concat(o.ranges)):ue.create(A):o}}:null}function _l(a){let t=a?.eventFilter||(n=>n.altKey&&n.button==0);return Di.mouseSelectionStyle.of((n,o)=>t(o)?Xs(n,o):null)}const qs={Alt:[18,a=>a.altKey],Control:[17,a=>a.ctrlKey],Shift:[16,a=>a.shiftKey],Meta:[91,a=>a.metaKey]},Bu={style:"cursor: crosshair"};function Pf(a={}){let[t,n]=qs[a.key||"Alt"],o=Wo.fromClass(class{constructor(u){this.view=u,this.isDown=!1}set(u){this.isDown!=u&&(this.isDown=u,this.view.update([]))}},{eventHandlers:{keydown(u){this.set(u.keyCode==t||n(u))},keyup(u){(u.keyCode==t||!n(u))&&this.set(!1)},mousemove(u){this.set(n(u))}}});return[o,Di.contentAttributes.of(u=>{var p;return!((p=u.plugin(o))===null||p===void 0)&&p.isDown?Bu:null})]}const Ha="-10000px";class Af{constructor(t,n,o){this.facet=n,this.createTooltipView=o,this.input=t.state.facet(n),this.tooltips=this.input.filter(u=>u),this.tooltipViews=this.tooltips.map(o)}update(t){var n;let o=t.state.facet(this.facet),u=o.filter(v=>v);if(o===this.input){for(let v of this.tooltipViews)v.update&&v.update(t);return!1}let p=[];for(let v=0;v<u.length;v++){let S=u[v],A=-1;if(S){for(let H=0;H<this.tooltips.length;H++){let X=this.tooltips[H];X&&X.create==S.create&&(A=H)}if(A<0)p[v]=this.createTooltipView(S);else{let H=p[v]=this.tooltipViews[A];H.update&&H.update(t)}}}for(let v of this.tooltipViews)p.indexOf(v)<0&&(v.dom.remove(),(n=v.destroy)===null||n===void 0||n.call(v));return this.input=o,this.tooltips=u,this.tooltipViews=p,!0}}function Ll(a={}){return ku.of(a)}function zf(a){let{win:t}=a;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const ku=ft.define({combine:a=>{var t,n,o;return{position:xr.ios?"absolute":((t=a.find(u=>u.position))===null||t===void 0?void 0:t.position)||"fixed",parent:((n=a.find(u=>u.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((o=a.find(u=>u.tooltipSpace))===null||o===void 0?void 0:o.tooltipSpace)||zf}}}),ju=Wo.fromClass(class{constructor(a){this.view=a,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let t=a.state.facet(ku);this.position=t.position,this.parent=t.parent,this.classes=a.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new Af(a,Uu,n=>this.createTooltip(n)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),a.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let a of this.manager.tooltipViews)this.intersectionObserver.observe(a.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(a){a.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(a);t&&this.observeIntersection();let n=t||a.geometryChanged,o=a.state.facet(ku);if(o.position!=this.position){this.position=o.position;for(let u of this.manager.tooltipViews)u.dom.style.position=this.position;n=!0}if(o.parent!=this.parent){this.parent&&this.container.remove(),this.parent=o.parent,this.createContainer();for(let u of this.manager.tooltipViews)this.container.appendChild(u.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(a){let t=a.create(this.view);if(t.dom.classList.add("cm-tooltip"),a.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let n=document.createElement("div");n.className="cm-tooltip-arrow",t.dom.appendChild(n)}return t.dom.style.position=this.position,t.dom.style.top=Ha,this.container.appendChild(t.dom),t.mount&&t.mount(this.view),t}destroy(){var a,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(a=n.destroy)===null||a===void 0||a.call(n);(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let a=this.view.dom.getBoundingClientRect();return{editor:a,parent:this.parent?this.container.getBoundingClientRect():a,pos:this.manager.tooltips.map((t,n)=>{let o=this.manager.tooltipViews[n];return o.getCoords?o.getCoords(t.pos):this.view.coordsAtPos(t.pos)}),size:this.manager.tooltipViews.map(({dom:t})=>t.getBoundingClientRect()),space:this.view.state.facet(ku).tooltipSpace(this.view)}}writeMeasure(a){let{editor:t,space:n}=a,o=[];for(let u=0;u<this.manager.tooltips.length;u++){let p=this.manager.tooltips[u],v=this.manager.tooltipViews[u],{dom:S}=v,A=a.pos[u],H=a.size[u];if(!A||A.bottom<=Math.max(t.top,n.top)||A.top>=Math.min(t.bottom,n.bottom)||A.right<Math.max(t.left,n.left)-.1||A.left>Math.min(t.right,n.right)+.1){S.style.top=Ha;continue}let X=p.arrow?v.dom.querySelector(".cm-tooltip-arrow"):null,Me=X?7:0,gt=H.right-H.left,It=H.bottom-H.top,un=v.offset||Rf,or=this.view.textDirection==ts.LTR,ar=H.width>n.right-n.left?or?n.left:n.right-H.width:or?Math.min(A.left-(X?14:0)+un.x,n.right-gt):Math.max(n.left,A.left-gt+(X?14:0)-un.x),wr=!!p.above;!p.strictSide&&(wr?A.top-(H.bottom-H.top)-un.y<n.top:A.bottom+(H.bottom-H.top)+un.y>n.bottom)&&wr==n.bottom-A.bottom>A.top-n.top&&(wr=!wr);let Si=(wr?A.top-n.top:n.bottom-A.bottom)-Me;if(Si<It&&v.resize!==!1){if(Si<this.view.defaultLineHeight){S.style.top=Ha;continue}S.style.height=(It=Si)+"px"}else S.style.height&&(S.style.height="");let ki=wr?A.top-It-Me-un.y:A.bottom+Me+un.y,mi=ar+gt;if(v.overlap!==!0)for(let Ci of o)Ci.left<mi&&Ci.right>ar&&Ci.top<ki+It&&Ci.bottom>ki&&(ki=wr?Ci.top-It-2-Me:Ci.bottom+Me+2);this.position=="absolute"?(S.style.top=ki-a.parent.top+"px",S.style.left=ar-a.parent.left+"px"):(S.style.top=ki+"px",S.style.left=ar+"px"),X&&(X.style.left=`${A.left+(or?un.x:-un.x)-(ar+14-7)}px`),v.overlap!==!0&&o.push({left:ar,top:ki,right:mi,bottom:ki+It}),S.classList.toggle("cm-tooltip-above",wr),S.classList.toggle("cm-tooltip-below",!wr),v.positioned&&v.positioned(a.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let a of this.manager.tooltipViews)a.dom.style.top=Ha}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),xu=Di.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:`${7}px`,width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:`${7}px solid transparent`,borderRight:`${7}px solid transparent`},".cm-tooltip-above &":{bottom:`-${7}px`,"&:before":{borderTop:`${7}px solid #bbb`},"&:after":{borderTop:`${7}px solid #f5f5f5`,bottom:"1px"}},".cm-tooltip-below &":{top:`-${7}px`,"&:before":{borderBottom:`${7}px solid #bbb`},"&:after":{borderBottom:`${7}px solid #f5f5f5`,top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Rf={x:0,y:0},Uu=ft.define({enables:[ju,xu]}),Za=ft.define();class xc{constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Af(t,Za,n=>this.createHostedView(n))}static create(t){return new xc(t)}createHostedView(t){let n=t.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(n.dom),this.mounted&&n.mount&&n.mount(this.view),n}mount(t){for(let n of this.manager.tooltipViews)n.mount&&n.mount(t);this.mounted=!0}positioned(t){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(t)}update(t){this.manager.update(t)}}const Ka=Uu.compute([Za],a=>{let t=a.facet(Za).filter(n=>n);return t.length===0?null:{pos:Math.min(...t.map(n=>n.pos)),end:Math.max(...t.filter(n=>n.end!=null).map(n=>n.end)),create:xc.create,above:t[0].above,arrow:t.some(n=>n.arrow)}});class $o{constructor(t,n,o,u,p){this.view=t,this.source=n,this.field=o,this.setHover=u,this.hoverTime=p,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let t=Date.now()-this.lastMove.time;t<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{lastMove:t}=this,n=this.view.contentDOM.contains(t.target)?this.view.posAtCoords(t):null;if(n==null)return;let o=this.view.coordsAtPos(n);if(o==null||t.y<o.top||t.y>o.bottom||t.x<o.left-this.view.defaultCharacterWidth||t.x>o.right+this.view.defaultCharacterWidth)return;let u=this.view.bidiSpans(this.view.state.doc.lineAt(n)).find(S=>S.from<=n&&S.to>=n),p=u&&u.dir==ts.RTL?-1:1,v=this.source(this.view,n,t.x<o.left?-p:p);if(v?.then){let S=this.pending={pos:n};v.then(A=>{this.pending==S&&(this.pending=null,A&&this.view.dispatch({effects:this.setHover.of(A)}))},A=>Ls(this.view.state,A,"hover tooltip"))}else v&&this.view.dispatch({effects:this.setHover.of(v)})}mousemove(t){var n;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let o=this.active;if(o&&!Bs(this.lastMove.target)||this.pending){let{pos:u}=o||this.pending,p=(n=o?.end)!==null&&n!==void 0?n:u;(u==p?this.view.posAtCoords(this.lastMove)!=u:!ks(this.view,u,p,t.clientX,t.clientY,6))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!Bs(t.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function Bs(a){for(let t=a;t;t=t.parentNode)if(t.nodeType==1&&t.classList.contains("cm-tooltip"))return!0;return!1}function ks(a,t,n,o,u,p){let v=document.createRange(),S=a.domAtPos(t),A=a.domAtPos(n);v.setEnd(A.node,A.offset),v.setStart(S.node,S.offset);let H=v.getClientRects();v.detach();for(let X=0;X<H.length;X++){let Me=H[X];if(Math.max(Me.top-u,u-Me.bottom,Me.left-o,o-Me.right)<=p)return!0}return!1}function zs(a,t={}){let n=Et.define(),o=Ut.define({create(){return null},update(u,p){if(u&&(t.hideOnChange&&(p.docChanged||p.selection)||t.hideOn&&t.hideOn(p,u)))return null;if(u&&p.docChanged){let v=p.changes.mapPos(u.pos,-1,Jt.TrackDel);if(v==null)return null;let S=Object.assign(Object.create(null),u);S.pos=v,u.end!=null&&(S.end=p.changes.mapPos(u.end)),u=S}for(let v of p.effects)v.is(n)&&(u=v.value),v.is(Vs)&&(u=null);return u},provide:u=>Za.from(u)});return[o,Wo.define(u=>new $o(u,a,o,n,t.hoverTime||300)),Ka]}function Ga(a,t){let n=a.plugin(ju);if(!n)return null;let o=n.manager.tooltips.indexOf(t);return o<0?null:n.manager.tooltipViews[o]}function Wu(a){return a.facet(Za).some(t=>t)}const Vs=Et.define(),Qc=null;function zu(a){var t;(t=a.plugin(ju))===null||t===void 0||t.maybeMeasure()}const Vu=ft.define({combine(a){let t,n;for(let o of a)t=t||o.topContainer,n=n||o.bottomContainer;return{topContainer:t,bottomContainer:n}}});function Vf(a){return a?[Vu.of(a)]:[]}function gl(a,t){let n=a.plugin(Ma),o=n?n.specs.indexOf(t):-1;return o>-1?n.panels[o]:null}const Ma=Wo.fromClass(class{constructor(a){this.input=a.state.facet(pi),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(a));let t=a.state.facet(Vu);this.top=new Hu(a,!0,t.topContainer),this.bottom=new Hu(a,!1,t.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(a){let t=a.state.facet(Vu);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new Hu(a.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new Hu(a.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=a.state.facet(pi);if(n!=this.input){let o=n.filter(A=>A),u=[],p=[],v=[],S=[];for(let A of o){let H=this.specs.indexOf(A),X;H<0?(X=A(a.view),S.push(X)):(X=this.panels[H],X.update&&X.update(a)),u.push(X),(X.top?p:v).push(X)}this.specs=o,this.panels=u,this.top.sync(p),this.bottom.sync(v);for(let A of S)A.dom.classList.add("cm-panel"),A.mount&&A.mount()}else for(let o of this.panels)o.update&&o.update(a)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:a=>Di.scrollMargins.of(t=>{let n=t.plugin(a);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Hu{constructor(t,n,o){this.view=t,this.top=n,this.container=o,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let n of this.panels)n.destroy&&t.indexOf(n)<0&&n.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let t=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;t!=n.dom;)t=sr(t);t=t.nextSibling}else this.dom.insertBefore(n.dom,t);for(;t;)t=sr(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function sr(a){let t=a.nextSibling;return a.remove(),t}const pi=ft.define({enables:Ma});class Mi extends Bi{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}Mi.prototype.elementClass="",Mi.prototype.toDOM=void 0,Mi.prototype.mapMode=Jt.TrackBefore,Mi.prototype.startSide=Mi.prototype.endSide=-1,Mi.prototype.point=!0;const Gi=ft.define(),ao={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>hi.empty,lineMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Io=ft.define();function os(a){return[Cu(),Io.of(Object.assign(Object.assign({},ao),a))]}const Vl=ft.define({combine:a=>a.some(t=>t)});function Cu(a){let t=[Cc];return a&&a.fixed===!1&&t.push(Vl.of(!0)),t}const Cc=Wo.fromClass(class{constructor(a){this.view=a,this.prevViewport=a.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=a.state.facet(Io).map(t=>new Hl(a,t));for(let t of this.gutters)this.dom.appendChild(t.dom);this.fixed=!a.state.facet(Vl),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),a.scrollDOM.insertBefore(this.dom,a.contentDOM)}update(a){if(this.updateGutters(a)){let t=this.prevViewport,n=a.view.viewport,o=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(o<(n.to-n.from)*.8)}a.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(Vl)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=a.view.viewport}syncGutters(a){let t=this.dom.nextSibling;a&&this.dom.remove();let n=hi.iter(this.view.state.facet(Gi),this.view.viewport.from),o=[],u=this.gutters.map(p=>new va(p,this.view.viewport,-this.view.documentPadding.top));for(let p of this.view.viewportLineBlocks){let v;if(Array.isArray(p.type)){for(let S of p.type)if(S.type==Ro.Text){v=S;break}}else v=p.type==Ro.Text?p:void 0;if(v){o.length&&(o=[]),Xc(n,o,p.from);for(let S of u)S.line(this.view,v,o)}}for(let p of u)p.finish();a&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(a){let t=a.startState.facet(Io),n=a.state.facet(Io),o=a.docChanged||a.heightChanged||a.viewportChanged||!hi.eq(a.startState.facet(Gi),a.state.facet(Gi),a.view.viewport.from,a.view.viewport.to);if(t==n)for(let u of this.gutters)u.update(a)&&(o=!0);else{o=!0;let u=[];for(let p of n){let v=t.indexOf(p);v<0?u.push(new Hl(this.view,p)):(this.gutters[v].update(a),u.push(this.gutters[v]))}for(let p of this.gutters)p.dom.remove(),u.indexOf(p)<0&&p.destroy();for(let p of u)this.dom.appendChild(p.dom);this.gutters=u}return o}destroy(){for(let a of this.gutters)a.destroy();this.dom.remove()}},{provide:a=>Di.scrollMargins.of(t=>{let n=t.plugin(a);return!n||n.gutters.length==0||!n.fixed?null:t.textDirection==ts.LTR?{left:n.dom.offsetWidth}:{right:n.dom.offsetWidth}})});function Jc(a){return Array.isArray(a)?a:[a]}function Xc(a,t,n){for(;a.value&&a.from<=n;)a.from==n&&t.push(a.value),a.next()}class va{constructor(t,n,o){this.gutter=t,this.height=o,this.i=0,this.cursor=hi.iter(t.markers,n.from)}line(t,n,o){let u=[];Xc(this.cursor,u,n.from),o.length&&(u=u.concat(o));let p=this.gutter.config.lineMarker(t,n,u);p&&u.unshift(p);let v=this.gutter;if(u.length==0&&!v.config.renderEmptyElements)return;let S=n.top-this.height;if(this.i==v.elements.length){let A=new Zl(t,n.height,S,u);v.elements.push(A),v.dom.appendChild(A.dom)}else v.elements[this.i].update(t,n.height,S,u);this.height=n.bottom,this.i++}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let n=t.elements.pop();t.dom.removeChild(n.dom),n.destroy()}}}class Hl{constructor(t,n){this.view=t,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let o in n.domEventHandlers)this.dom.addEventListener(o,u=>{let p=u.target,v;if(p!=this.dom&&this.dom.contains(p)){for(;p.parentNode!=this.dom;)p=p.parentNode;let A=p.getBoundingClientRect();v=(A.top+A.bottom)/2}else v=u.clientY;let S=t.lineBlockAtHeight(v-t.documentTop);n.domEventHandlers[o](t,S,u)&&u.preventDefault()});this.markers=Jc(n.markers(t)),n.initialSpacer&&(this.spacer=new Zl(t,0,0,[n.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let n=this.markers;if(this.markers=Jc(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let u=this.config.updateSpacer(this.spacer.markers[0],t);u!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[u])}let o=t.view.viewport;return!hi.eq(this.markers,n,o.from,o.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(t):!1)}destroy(){for(let t of this.elements)t.destroy()}}class Zl{constructor(t,n,o,u){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,n,o,u)}update(t,n,o,u){this.height!=n&&(this.dom.style.height=(this.height=n)+"px"),this.above!=o&&(this.dom.style.marginTop=(this.above=o)?o+"px":""),ol(this.markers,u)||this.setMarkers(t,u)}setMarkers(t,n){let o="cm-gutterElement",u=this.dom.firstChild;for(let p=0,v=0;;){let S=v,A=p<n.length?n[p++]:null,H=!1;if(A){let X=A.elementClass;X&&(o+=" "+X);for(let Me=v;Me<this.markers.length;Me++)if(this.markers[Me].compare(A)){S=Me,H=!0;break}}else S=this.markers.length;for(;v<S;){let X=this.markers[v++];if(X.toDOM){X.destroy(u);let Me=u.nextSibling;u.remove(),u=Me}}if(!A)break;A.toDOM&&(H?u=u.nextSibling:this.dom.insertBefore(A.toDOM(t),u)),H&&v++}this.dom.className=o,this.markers=n}destroy(){this.setMarkers(null,[])}}function ol(a,t){if(a.length!=t.length)return!1;for(let n=0;n<a.length;n++)if(!a[n].compare(t[n]))return!1;return!0}const hd=ft.define(),Zu=ft.define({combine(a){return Vi(a,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,n){let o=Object.assign({},t);for(let u in n){let p=o[u],v=n[u];o[u]=p?(S,A,H)=>p(S,A,H)||v(S,A,H):v}return o}})}});class If extends Mi{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function rd(a,t){return a.state.facet(Zu).formatNumber(t,a.state)}const Ku=Io.compute([Zu],a=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(t){return t.state.facet(hd)},lineMarker(t,n,o){return o.some(u=>u.toDOM)?null:new If(rd(t,t.state.doc.lineAt(n.from).number))},lineMarkerChange:t=>t.startState.facet(Zu)!=t.state.facet(Zu),initialSpacer(t){return new If(rd(t,Hf(t.state.doc.lines)))},updateSpacer(t,n){let o=rd(n.view,Hf(n.view.state.doc.lines));return o==t.number?t:new If(o)},domEventHandlers:a.facet(Zu).domEventHandlers}));function pd(a={}){return[Zu.of(a),Cu(),Ku]}function Hf(a){let t=9;for(;t<a;)t=t*10+9;return t}const Mc=new class extends Mi{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},id=Gi.compute(["selection"],a=>{let t=[],n=-1;for(let o of a.selection.ranges){let u=a.doc.lineAt(o.head).from;u>n&&(n=u,t.push(Mc.range(u)))}return hi.of(t)});function Sc(){return id}const od=new Map;function md(a){let t=od.get(a);return t||od.set(a,t=Lr.mark({attributes:a===" "?{class:"cm-highlightTab"}:{class:"cm-highlightSpace","data-display":a.replace(/ /g,"\xB7")}})),t}function Zf(a){return Wo.define(t=>({decorations:a.createDeco(t),update(n){this.decorations=a.updateDeco(n,this.decorations)}}),{decorations:t=>t.decorations})}const Kf=Zf(new ce({regexp:/\t| +/g,decoration:a=>md(a[0]),boundary:/\S/}));function kd(){return Kf}const Od=Zf(new ce({regexp:/\s+$/g,decoration:Lr.mark({class:"cm-trailingSpace"}),boundary:/\S/}));function Td(){return Od}const wd={HeightMap:Oo,HeightOracle:ac,MeasuredHeights:jc,QueryType:rs,ChangedRange:Ps,computeOrder:ka,moveVisually:nl};var Mu;const qc=new m;function Oc(a){return ft.define({combine:a?t=>t.concat(a):void 0})}class sl{constructor(t,n,o=[],u=""){this.data=t,this.name=u,ui.prototype.hasOwnProperty("tree")||Object.defineProperty(ui.prototype,"tree",{get(){return Z(this)}}),this.parser=n,this.extension=[mr.of(this),ui.languageData.of((p,v,S)=>p.facet(Rs(p,v,S)))].concat(o)}isActiveAt(t,n,o=-1){return Rs(t,n,o)==this.data}findRegions(t){let n=t.facet(mr);if(n?.data==this.data)return[{from:0,to:t.doc.length}];if(!n||!n.allowsNesting)return[];let o=[],u=(p,v)=>{if(p.prop(qc)==this.data){o.push({from:v,to:v+p.length});return}let S=p.prop(m.mounted);if(S){if(S.tree.prop(qc)==this.data){if(S.overlay)for(let A of S.overlay)o.push({from:A.from+v,to:A.to+v});else o.push({from:v,to:v+p.length});return}else if(S.overlay){let A=o.length;if(u(S.tree,S.overlay[0].from+v),o.length>A)return}}for(let A=0;A<p.children.length;A++){let H=p.children[A];H instanceof F&&u(H,p.positions[A]+v)}};return u(Z(t),0),o}get allowsNesting(){return!0}}sl.setState=Et.define();function Rs(a,t,n){let o=a.facet(mr);if(!o)return null;let u=o.data;if(o.allowsNesting)for(let p=Z(a).topNode;p;p=p.enter(t,n,R.ExcludeBuffers))u=p.type.prop(qc)||u;return u}class sd extends sl{constructor(t,n,o){super(t,n,[],o),this.parser=n}static define(t){let n=Oc(t.languageData);return new sd(n,t.parser.configure({props:[qc.add(o=>o.isTop?n:void 0)]}),t.name)}configure(t,n){return new sd(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Z(a){let t=a.field(sl.state,!1);return t?t.tree:F.empty}function me(a,t,n=50){var o;let u=(o=a.field(sl.state,!1))===null||o===void 0?void 0:o.context;if(!u)return null;let p=u.viewport;u.updateViewport({from:0,to:t});let v=u.isDone(t)||u.work(n,t)?u.tree:null;return u.updateViewport(p),v}function Le(a,t=a.doc.length){var n;return((n=a.field(sl.state,!1))===null||n===void 0?void 0:n.context.isDone(t))||!1}function nt(a,t=a.viewport.to,n=100){let o=me(a.state,t,n);return o!=Z(a.state)&&a.dispatch({}),!!o}function oe(a){var t;return((t=a.plugin(Dr))===null||t===void 0?void 0:t.isWorking())||!1}class wt{constructor(t,n=t.length){this.doc=t,this.length=n,this.cursorPos=0,this.string="",this.cursor=t.iter()}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,n){let o=this.cursorPos-this.string.length;return t<o||n>=this.cursorPos?this.doc.sliceString(t,n):this.string.slice(t-o,n-o)}}let Ft=null;class Je{constructor(t,n,o=[],u,p,v,S,A){this.parser=t,this.state=n,this.fragments=o,this.tree=u,this.treeLen=p,this.viewport=v,this.skipped=S,this.scheduleOn=A,this.parse=null,this.tempSkipped=[]}static create(t,n,o){return new Je(t,n,[],F.empty,0,o,[],null)}startParse(){return this.parser.startParse(new wt(this.state.doc),this.fragments)}work(t,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=F.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var o;if(typeof t=="number"){let u=Date.now()+t;t=()=>Date.now()>u}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let u=this.parse.advance();if(u)if(this.fragments=this.withoutTempSkipped(q.addTree(u,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(o=this.parse.stoppedAt)!==null&&o!==void 0?o:this.state.doc.length,this.tree=u,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(t())return!1}})}takeTree(){let t,n;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=t,this.tree=n,this.fragments=this.withoutTempSkipped(q.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let n=Ft;Ft=this;try{return t()}finally{Ft=n}}withoutTempSkipped(t){for(let n;n=this.tempSkipped.pop();)t=Nt(t,n.from,n.to);return t}changes(t,n){let{fragments:o,tree:u,treeLen:p,viewport:v,skipped:S}=this;if(this.takeTree(),!t.empty){let A=[];if(t.iterChangedRanges((H,X,Me,gt)=>A.push({fromA:H,toA:X,fromB:Me,toB:gt})),o=q.applyChanges(o,A),u=F.empty,p=0,v={from:t.mapPos(v.from,-1),to:t.mapPos(v.to,1)},this.skipped.length){S=[];for(let H of this.skipped){let X=t.mapPos(H.from,1),Me=t.mapPos(H.to,-1);X<Me&&S.push({from:X,to:Me})}}}return new Je(this.parser,n,o,u,p,v,S,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let n=this.skipped.length;for(let o=0;o<this.skipped.length;o++){let{from:u,to:p}=this.skipped[o];u<t.to&&p>t.from&&(this.fragments=Nt(this.fragments,u,p),this.skipped.splice(o--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,n){this.skipped.push({from:t,to:n})}static getSkippingParser(t){return new class extends ee{createParse(n,o,u){let p=u[0].from,v=u[u.length-1].to;return{parsedPos:p,advance(){let A=Ft;if(A){for(let H of u)A.tempSkipped.push(H);t&&(A.scheduleOn=A.scheduleOn?Promise.all([A.scheduleOn,t]):t)}return this.parsedPos=v,new F(P.none,[],[],v-p)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let n=this.fragments;return this.treeLen>=t&&n.length&&n[0].from==0&&n[0].to>=t}static get(){return Ft}}function Nt(a,t,n){return q.applyChanges(a,[{fromA:t,toA:n,fromB:t,toB:n}])}class sn{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),o=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,o)||n.takeTree(),new sn(n)}static init(t){let n=Math.min(3e3,t.doc.length),o=Je.create(t.facet(mr).parser,t,{from:0,to:n});return o.work(20,n)||o.takeTree(),new sn(o)}}sl.state=Ut.define({create:sn.init,update(a,t){for(let n of t.effects)if(n.is(sl.setState))return n.value;return t.startState.facet(mr)!=t.state.facet(mr)?sn.init(t.state):a.apply(t)}});let Dn=a=>{let t=setTimeout(()=>a(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<"u"&&(Dn=a=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(a,{timeout:500-100})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const Kn=typeof navigator<"u"&&(!((Mu=navigator.scheduling)===null||Mu===void 0)&&Mu.isInputPending)?()=>navigator.scheduling.isInputPending():null,Dr=Wo.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let n=this.view.state.field(sl.state).context;(n.updateViewport(t.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),t.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:t}=this.view,n=t.field(sl.state);(n.tree!=n.context.tree||!n.context.isDone(t.doc.length))&&(this.working=Dn(this.work))}work(t){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:o,viewport:{to:u}}=this.view,p=o.field(sl.state);if(p.tree==p.context.tree&&p.context.isDone(u+1e5))return;let v=Date.now()+Math.min(this.chunkBudget,100,t&&!Kn?Math.max(25,t.timeRemaining()-5):1e9),S=p.context.treeLen<u&&o.doc.length>u+1e3,A=p.context.work(()=>Kn&&Kn()||Date.now()>v,u+(S?0:1e5));this.chunkBudget-=Date.now()-n,(A||this.chunkBudget<=0)&&(p.context.takeTree(),this.view.dispatch({effects:sl.setState.of(new sn(p.context))})),this.chunkBudget>0&&!(A&&!S)&&this.scheduleWork(),this.checkAsyncSchedule(p.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Ls(this.view.state,n)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),mr=ft.define({combine(a){return a.length?a[0]:null},enables:a=>[sl.state,Dr,Di.contentAttributes.compute([a],t=>{let n=t.facet(a);return n&&n.name?{"data-language":n.name}:{}})]});class Nr{constructor(t,n=[]){this.language=t,this.support=n,this.extension=[t,n]}}class ti{constructor(t,n,o,u,p,v=void 0){this.name=t,this.alias=n,this.extensions=o,this.filename=u,this.loadFunc=p,this.support=v,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(t=>this.support=t,t=>{throw this.loading=null,t}))}static of(t){let{load:n,support:o}=t;if(!n){if(!o)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(o)}return new ti(t.name,(t.alias||[]).concat(t.name).map(u=>u.toLowerCase()),t.extensions||[],t.filename,n,o)}static matchFilename(t,n){for(let u of t)if(u.filename&&u.filename.test(n))return u;let o=/\.([^.]+)$/.exec(n);if(o){for(let u of t)if(u.extensions.indexOf(o[1])>-1)return u}return null}static matchLanguageName(t,n,o=!0){n=n.toLowerCase();for(let u of t)if(u.alias.some(p=>p==n))return u;if(o)for(let u of t)for(let p of u.alias){let v=n.indexOf(p);if(v>-1&&(p.length>2||!/\w/.test(n[v-1])&&!/\w/.test(n[v+p.length])))return u}return null}}const Tr=ft.define(),Ai=ft.define({combine:a=>{if(!a.length)return" ";if(!/^(?: +|\t+)$/.test(a[0]))throw new Error("Invalid indent unit: "+JSON.stringify(a[0]));return a[0]}});function Yi(a){let t=a.facet(Ai);return t.charCodeAt(0)==9?a.tabSize*t.length:t.length}function yi(a,t){let n="",o=a.tabSize;if(a.facet(Ai).charCodeAt(0)==9)for(;t>=o;)n+=" ",t-=o;for(let u=0;u<t;u++)n+=" ";return n}function Ji(a,t){a instanceof ui&&(a=new Ri(a));for(let o of a.state.facet(Tr)){let u=o(a,t);if(u!==void 0)return u}let n=Z(a.state);return n?vo(a,n,t):null}function ko(a,t,n){let o=Object.create(null),u=new Ri(a,{overrideIndentation:v=>{var S;return(S=o[v])!==null&&S!==void 0?S:-1}}),p=[];for(let v=t;v<=n;){let S=a.doc.lineAt(v);v=S.to+1;let A=Ji(u,S.from);if(A==null)continue;/\S/.test(S.text)||(A=0);let H=/^\s*/.exec(S.text)[0],X=yi(a,A);H!=X&&(o[S.from]=A,p.push({from:S.from,to:S.from+H.length,insert:X}))}return a.changes(p)}class Ri{constructor(t,n={}){this.state=t,this.options=n,this.unit=Yi(t)}lineAt(t,n=1){let o=this.state.doc.lineAt(t),{simulateBreak:u,simulateDoubleBreak:p}=this.options;return u!=null&&u>=o.from&&u<=o.to?p&&u==t?{text:"",from:t}:(n<0?u<t:u<=t)?{text:o.text.slice(u-o.from),from:u}:{text:o.text.slice(0,u-o.from),from:o.from}:o}textAfterPos(t,n=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:o,from:u}=this.lineAt(t,n);return o.slice(t-u,Math.min(o.length,t+100-u))}column(t,n=1){let{text:o,from:u}=this.lineAt(t,n),p=this.countColumn(o,t-u),v=this.options.overrideIndentation?this.options.overrideIndentation(u):-1;return v>-1&&(p+=v-this.countColumn(o,o.search(/\S|$/))),p}countColumn(t,n=t.length){return Ur(t,this.state.tabSize,n)}lineIndent(t,n=1){let{text:o,from:u}=this.lineAt(t,n),p=this.options.overrideIndentation;if(p){let v=p(u);if(v>-1)return v}return this.countColumn(o,o.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const jo=new m;function vo(a,t,n){return fs(t.resolveInner(n).enterUnfinishedNodesBefore(n),n,a)}function Cs(a){return a.pos==a.options.simulateBreak&&a.options.simulateDoubleBreak}function al(a){let t=a.type.prop(jo);if(t)return t;let n=a.firstChild,o;if(n&&(o=n.type.prop(m.closedBy))){let u=a.lastChild,p=u&&o.indexOf(u.name)>-1;return v=>Ya(v,!0,1,void 0,p&&!Cs(v)?u.from:void 0)}return a.parent==null?ps:null}function fs(a,t,n){for(;a;a=a.parent){let o=al(a);if(o)return o(ys.create(n,t,a))}return null}function ps(){return 0}class ys extends Ri{constructor(t,n,o){super(t.state,t.options),this.base=t,this.pos=n,this.node=o}static create(t,n,o){return new ys(t,n,o)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let t=this.state.doc.lineAt(this.node.from);for(;;){let n=this.node.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(Xi(n,this.node))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){let t=this.node.parent;return t?fs(t,this.pos,this.base):0}}function Xi(a,t){for(let n=t;n;n=n.parent)if(a==n)return!0;return!1}function ls(a){let t=a.node,n=t.childAfter(t.from),o=t.lastChild;if(!n)return null;let u=a.options.simulateBreak,p=a.state.doc.lineAt(n.from),v=u==null||u<=p.from?p.to:Math.min(p.to,u);for(let S=n.to;;){let A=t.childAfter(S);if(!A||A==o)return null;if(!A.type.isSkipped)return A.from<v?n:null;S=A.to}}function _a({closing:a,align:t=!0,units:n=1}){return o=>Ya(o,t,n,a)}function Ya(a,t,n,o,u){let p=a.textAfter,v=p.match(/^\s*/)[0].length,S=o&&p.slice(v,v+o.length)==o||u==a.pos+v,A=t?ls(a):null;return A?S?a.column(A.from):a.column(A.to):a.baseIndent+(S?0:a.unit*n)}const ea=a=>a.baseIndent;function ll({except:a,units:t=1}={}){return n=>{let o=a&&a.test(n.textAfter);return n.baseIndent+(o?0:t*n.unit)}}const vl=200;function c(){return ui.transactionFilter.of(a=>{if(!a.docChanged||!a.isUserEvent("input.type")&&!a.isUserEvent("input.complete"))return a;let t=a.startState.languageDataAt("indentOnInput",a.startState.selection.main.head);if(!t.length)return a;let n=a.newDoc,{head:o}=a.newSelection.main,u=n.lineAt(o);if(o>u.from+vl)return a;let p=n.sliceString(u.from,o);if(!t.some(H=>H.test(p)))return a;let{state:v}=a,S=-1,A=[];for(let{head:H}of v.selection.ranges){let X=v.doc.lineAt(H);if(X.from==S)continue;S=X.from;let Me=Ji(v,X.from);if(Me==null)continue;let gt=/^\s*/.exec(X.text)[0],It=yi(v,Me);gt!=It&&A.push({from:X.from,to:X.from+gt.length,insert:It})}return A.length?[a,{changes:A,sequential:!0}]:a})}const h=ft.define(),M=new m;function I(a){let t=a.firstChild,n=a.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?a.to:n.from}:null}function Q(a,t,n){let o=Z(a);if(o.length<n)return null;let u=o.resolveInner(n,1),p=null;for(let v=u;v;v=v.parent){if(v.to<=n||v.from>n)continue;if(p&&v.from<t)break;let S=v.type.prop(M);if(S&&(v.to<o.length-50||o.length==a.doc.length||!se(v))){let A=S(v,a);A&&A.from<=n&&A.from>=t&&A.to>n&&(p=A)}}return p}function se(a){let t=a.lastChild;return t&&t.to==a.to&&t.type.isError}function Ve(a,t,n){for(let o of a.facet(h)){let u=o(a,t,n);if(u)return u}return Q(a,t,n)}function Gt(a,t){let n=t.mapPos(a.from,1),o=t.mapPos(a.to,-1);return n>=o?void 0:{from:n,to:o}}const pn=Et.define({map:Gt}),ir=Et.define({map:Gt});function zr(a){let t=[];for(let{head:n}of a.state.selection.ranges)t.some(o=>o.from<=n&&o.to>=n)||t.push(a.lineBlockAt(n));return t}const kr=Ut.define({create(){return Lr.none},update(a,t){a=a.map(t.changes);for(let n of t.effects)n.is(pn)&&!Ii(a,n.value.from,n.value.to)?a=a.update({add:[Sa.range(n.value.from,n.value.to)]}):n.is(ir)&&(a=a.update({filter:(o,u)=>n.value.from!=o||n.value.to!=u,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let n=!1,{head:o}=t.selection.main;a.between(o,o,(u,p)=>{u<o&&p>o&&(n=!0)}),n&&(a=a.update({filterFrom:o,filterTo:o,filter:(u,p)=>p<=o||u>=o}))}return a},provide:a=>Di.decorations.from(a),toJSON(a,t){let n=[];return a.between(0,t.doc.length,(o,u)=>{n.push(o,u)}),n},fromJSON(a){if(!Array.isArray(a)||a.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<a.length;){let o=a[n++],u=a[n++];if(typeof o!="number"||typeof u!="number")throw new RangeError("Invalid JSON for fold state");t.push(Sa.range(o,u))}return Lr.set(t,!0)}});function Hr(a){return a.field(kr,!1)||RangeSet.empty}function Ei(a,t,n){var o;let u=null;return(o=a.field(kr,!1))===null||o===void 0||o.between(t,n,(p,v)=>{(!u||u.from>p)&&(u={from:p,to:v})}),u}function Ii(a,t,n){let o=!1;return a.between(t,t,(u,p)=>{u==t&&p==n&&(o=!0)}),o}function Ni(a,t){return a.field(kr,!1)?t:t.concat(Et.appendConfig.of(fo()))}const ia=a=>{for(let t of zr(a)){let n=Ve(a.state,t.from,t.to);if(n)return a.dispatch({effects:Ni(a.state,[pn.of(n),wn(a,n)])}),!0}return!1},Zn=a=>{if(!a.state.field(kr,!1))return!1;let t=[];for(let n of zr(a)){let o=Ei(a.state,n.from,n.to);o&&t.push(ir.of(o),wn(a,o,!1))}return t.length&&a.dispatch({effects:t}),t.length>0};function wn(a,t,n=!0){let o=a.state.doc.lineAt(t.from).number,u=a.state.doc.lineAt(t.to).number;return Di.announce.of(`${a.state.phrase(n?"Folded lines":"Unfolded lines")} ${o} ${a.state.phrase("to")} ${u}.`)}const Ui=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:ia},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Zn},{key:"Ctrl-Alt-[",run:a=>{let{state:t}=a,n=[];for(let o=0;o<t.doc.length;){let u=a.lineBlockAt(o),p=Ve(t,u.from,u.to);p&&n.push(pn.of(p)),o=(p?a.lineBlockAt(p.to):u).to+1}return n.length&&a.dispatch({effects:Ni(a.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:a=>{let t=a.state.field(kr,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,a.state.doc.length,(o,u)=>{n.push(ir.of({from:o,to:u}))}),a.dispatch({effects:n}),!0}}],io={placeholderDOM:null,placeholderText:"\u2026"},ro=ft.define({combine(a){return Vi(a,io)}});function fo(a){let t=[kr,g0];return a&&t.push(ro.of(a)),t}const Sa=Lr.replace({widget:new class extends ba{toDOM(a){let{state:t}=a,n=t.facet(ro),o=p=>{let v=a.lineBlockAt(a.posAtDOM(p.target)),S=Ei(a.state,v.from,v.to);S&&a.dispatch({effects:ir.of(S)}),p.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(a,o);let u=document.createElement("span");return u.textContent=n.placeholderText,u.setAttribute("aria-label",t.phrase("folded code")),u.title=t.phrase("unfold"),u.className="cm-foldPlaceholder",u.onclick=o,u}}}),ss={openText:"\u2304",closedText:"\u203A",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Gu extends Mi{constructor(t,n){super(),this.config=t,this.open=n}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=t.state.phrase(this.open?"Fold line":"Unfold line"),n}}function yh(a={}){let t=Object.assign(Object.assign({},ss),a),n=new Gu(t,!0),o=new Gu(t,!1),u=Wo.fromClass(class{constructor(v){this.from=v.viewport.from,this.markers=this.buildMarkers(v)}update(v){(v.docChanged||v.viewportChanged||v.startState.facet(mr)!=v.state.facet(mr)||v.startState.field(kr,!1)!=v.state.field(kr,!1)||Z(v.startState)!=Z(v.state)||t.foldingChanged(v))&&(this.markers=this.buildMarkers(v.view))}buildMarkers(v){let S=new Uo;for(let A of v.viewportLineBlocks){let H=Ei(v.state,A.from,A.to)?o:Ve(v.state,A.from,A.to)?n:null;H&&S.add(A.from,A.from,H)}return S.finish()}}),{domEventHandlers:p}=t;return[u,os({class:"cm-foldGutter",markers(v){var S;return((S=v.plugin(u))===null||S===void 0?void 0:S.markers)||hi.empty},initialSpacer(){return new Gu(t,!1)},domEventHandlers:Object.assign(Object.assign({},p),{click:(v,S,A)=>{if(p.click&&p.click(v,S,A))return!0;let H=Ei(v.state,S.from,S.to);if(H)return v.dispatch({effects:ir.of(H)}),!0;let X=Ve(v.state,S.from,S.to);return X?(v.dispatch({effects:pn.of(X)}),!0):!1}})}),fo()]}const g0=Di.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Dd{constructor(t,n){this.specs=t;let o;function u(S){let A=pr.newName();return(o||(o=Object.create(null)))["."+A]=S,A}const p=typeof n.all=="string"?n.all:n.all?u(n.all):void 0,v=n.scope;this.scope=v instanceof sl?S=>S.prop(qc)==v.data:v?S=>S==v:void 0,this.style=Vr(t.map(S=>({tag:S.tag,class:S.class||u(Object.assign({},S,{tag:null}))})),{all:p}).style,this.module=o?new pr(o):null,this.themeType=n.themeType}static define(t,n){return new Dd(t,n||{})}}const Eh=ft.define(),sp=ft.define({combine(a){return a.length?[a[0]]:null}});function jd(a){let t=a.facet(Eh);return t.length?t:a.facet(sp)}function ap(a,t){let n=[y0],o;return a instanceof Dd&&(a.module&&n.push(Di.styleModule.of(a.module)),o=a.themeType),t?.fallback?n.push(sp.of(a)):o?n.push(Eh.computeN([Di.darkTheme],u=>u.facet(Di.darkTheme)==(o=="dark")?[a]:[])):n.push(Eh.of(a)),n}function Ky(a,t,n){let o=jd(a),u=null;if(o){for(let p of o)if(!p.scope||n&&p.scope(n)){let v=p.style(t);v&&(u=u?u+" "+v:v)}}return u}class v0{constructor(t){this.markCache=Object.create(null),this.tree=Z(t.state),this.decorations=this.buildDeco(t,jd(t.state))}update(t){let n=Z(t.state),o=jd(t.state),u=o!=jd(t.startState);n.length<t.view.viewport.to&&!u&&n.type==this.tree.type?this.decorations=this.decorations.map(t.changes):(n!=this.tree||t.viewportChanged||u)&&(this.tree=n,this.decorations=this.buildDeco(t.view,o))}buildDeco(t,n){if(!n||!this.tree.length)return Lr.none;let o=new Uo;for(let{from:u,to:p}of t.visibleRanges)Ct(this.tree,n,(v,S,A)=>{o.add(v,S,this.markCache[A]||(this.markCache[A]=Lr.mark({class:A})))},u,p);return o.finish()}}const y0=xn.high(Wo.fromClass(v0,{decorations:a=>a.decorations})),E0=Dd.define([{tag:Ke.meta,color:"#404740"},{tag:Ke.link,textDecoration:"underline"},{tag:Ke.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Ke.emphasis,fontStyle:"italic"},{tag:Ke.strong,fontWeight:"bold"},{tag:Ke.strikethrough,textDecoration:"line-through"},{tag:Ke.keyword,color:"#708"},{tag:[Ke.atom,Ke.bool,Ke.url,Ke.contentSeparator,Ke.labelName],color:"#219"},{tag:[Ke.literal,Ke.inserted],color:"#164"},{tag:[Ke.string,Ke.deleted],color:"#a11"},{tag:[Ke.regexp,Ke.escape,Ke.special(Ke.string)],color:"#e40"},{tag:Ke.definition(Ke.variableName),color:"#00f"},{tag:Ke.local(Ke.variableName),color:"#30a"},{tag:[Ke.typeName,Ke.namespace],color:"#085"},{tag:Ke.className,color:"#167"},{tag:[Ke.special(Ke.variableName),Ke.macroName],color:"#256"},{tag:Ke.definition(Ke.propertyName),color:"#00c"},{tag:Ke.comment,color:"#940"},{tag:Ke.invalid,color:"#f00"}]),b0=Di.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),lp=1e4,up="()[]{}",cp=ft.define({combine(a){return Vi(a,{afterCursor:!0,brackets:up,maxScanDistance:lp,renderMatch:M0})}}),x0=Lr.mark({class:"cm-matchingBracket"}),C0=Lr.mark({class:"cm-nonmatchingBracket"});function M0(a){let t=[],n=a.matched?x0:C0;return t.push(n.range(a.start.from,a.start.to)),a.end&&t.push(n.range(a.end.from,a.end.to)),t}const S0=[Ut.define({create(){return Lr.none},update(a,t){if(!t.docChanged&&!t.selection)return a;let n=[],o=t.state.facet(cp);for(let u of t.state.selection.ranges){if(!u.empty)continue;let p=ef(t.state,u.head,-1,o)||u.head>0&&ef(t.state,u.head-1,1,o)||o.afterCursor&&(ef(t.state,u.head,1,o)||u.head<t.state.doc.length&&ef(t.state,u.head+1,-1,o));p&&(n=n.concat(o.renderMatch(p,t.state)))}return Lr.set(n,!0)},provide:a=>Di.decorations.from(a)}),b0];function O0(a={}){return[cp.of(a),S0]}const T0=new m;function bh(a,t,n){let o=a.prop(t<0?m.openedBy:m.closedBy);if(o)return o;if(a.name.length==1){let u=n.indexOf(a.name);if(u>-1&&u%2==(t<0?1:0))return[n[u+t]]}return null}function xh(a){let t=a.type.prop(T0);return t?t(a.node):a}function ef(a,t,n,o={}){let u=o.maxScanDistance||lp,p=o.brackets||up,v=Z(a),S=v.resolveInner(t,n);for(let A=S;A;A=A.parent){let H=bh(A.type,n,p);if(H&&A.from<A.to){let X=xh(A);if(X&&(n>0?t>=X.from&&t<X.to:t>X.from&&t<=X.to))return w0(a,t,n,A,X,H,p)}}return D0(a,t,n,v,S.type,u,p)}function w0(a,t,n,o,u,p,v){let S=o.parent,A={from:u.from,to:u.to},H=0,X=S?.cursor();if(X&&(n<0?X.childBefore(o.from):X.childAfter(o.to)))do if(n<0?X.to<=o.from:X.from>=o.to){if(H==0&&p.indexOf(X.type.name)>-1&&X.from<X.to){let Me=xh(X);return{start:A,end:Me?{from:Me.from,to:Me.to}:void 0,matched:!0}}else if(bh(X.type,n,v))H++;else if(bh(X.type,-n,v)){if(H==0){let Me=xh(X);return{start:A,end:Me&&Me.from<Me.to?{from:Me.from,to:Me.to}:void 0,matched:!1}}H--}}while(n<0?X.prevSibling():X.nextSibling());return{start:A,matched:!1}}function D0(a,t,n,o,u,p,v){let S=n<0?a.sliceDoc(t-1,t):a.sliceDoc(t,t+1),A=v.indexOf(S);if(A<0||A%2==0!=n>0)return null;let H={from:n<0?t-1:t,to:n>0?t+1:t},X=a.doc.iterRange(t,n>0?a.doc.length:0),Me=0;for(let gt=0;!X.next().done&&gt<=p;){let It=X.value;n<0&&(gt+=It.length);let un=t+gt*n;for(let or=n>0?0:It.length-1,ar=n>0?It.length:-1;or!=ar;or+=n){let wr=v.indexOf(It[or]);if(!(wr<0||o.resolveInner(un+or,1).type!=u))if(wr%2==0==n>0)Me++;else{if(Me==1)return{start:H,end:{from:un+or,to:un+or+1},matched:wr>>1==A>>1};Me--}}n>0&&(gt+=It.length)}return X.done?{start:H,matched:!1}:null}function fp(a,t,n,o=0,u=0){t==null&&(t=a.search(/[^\s\u00a0]/),t==-1&&(t=a.length));let p=u;for(let v=o;v<t;v++)a.charCodeAt(v)==9?p+=n-p%n:p++;return p}class dp{constructor(t,n,o){this.string=t,this.tabSize=n,this.indentUnit=o,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(t){let n=this.string.charAt(this.pos),o;if(typeof t=="string"?o=n==t:o=n&&(t instanceof RegExp?t.test(n):t(n)),o)return++this.pos,n}eatWhile(t){let n=this.pos;for(;this.eat(t););return this.pos>n}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let n=this.string.indexOf(t,this.pos);if(n>-1)return this.pos=n,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=fp(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){return fp(this.string,null,this.tabSize)}match(t,n,o){if(typeof t=="string"){let u=v=>o?v.toLowerCase():v,p=this.string.substr(this.pos,t.length);return u(p)==u(t)?(n!==!1&&(this.pos+=t.length),!0):null}else{let u=this.string.slice(this.pos).match(t);return u&&u.index>0?null:(u&&n!==!1&&(this.pos+=u[0].length),u)}}current(){return this.string.slice(this.start,this.pos)}}function P0(a){return{name:a.name||"",token:a.token,blankLine:a.blankLine||(()=>{}),startState:a.startState||(()=>!0),copyState:a.copyState||A0,indent:a.indent||(()=>null),languageData:a.languageData||{},tokenTable:a.tokenTable||Mh}}function A0(a){if(typeof a!="object")return a;let t={};for(let n in a){let o=a[n];t[n]=o instanceof Array?o.slice():o}return t}class hp extends null{constructor(t){let n=Oc(t.languageData),o=P0(t),u,p=new class extends Parser{createParse(v,S,A){return new I0(u,v,S,A)}};super(n,p,[Tr.of((v,S)=>this.getIndent(v,S))],t.name),this.topNode=$0(n),u=this,this.streamParser=o,this.stateAfter=new NodeProp({perNode:!0}),this.tokenTable=t.tokenTable?new yp(o.tokenTable):L0}static define(t){return new hp(t)}getIndent(t,n){let o=Z(t.state),u=o.resolve(n);for(;u&&u.type!=this.topNode;)u=u.parent;if(!u)return null;let p=Ch(this,o,0,u.from,n),v,S;if(p?(S=p.state,v=p.pos+1):(S=this.streamParser.startState(t.unit),v=0),n-v>1e4)return null;for(;v<n;){let H=t.state.doc.lineAt(v),X=Math.min(n,H.to);if(H.length){let Me=new dp(H.text,t.state.tabSize,t.unit);for(;Me.pos<X-H.from;)mp(this.streamParser.token,Me,S)}else this.streamParser.blankLine(S,t.unit);if(X==n)break;v=H.to+1}let{text:A}=t.lineAt(n);return this.streamParser.indent(S,/^\s*(.*)/.exec(A)[1],t)}get allowsNesting(){return!1}}function Ch(a,t,n,o,u){let p=n>=o&&n+t.length<=u&&t.prop(a.stateAfter);if(p)return{state:a.streamParser.copyState(p),pos:n+t.length};for(let v=t.children.length-1;v>=0;v--){let S=t.children[v],A=n+t.positions[v],H=S instanceof Tree&&A<u&&Ch(a,S,A,o,u);if(H)return H}return null}function pp(a,t,n,o,u){if(u&&n<=0&&o>=t.length)return t;!u&&t.type==a.topNode&&(u=!0);for(let p=t.children.length-1;p>=0;p--){let v=t.positions[p],S=t.children[p],A;if(v<o&&S instanceof Tree){if(!(A=pp(a,S,n-v,o-v,u)))break;return u?new Tree(t.type,t.children.slice(0,p).concat(A),t.positions.slice(0,p+1),v+A.length):A}}return null}function R0(a,t,n,o){for(let u of t){let p=u.from+(u.openStart?25:0),v=u.to-(u.openEnd?25:0),S=p<=n&&v>n&&Ch(a,u.tree,0-u.offset,n,v),A;if(S&&(A=pp(a,u.tree,n+u.offset,S.pos+u.offset,!1)))return{state:S.state,tree:A}}return{state:a.streamParser.startState(o?Yi(o):4),tree:Tree.empty}}class I0{constructor(t,n,o,u){this.lang=t,this.input=n,this.fragments=o,this.ranges=u,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=u[u.length-1].to;let p=Je.get(),v=u[0].from,{state:S,tree:A}=R0(t,o,v,p?.state);this.state=S,this.parsedPos=this.chunkStart=v+A.length;for(let H=0;H<A.children.length;H++)this.chunks.push(A.children[H]),this.chunkPos.push(A.positions[H]);p&&this.parsedPos<p.viewport.from-1e5&&(this.state=this.lang.streamParser.startState(Yi(p.state)),p.skipUntilInView(this.parsedPos,p.viewport.from),this.parsedPos=p.viewport.from),this.moveRangeIndex()}advance(){let t=Je.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),o=Math.min(n,this.chunkStart+2048);for(t&&(o=Math.min(o,t.viewport.to));this.parsedPos<o;)this.parseLine(t);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=n?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let n=this.input.chunk(t);if(this.input.lineChunks)n==`
2193
+ `;this.styleTag.textContent=p}}}for(var Mn={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},qi={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Po=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),mo=typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent),Ko=typeof navigator<"u"&&/Mac/.test(navigator.platform),Co=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),No=Ko||Po&&+Po[1]<57,Ao=0;Ao<10;Ao++)Mn[48+Ao]=Mn[96+Ao]=String(Ao);for(var Ao=1;Ao<=24;Ao++)Mn[Ao+111]="F"+Ao;for(var Ao=65;Ao<=90;Ao++)Mn[Ao]=String.fromCharCode(Ao+32),qi[Ao]=String.fromCharCode(Ao);for(var vt in Mn)qi.hasOwnProperty(vt)||(qi[vt]=Mn[vt]);function la(a){var t=No&&(a.ctrlKey||a.altKey||a.metaKey)||Co&&a.shiftKey&&a.key&&a.key.length==1||a.key=="Unidentified",n=!t&&a.key||(a.shiftKey?qi:Mn)[a.keyCode]||a.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Es(a){let t;return a.nodeType==11?t=a.getSelection?a:a.ownerDocument:t=a,t.getSelection()}function Qn(a,t){return t?a==t||a.contains(t.nodeType!=1?t.parentNode:t):!1}function ms(a){let t=a.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function ua(a,t){if(!t.anchorNode)return!1;try{return Qn(a,t.anchorNode)}catch{return!1}}function co(a){return a.nodeType==3?go(a,0,a.nodeValue.length).getClientRects():a.nodeType==1?a.getClientRects():[]}function Zs(a,t,n,o){return n?qe(a,t,n,o,-1)||qe(a,t,n,o,1):!1}function ya(a){for(var t=0;;t++)if(a=a.previousSibling,!a)return t}function qe(a,t,n,o,u){for(;;){if(a==n&&t==o)return!0;if(t==(u<0?0:Oa(a))){if(a.nodeName=="DIV")return!1;let p=a.parentNode;if(!p||p.nodeType!=1)return!1;t=ya(a)+(u<0?0:1),a=p}else if(a.nodeType==1){if(a=a.childNodes[t+(u<0?-1:0)],a.nodeType==1&&a.contentEditable=="false")return!1;t=u<0?Oa(a):0}else return!1}}function Oa(a){return a.nodeType==3?a.nodeValue.length:a.childNodes.length}const ul={left:0,right:0,top:0,bottom:0};function Mo(a,t){let n=t?a.left:a.right;return{left:n,right:n,top:a.top,bottom:a.bottom}}function bs(a){return{left:0,right:a.innerWidth,top:0,bottom:a.innerHeight}}function ca(a,t,n,o,u,p,v,S){let A=a.ownerDocument,H=A.defaultView||window;for(let X=a;X;)if(X.nodeType==1){let Me,gt=X==A.body;if(gt)Me=bs(H);else{if(X.scrollHeight<=X.clientHeight&&X.scrollWidth<=X.clientWidth){X=X.assignedSlot||X.parentNode;continue}let or=X.getBoundingClientRect();Me={left:or.left,right:or.left+X.clientWidth,top:or.top,bottom:or.top+X.clientHeight}}let It=0,un=0;if(u=="nearest")t.top<Me.top?(un=-(Me.top-t.top+v),n>0&&t.bottom>Me.bottom+un&&(un=t.bottom-Me.bottom+un+v)):t.bottom>Me.bottom&&(un=t.bottom-Me.bottom+v,n<0&&t.top-un<Me.top&&(un=-(Me.top+un-t.top+v)));else{let or=t.bottom-t.top,ar=Me.bottom-Me.top;un=(u=="center"&&or<=ar?t.top+or/2-ar/2:u=="start"||u=="center"&&n<0?t.top-v:t.bottom-ar+v)-Me.top}if(o=="nearest"?t.left<Me.left?(It=-(Me.left-t.left+p),n>0&&t.right>Me.right+It&&(It=t.right-Me.right+It+p)):t.right>Me.right&&(It=t.right-Me.right+p,n<0&&t.left<Me.left+It&&(It=-(Me.left+It-t.left+p))):It=(o=="center"?t.left+(t.right-t.left)/2-(Me.right-Me.left)/2:o=="start"==S?t.left-p:t.right-(Me.right-Me.left)+p)-Me.left,It||un)if(gt)H.scrollBy(It,un);else{let or=0,ar=0;if(un){let wr=X.scrollTop;X.scrollTop+=un,ar=X.scrollTop-wr}if(It){let wr=X.scrollLeft;X.scrollLeft+=It,or=X.scrollLeft-wr}t={left:t.left-or,top:t.top-ar,right:t.right-or,bottom:t.bottom-ar},or&&Math.abs(or-It)<1&&(o="nearest"),ar&&Math.abs(ar-un)<1&&(u="nearest")}if(gt)break;X=X.assignedSlot||X.parentNode}else if(X.nodeType==11)X=X.host;else break}function El(a){let t=a.ownerDocument;for(let n=a.parentNode;n&&n!=t.body;)if(n.nodeType==1){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class Ds{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){this.set(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset)}set(t,n,o,u){this.anchorNode=t,this.anchorOffset=n,this.focusNode=o,this.focusOffset=u}}let Zi=null;function Xo(a){if(a.setActive)return a.setActive();if(Zi)return a.focus(Zi);let t=[];for(let n=a;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(a.focus(Zi==null?{get preventScroll(){return Zi={preventScroll:!0},!0}}:void 0),!Zi){Zi=!1;for(let n=0;n<t.length;){let o=t[n++],u=t[n++],p=t[n++];o.scrollTop!=u&&(o.scrollTop=u),o.scrollLeft!=p&&(o.scrollLeft=p)}}}let po;function go(a,t,n=t){let o=po||(po=document.createRange());return o.setEnd(a,n),o.setStart(a,t),o}function Fo(a,t,n){let o={key:t,code:t,keyCode:n,which:n,cancelable:!0},u=new KeyboardEvent("keydown",o);u.synthetic=!0,a.dispatchEvent(u);let p=new KeyboardEvent("keyup",o);return p.synthetic=!0,a.dispatchEvent(p),u.defaultPrevented||p.defaultPrevented}function xs(a){for(;a;){if(a&&(a.nodeType==9||a.nodeType==11&&a.host))return a;a=a.assignedSlot||a.parentNode}return null}function fa(a){for(;a.attributes.length;)a.removeAttributeNode(a.attributes[0])}function $a(a,t){let n=t.focusNode,o=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=o)return!1;for(;;)if(o){if(n.nodeType!=1)return!1;let u=n.childNodes[o-1];u.contentEditable=="false"?o--:(n=u,o=Oa(n))}else{if(n==a)return!0;o=ya(n),n=n.parentNode}}class us{constructor(t,n,o=!0){this.node=t,this.offset=n,this.precise=o}static before(t,n){return new us(t.parentNode,ya(t),n)}static after(t,n){return new us(t.parentNode,ya(t)+1,n)}}const bl=[];class Go{constructor(){this.parent=null,this.dom=null,this.dirty=2}get editorView(){if(!this.parent)throw new Error("Accessing view in orphan content view");return this.parent.editorView}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t){let n=this.posAtStart;for(let o of this.children){if(o==t)return n;n+=o.length+o.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}coordsAt(t,n){return null}sync(t){if(this.dirty&2){let n=this.dom,o=null,u;for(let p of this.children){if(p.dirty){if(!p.dom&&(u=o?o.nextSibling:n.firstChild)){let v=Go.get(u);(!v||!v.parent&&v.canReuseDOM(p))&&p.reuseDOM(u)}p.sync(t),p.dirty=0}if(u=o?o.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&u!=p.dom&&(t.written=!0),p.dom.parentNode==n)for(;u&&u!=p.dom;)u=xt(u);else n.insertBefore(p.dom,u);o=p.dom}for(u=o?o.nextSibling:n.firstChild,u&&t&&t.node==n&&(t.written=!0);u;)u=xt(u)}else if(this.dirty&1)for(let n of this.children)n.dirty&&(n.sync(t),n.dirty=0)}reuseDOM(t){}localPosFromDOM(t,n){let o;if(t==this.dom)o=this.dom.childNodes[n];else{let u=Oa(t)==0?0:n==0?-1:1;for(;;){let p=t.parentNode;if(p==this.dom)break;u==0&&p.firstChild!=p.lastChild&&(t==p.firstChild?u=-1:u=1),t=p}u<0?o=t:o=t.nextSibling}if(o==this.dom.firstChild)return 0;for(;o&&!Go.get(o);)o=o.nextSibling;if(!o)return this.length;for(let u=0,p=0;;u++){let v=this.children[u];if(v.dom==o)return p;p+=v.length+v.breakAfter}}domBoundsAround(t,n,o=0){let u=-1,p=-1,v=-1,S=-1;for(let A=0,H=o,X=o;A<this.children.length;A++){let Me=this.children[A],gt=H+Me.length;if(H<t&&gt>n)return Me.domBoundsAround(t,n,H);if(gt>=t&&u==-1&&(u=A,p=H),H>n&&Me.dom.parentNode==this.dom){v=A,S=X;break}X=gt,H=gt+Me.breakAfter}return{from:p,to:S<0?o+this.length:S,startDOM:(u?this.children[u-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:v<this.children.length&&v>=0?this.children[v].dom:null}}markDirty(t=!1){this.dirty|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let n=this.parent;n;n=n.parent){if(t&&(n.dirty|=2),n.dirty&1)return;n.dirty|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,this.dirty&&this.markParentsDirty(!0))}setDOM(t){this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this}get rootView(){for(let t=this;;){let n=t.parent;if(!n)return t;t=n}}replaceChildren(t,n,o=bl){this.markDirty();for(let u=t;u<n;u++){let p=this.children[u];p.parent==this&&p.destroy()}this.children.splice(t,n-t,...o);for(let u=0;u<o.length;u++)o[u].setParent(this)}ignoreMutation(t){return!1}ignoreEvent(t){return!1}childCursor(t=this.length){return new Tn(this.children,t,this.children.length)}childPos(t,n=1){return this.childCursor().findPos(t,n)}toString(){let t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+(t=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(t){return t.cmView}get isEditable(){return!0}merge(t,n,o,u,p,v){return!1}become(t){return!1}canReuseDOM(t){return t.constructor==this.constructor}getSide(){return 0}destroy(){this.parent=null}}Go.prototype.breakAfter=0;function xt(a){let t=a.nextSibling;return a.parentNode.removeChild(a),t}class Tn{constructor(t,n,o){this.children=t,this.pos=n,this.i=o,this.off=0}findPos(t,n=1){for(;;){if(t>this.pos||t==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let o=this.children[--this.i];this.pos-=o.length+o.breakAfter}}}function $n(a,t,n,o,u,p,v,S,A){let{children:H}=a,X=H.length?H[t]:null,Me=p.length?p[p.length-1]:null,gt=Me?Me.breakAfter:v;if(!(t==o&&X&&!v&&!gt&&p.length<2&&X.merge(n,u,p.length?Me:null,n==0,S,A))){if(o<H.length){let It=H[o];It&&u<It.length?(t==o&&(It=It.split(u),u=0),!gt&&Me&&It.merge(0,u,Me,!0,0,A)?p[p.length-1]=It:(u&&It.merge(0,u,null,!1,0,A),p.push(It))):It?.breakAfter&&(Me?Me.breakAfter=1:v=1),o++}for(X&&(X.breakAfter=v,n>0&&(!v&&p.length&&X.merge(n,X.length,p[0],!1,S,0)?X.breakAfter=p.shift().breakAfter:(n<X.length||X.children.length&&X.children[X.children.length-1].length==0)&&X.merge(n,X.length,null,!1,S,0),t++));t<o&&p.length;)if(H[o-1].become(p[p.length-1]))o--,p.pop(),A=p.length?0:S;else if(H[t].become(p[0]))t++,p.shift(),S=p.length?0:A;else break;!p.length&&t&&o<H.length&&!H[t-1].breakAfter&&H[o].merge(0,0,H[t-1],!1,S,A)&&t--,(t<o||p.length)&&a.replaceChildren(t,o,p)}}function lr(a,t,n,o,u,p){let v=a.childCursor(),{i:S,off:A}=v.findPos(n,1),{i:H,off:X}=v.findPos(t,-1),Me=t-n;for(let gt of o)Me+=gt.length;a.length+=Me,$n(a,H,X,S,A,o,0,u,p)}let br=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Gr=typeof document<"u"?document:{documentElement:{style:{}}};const vi=/Edge\/(\d+)/.exec(br.userAgent),xi=/MSIE \d/.test(br.userAgent),Ti=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(br.userAgent),bi=!!(xi||Ti||vi),wi=!bi&&/gecko\/(\d+)/i.test(br.userAgent),fi=!bi&&/Chrome\/(\d+)/.exec(br.userAgent),ji="webkitFontSmoothing"in Gr.documentElement.style,lo=!bi&&/Apple Computer/.test(br.vendor),uo=lo&&(/Mobile\/\w+/.test(br.userAgent)||br.maxTouchPoints>2);var xr={mac:uo||/Mac/.test(br.platform),windows:/Win/.test(br.platform),linux:/Linux|X11/.test(br.platform),ie:bi,ie_version:xi?Gr.documentMode||6:Ti?+Ti[1]:vi?+vi[1]:0,gecko:wi,gecko_version:wi?+(/Firefox\/(\d+)/.exec(br.userAgent)||[0,0])[1]:0,chrome:!!fi,chrome_version:fi?+fi[1]:0,ios:uo,android:/Android\b/.test(br.userAgent),webkit:ji,safari:lo,webkit_version:ji?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:Gr.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const So=256;class Do extends Go{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){t.nodeType==3&&this.createDOM(t)}merge(t,n,o){return o&&(!(o instanceof Do)||this.length-(n-t)+o.length>So)?!1:(this.text=this.text.slice(0,t)+(o?o.text:"")+this.text.slice(n),this.markDirty(),!0)}split(t){let n=new Do(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),n}localPosFromDOM(t,n){return t==this.dom?n:n?this.text.length:0}domAtPos(t){return new us(this.dom,t)}domBoundsAround(t,n,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,n){return no(this.dom,t,n)}}class bo extends Go{constructor(t,n=[],o=0){super(),this.mark=t,this.children=n,this.length=o;for(let u of n)u.setParent(this)}setAttrs(t){if(fa(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)t.setAttribute(n,this.mark.attrs[n]);return t}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.dirty|=6)}sync(t){this.dom?this.dirty&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t)}merge(t,n,o,u,p,v){return o&&(!(o instanceof bo&&o.mark.eq(this.mark))||t&&p<=0||n<this.length&&v<=0)?!1:(lr(this,t,n,o?o.children:[],p-1,v-1),this.markDirty(),!0)}split(t){let n=[],o=0,u=-1,p=0;for(let S of this.children){let A=o+S.length;A>t&&n.push(o<t?S.split(t-o):S),u<0&&o>=t&&(u=p),o=A,p++}let v=this.length-t;return this.length=t,u>-1&&(this.children.length=u,this.markDirty()),new bo(this.mark,n,v)}domAtPos(t){return Ea(this,t)}coordsAt(t,n){return Ta(this,t,n)}}function no(a,t,n){let o=a.nodeValue.length;t>o&&(t=o);let u=t,p=t,v=0;t==0&&n<0||t==o&&n>=0?xr.chrome||xr.gecko||(t?(u--,v=1):p<o&&(p++,v=-1)):n<0?u--:p<o&&p++;let S=go(a,u,p).getClientRects();if(!S.length)return ul;let A=S[(v?v<0:n>=0)?0:S.length-1];return xr.safari&&!v&&A.width==0&&(A=Array.prototype.find.call(S,H=>H.width)||A),v?Mo(A,v<0):A||null}class Yo extends Go{constructor(t,n,o){super(),this.widget=t,this.length=n,this.side=o,this.prevWidget=null}static create(t,n,o){return new(t.customView||Yo)(t,n,o)}split(t){let n=Yo.create(this.widget,this.length-t,this.side);return this.length-=t,n}sync(){(!this.dom||!this.widget.updateDOM(this.dom))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}getSide(){return this.side}merge(t,n,o,u,p,v){return o&&(!(o instanceof Yo)||!this.widget.compare(o.widget)||t>0&&p<=0||n<this.length&&v<=0)?!1:(this.length=t+(o?o.length:0)+(this.length-n),!0)}become(t){return t.length==this.length&&t instanceof Yo&&t.side==this.side&&this.widget.constructor==t.widget.constructor?(this.widget.eq(t.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,!0):!1}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get overrideDOMText(){if(this.length==0)return Cn.empty;let t=this;for(;t.parent;)t=t.parent;let n=t.editorView,o=n&&n.state.doc,u=this.posAtStart;return o?o.slice(u,u+this.length):Cn.empty}domAtPos(t){return t==0?us.before(this.dom):us.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,n){let o=this.dom.getClientRects(),u=null;if(!o.length)return ul;for(let p=t>0?o.length-1:0;u=o[p],!(t>0?p==0:p==o.length-1||u.top<u.bottom);p+=t>0?-1:1);return this.length?u:Mo(u,this.side>0)}get isEditable(){return!1}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class as extends Yo{domAtPos(t){let{topView:n,text:o}=this.widget;return n?Ks(t,0,n,o,(u,p)=>u.domAtPos(p),u=>new us(o,Math.min(u,o.nodeValue.length))):new us(o,Math.min(t,o.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(t,n){let{topView:o,text:u}=this.widget;return o?qo(t,n,o,u):Math.min(n,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(t,n){let{topView:o,text:u}=this.widget;return o?Ks(t,n,o,u,(p,v,S)=>p.coordsAt(v,S),(p,v)=>no(u,p,v)):no(u,t,n)}destroy(){var t;super.destroy(),(t=this.widget.topView)===null||t===void 0||t.destroy()}get isEditable(){return!0}canReuseDOM(){return!0}}function Ks(a,t,n,o,u,p){if(n instanceof bo){for(let v=n.dom.firstChild;v;v=v.nextSibling){let S=Go.get(v);if(!S)return p(a,t);let A=Qn(v,o),H=S.length+(A?o.nodeValue.length:0);if(a<H||a==H&&S.getSide()<=0)return A?Ks(a,t,S,o,u,p):u(S,a,t);a-=H}return u(n,n.length,-1)}else return n.dom==o?p(a,t):u(n,a,t)}function qo(a,t,n,o){if(n instanceof bo)for(let u of n.children){let p=0,v=Qn(u.dom,o);if(Qn(u.dom,a))return p+(v?qo(a,t,u,o):u.localPosFromDOM(a,t));p+=v?o.nodeValue.length:u.length}else if(n.dom==o)return Math.min(t,o.nodeValue.length);return n.localPosFromDOM(a,t)}class Gs extends Go{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof Gs&&t.side==this.side}split(){return new Gs(this.side)}sync(){if(!this.dom){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),this.setDOM(t)}}getSide(){return this.side}domAtPos(t){return us.before(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){let n=this.dom.getBoundingClientRect(),o=Ys(this,this.side>0?-1:1);return o&&o.top<n.bottom&&o.bottom>n.top?{left:n.left,right:n.right,top:o.top,bottom:o.bottom}:n}get overrideDOMText(){return Cn.empty}}Do.prototype.children=Yo.prototype.children=Gs.prototype.children=bl;function Ys(a,t){let n=a.parent,o=n?n.children.indexOf(a):-1;for(;n&&o>=0;)if(t<0?o>0:o<n.children.length){let u=n.children[o+t];if(u instanceof Do){let p=u.coordsAt(t<0?u.length:0,t);if(p)return p}o+=t}else if(n instanceof bo&&n.parent)o=n.parent.children.indexOf(n)+(t<0?0:1),n=n.parent;else{let u=n.dom.lastChild;if(u&&u.nodeName=="BR")return u.getClientRects()[0];break}}function Ea(a,t){let n=a.dom,{children:o}=a,u=0;for(let p=0;u<o.length;u++){let v=o[u],S=p+v.length;if(!(S==p&&v.getSide()<=0)){if(t>p&&t<S&&v.dom.parentNode==n)return v.domAtPos(t-p);if(t<=p)break;p=S}}for(let p=u;p>0;p--){let v=o[p-1];if(v.dom.parentNode==n)return v.domAtPos(v.length)}for(let p=u;p<o.length;p++){let v=o[p];if(v.dom.parentNode==n)return v.domAtPos(0)}return new us(n,0)}function Na(a,t,n){let o,{children:u}=a;n>0&&t instanceof bo&&u.length&&(o=u[u.length-1])instanceof bo&&o.mark.eq(t.mark)?Na(o,t.children[0],n-1):(u.push(t),t.setParent(a)),a.length+=t.length}function Ta(a,t,n){let o=null,u=-1,p=null,v=-1;function S(H,X){for(let Me=0,gt=0;Me<H.children.length&&gt<=X;Me++){let It=H.children[Me],un=gt+It.length;un>=X&&(It.children.length?S(It,X-gt):!p&&(un>X||gt==un&&It.getSide()>0)?(p=It,v=X-gt):(gt<X||gt==un&&It.getSide()<0)&&(o=It,u=X-gt)),gt=un}}S(a,t);let A=(n<0?o:p)||o||p;return A?A.coordsAt(Math.max(0,A==o?u:v),n):Ms(a)}function Ms(a){let t=a.dom.lastChild;if(!t)return a.dom.getBoundingClientRect();let n=co(t);return n[n.length-1]||null}function Fl(a,t){for(let n in a)n=="class"&&t.class?t.class+=" "+a.class:n=="style"&&t.style?t.style+=";"+a.style:t[n]=a[n];return t}function wa(a,t){if(a==t)return!0;if(!a||!t)return!1;let n=Object.keys(a),o=Object.keys(t);if(n.length!=o.length)return!1;for(let u of n)if(o.indexOf(u)==-1||a[u]!==t[u])return!1;return!0}function Bl(a,t,n){let o=null;if(t)for(let u in t)n&&u in n||a.removeAttribute(o=u);if(n)for(let u in n)t&&t[u]==n[u]||a.setAttribute(o=u,n[u]);return!!o}class ba{eq(t){return!1}updateDOM(t){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}ignoreEvent(t){return!0}get customView(){return null}destroy(t){}}var Ro=function(a){return a[a.Text=0]="Text",a[a.WidgetBefore=1]="WidgetBefore",a[a.WidgetAfter=2]="WidgetAfter",a[a.WidgetRange=3]="WidgetRange",a}(Ro||(Ro={}));class Lr extends Bi{constructor(t,n,o,u){super(),this.startSide=t,this.endSide=n,this.widget=o,this.spec=u}get heightRelevant(){return!1}static mark(t){return new es(t)}static widget(t){let n=t.side||0,o=!!t.block;return n+=o?n>0?3e8:-4e8:n>0?1e8:-1e8,new ta(t,n,n,o,t.widget||null,!1)}static replace(t){let n=!!t.block,o,u;if(t.isBlockGap)o=-5e8,u=4e8;else{let{start:p,end:v}=Ja(t,n);o=(p?n?-3e8:-1:5e8)-1,u=(v?n?2e8:1:-6e8)+1}return new ta(t,o,u,n,t.widget||null,!0)}static line(t){return new Ws(t)}static set(t,n=!1){return hi.of(t,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Lr.none=hi.empty;class es extends Lr{constructor(t){let{start:n,end:o}=Ja(t);super(n?-1:5e8,o?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){return this==t||t instanceof es&&this.tagName==t.tagName&&this.class==t.class&&wa(this.attrs,t.attrs)}range(t,n=t){if(t>=n)throw new RangeError("Mark decorations may not be empty");return super.range(t,n)}}es.prototype.point=!1;class Ws extends Lr{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof Ws&&this.spec.class==t.spec.class&&wa(this.spec.attributes,t.spec.attributes)}range(t,n=t){if(n!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,n)}}Ws.prototype.mapMode=Jt.TrackBefore,Ws.prototype.point=!0;class ta extends Lr{constructor(t,n,o,u,p,v){super(n,o,p,t),this.block=u,this.isReplace=v,this.mapMode=u?n<=0?Jt.TrackBefore:Jt.TrackAfter:Jt.TrackDel}get type(){return this.startSide<this.endSide?Ro.WidgetRange:this.startSide<=0?Ro.WidgetBefore:Ro.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&this.widget.estimatedHeight>=5}eq(t){return t instanceof ta&&kl(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,n=t){if(this.isReplace&&(t>n||t==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,n)}}ta.prototype.point=!0;function Ja(a,t=!1){let{inclusiveStart:n,inclusiveEnd:o}=a;return n==null&&(n=a.inclusive),o==null&&(o=a.inclusive),{start:n??t,end:o??t}}function kl(a,t){return a==t||!!(a&&t&&a.compare(t))}function ou(a,t,n,o=0){let u=n.length-1;u>=0&&n[u]+o>=a?n[u]=Math.max(n[u],t):n.push(a,t)}class gs extends Go{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,n,o,u,p,v){if(o){if(!(o instanceof gs))return!1;this.dom||o.transferDOM(this)}return u&&this.setDeco(o?o.attrs:null),lr(this,t,n,o?o.children:[],p,v),!0}split(t){let n=new gs;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:o,off:u}=this.childPos(t);u&&(n.append(this.children[o].split(u),0),this.children[o].merge(u,this.children[o].length,null,!1,0,0),o++);for(let p=o;p<this.children.length;p++)n.append(this.children[p],0);for(;o>0&&this.children[o-1].length==0;)this.children[--o].destroy();return this.children.length=o,this.markDirty(),this.length=t,n}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){wa(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,n){Na(this,t,n)}addLineDeco(t){let n=t.spec.attributes,o=t.spec.class;n&&(this.attrs=Fl(n,this.attrs||{})),o&&(this.attrs=Fl({class:o},this.attrs||{}))}domAtPos(t){return Ea(this,t)}reuseDOM(t){t.nodeName=="DIV"&&(this.setDOM(t),this.dirty|=6)}sync(t){var n;this.dom?this.dirty&4&&(fa(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Bl(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t);let o=this.dom.lastChild;for(;o&&Go.get(o)instanceof bo;)o=o.lastChild;if(!o||!this.length||o.nodeName!="BR"&&((n=Go.get(o))===null||n===void 0?void 0:n.isEditable)==!1&&(!xr.ios||!this.children.some(u=>u instanceof Do))){let u=document.createElement("BR");u.cmIgnore=!0,this.dom.appendChild(u)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let t=0;for(let n of this.children){if(!(n instanceof Do)||/[^ -~]/.test(n.text))return null;let o=co(n.dom);if(o.length!=1)return null;t+=o[0].width}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length}:null}coordsAt(t,n){return Ta(this,t,n)}become(t){return!1}get type(){return Ro.Text}static find(t,n){for(let o=0,u=0;o<t.children.length;o++){let p=t.children[o],v=u+p.length;if(v>=n){if(p instanceof gs)return p;if(v>n)break}u=v+p.breakAfter}return null}}class Is extends Go{constructor(t,n,o){super(),this.widget=t,this.length=n,this.type=o,this.breakAfter=0,this.prevWidget=null}merge(t,n,o,u,p,v){return o&&(!(o instanceof Is)||!this.widget.compare(o.widget)||t>0&&p<=0||n<this.length&&v<=0)?!1:(this.length=t+(o?o.length:0)+(this.length-n),!0)}domAtPos(t){return t==0?us.before(this.dom):us.after(this.dom,t==this.length)}split(t){let n=this.length-t;this.length=t;let o=new Is(this.widget,n,this.type);return o.breakAfter=this.breakAfter,o}get children(){return bl}sync(){(!this.dom||!this.widget.updateDOM(this.dom))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Cn.empty}domBoundsAround(){return null}become(t){return t instanceof Is&&t.type==this.type&&t.widget.constructor==this.widget.constructor?(t.widget.eq(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,this.breakAfter=t.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class cl{constructor(t,n,o,u){this.doc=t,this.pos=n,this.end=o,this.disallowBlockEffectsFor=u,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!t.breakAfter&&!(t instanceof Is&&t.type==Ro.WidgetBefore)}getLine(){return this.curLine||(this.content.push(this.curLine=new gs),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(_s(new Gs(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}buildText(t,n,o){for(;t>0;){if(this.textOff==this.text.length){let{value:p,lineBreak:v,done:S}=this.cursor.next(this.skip);if(this.skip=0,S)throw new Error("Ran out of text content when drawing inline views");if(v){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}else this.text=p,this.textOff=0}let u=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(n.slice(n.length-o)),this.getLine().append(_s(new Do(this.text.slice(this.textOff,this.textOff+u)),n),o),this.atCursorPos=!0,this.textOff+=u,t-=u,o=0}}span(t,n,o,u){this.buildText(n-t,o,u),this.pos=n,this.openStart<0&&(this.openStart=u)}point(t,n,o,u,p,v){if(this.disallowBlockEffectsFor[v]&&o instanceof ta){if(o.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let S=n-t;if(o instanceof ta)if(o.block){let{type:A}=o;A==Ro.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Is(o.widget||new Fa("div"),S,A))}else{let A=Yo.create(o.widget||new Fa("span"),S,S?0:o.startSide),H=this.atCursorPos&&!A.isEditable&&p<=u.length&&(t<n||o.startSide>0),X=!A.isEditable&&(t<n||p>u.length||o.startSide<=0),Me=this.getLine();this.pendingBuffer==2&&!H&&(this.pendingBuffer=0),this.flushBuffer(u),H&&(Me.append(_s(new Gs(1),u),p),p=u.length+Math.max(0,p-u.length)),Me.append(_s(A,u),p),this.atCursorPos=X,this.pendingBuffer=X?t<n||p>u.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=u.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(o);S&&(this.textOff+S<=this.text.length?this.textOff+=S:(this.skip+=S-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=p)}static build(t,n,o,u,p){let v=new cl(t,n,o,p);return v.openEnd=hi.spans(u,n,o,v),v.openStart<0&&(v.openStart=v.openEnd),v.finish(v.openEnd),v}}function _s(a,t){for(let n of t)a=new bo(n,[a],a.length);return a}class Fa extends ba{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}}const Ss=ft.define(),fl=ft.define(),Yl=ft.define(),Xu=ft.define(),qu=ft.define(),Xa=ft.define(),xl=ft.define({combine:a=>a.some(t=>t)}),jl=ft.define({combine:a=>a.some(t=>t)});class Da{constructor(t,n="nearest",o="nearest",u=5,p=5){this.range=t,this.y=n,this.x=o,this.yMargin=u,this.xMargin=p}map(t){return t.empty?this:new Da(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin)}}const Cl=Et.define({map:(a,t)=>a.map(t)});function Ls(a,t,n){let o=a.facet(Xu);o.length?o[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const Ba=ft.define({combine:a=>a.length?a[0]:!0});let ds=0;const Bo=ft.define();class Wo{constructor(t,n,o,u){this.id=t,this.create=n,this.domEventHandlers=o,this.extension=u(this)}static define(t,n){const{eventHandlers:o,provide:u,decorations:p}=n||{};return new Wo(ds++,t,o,v=>{let S=[Bo.of(v)];return p&&S.push(qa.of(A=>{let H=A.plugin(v);return H?p(H):Lr.none})),u&&S.push(u(v)),S})}static fromClass(t,n){return Wo.define(o=>new t(o),n)}}class $s{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}update(t){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(o){if(Ls(n.state,o,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(n){Ls(t.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(o){Ls(t.state,o,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const da=ft.define(),Ml=ft.define(),qa=ft.define(),na=ft.define(),su=ft.define(),Sl=ft.define();class Ps{constructor(t,n,o,u){this.fromA=t,this.toA=n,this.fromB=o,this.toB=u}join(t){return new Ps(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let n=t.length,o=this;for(;n>0;n--){let u=t[n-1];if(!(u.fromA>o.toA)){if(u.toA<o.fromA)break;o=o.join(u),t.splice(n-1,1)}}return t.splice(n,0,o),t}static extendWithRanges(t,n){if(n.length==0)return t;let o=[];for(let u=0,p=0,v=0,S=0;;u++){let A=u==t.length?null:t[u],H=v-S,X=A?A.fromB:1e9;for(;p<n.length&&n[p]<X;){let Me=n[p],gt=n[p+1],It=Math.max(S,Me),un=Math.min(X,gt);if(It<=un&&new Ps(It+H,un+H,It,un).addToSet(o),gt>X)break;p+=2}if(!A)return o;new Ps(A.fromA,A.toA,A.fromB,A.toB).addToSet(o),v=A.toA,S=A.toB}}}class au{constructor(t,n,o){this.view=t,this.state=n,this.transactions=o,this.flags=0,this.startState=t.state,this.changes=Jn.empty(this.startState.doc.length);for(let v of o)this.changes=this.changes.compose(v.changes);let u=[];this.changes.iterChangedRanges((v,S,A,H)=>u.push(new Ps(v,S,A,H))),this.changedRanges=u;let p=t.hasFocus;p!=t.inputState.notifiedFocused&&(t.inputState.notifiedFocused=p,this.flags|=1)}static create(t,n,o){return new au(t,n,o)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var ts=function(a){return a[a.LTR=0]="LTR",a[a.RTL=1]="RTL",a}(ts||(ts={}));const el=ts.LTR,Ql=ts.RTL;function lu(a){let t=[];for(let n=0;n<a.length;n++)t.push(1<<+a[n]);return t}const wc=lu("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),of=lu("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),dl=Object.create(null),Os=[];for(let a of["()","[]","{}"]){let t=a.charCodeAt(0),n=a.charCodeAt(1);dl[t]=n,dl[n]=-t}function uu(a){return a<=247?wc[a]:1424<=a&&a<=1524?2:1536<=a&&a<=1785?of[a-1536]:1774<=a&&a<=2220?4:8192<=a&&a<=8203?256:64336<=a&&a<=65023?4:a==8204?256:1}const ec=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Ol{constructor(t,n,o){this.from=t,this.to=n,this.level=o}get dir(){return this.level%2?Ql:el}side(t,n){return this.dir==n==t?this.to:this.from}static find(t,n,o,u){let p=-1;for(let v=0;v<t.length;v++){let S=t[v];if(S.from<=n&&S.to>=n){if(S.level==o)return v;(p<0||(u!=0?u<0?S.from<n:S.to>n:t[p].level>S.level))&&(p=v)}}if(p<0)throw new RangeError("Index out of range");return p}}const _o=[];function ka(a,t){let n=a.length,o=t==el?1:2,u=t==el?2:1;if(!a||o==1&&!ec.test(a))return Tl(n);for(let v=0,S=o,A=o;v<n;v++){let H=uu(a.charCodeAt(v));H==512?H=S:H==8&&A==4&&(H=16),_o[v]=H==4?2:H,H&7&&(A=H),S=H}for(let v=0,S=o,A=o;v<n;v++){let H=_o[v];if(H==128)v<n-1&&S==_o[v+1]&&S&24?H=_o[v]=S:_o[v]=256;else if(H==64){let X=v+1;for(;X<n&&_o[X]==64;)X++;let Me=v&&S==8||X<n&&_o[X]==8?A==1?1:8:256;for(let gt=v;gt<X;gt++)_o[gt]=Me;v=X-1}else H==8&&A==1&&(_o[v]=1);S=H,H&7&&(A=H)}for(let v=0,S=0,A=0,H,X,Me;v<n;v++)if(X=dl[H=a.charCodeAt(v)])if(X<0){for(let gt=S-3;gt>=0;gt-=3)if(Os[gt+1]==-X){let It=Os[gt+2],un=It&2?o:It&4?It&1?u:o:0;un&&(_o[v]=_o[Os[gt]]=un),S=gt;break}}else{if(Os.length==189)break;Os[S++]=v,Os[S++]=H,Os[S++]=A}else if((Me=_o[v])==2||Me==1){let gt=Me==o;A=gt?0:1;for(let It=S-3;It>=0;It-=3){let un=Os[It+2];if(un&2)break;if(gt)Os[It+2]|=2;else{if(un&4)break;Os[It+2]|=4}}}for(let v=0;v<n;v++)if(_o[v]==256){let S=v+1;for(;S<n&&_o[S]==256;)S++;let A=(v?_o[v-1]:o)==1,H=(S<n?_o[S]:o)==1,X=A==H?A?1:2:o;for(let Me=v;Me<S;Me++)_o[Me]=X;v=S-1}let p=[];if(o==1)for(let v=0;v<n;){let S=v,A=_o[v++]!=1;for(;v<n&&A==(_o[v]!=1);)v++;if(A)for(let H=v;H>S;){let X=H,Me=_o[--H]!=2;for(;H>S&&Me==(_o[H-1]!=2);)H--;p.push(new Ol(H,X,Me?2:1))}else p.push(new Ol(S,v,0))}else for(let v=0;v<n;){let S=v,A=_o[v++]==2;for(;v<n&&A==(_o[v]==2);)v++;p.push(new Ol(S,v,A?1:2))}return p}function Tl(a){return[new Ol(0,a,0)]}let tl="";function nl(a,t,n,o,u){var p;let v=o.head-a.from,S=-1;if(v==0){if(!u||!a.length)return null;t[0].level!=n&&(v=t[0].side(!1,n),S=0)}else if(v==a.length){if(u)return null;let gt=t[t.length-1];gt.level!=n&&(v=gt.side(!0,n),S=t.length-1)}S<0&&(S=Ol.find(t,v,(p=o.bidiLevel)!==null&&p!==void 0?p:-1,o.assoc));let A=t[S];v==A.side(u,n)&&(A=t[S+=u?1:-1],v=A.side(!u,n));let H=u==(A.dir==n),X=ne(a.text,v,H);if(tl=a.text.slice(Math.min(v,X),Math.max(v,X)),X!=A.side(u,n))return ue.cursor(X+a.from,H?-1:1,A.level);let Me=S==(u?t.length-1:0)?null:t[S+(u?1:-1)];return!Me&&A.level!=n?ue.cursor(u?a.to:a.from,u?-1:1,n):Me&&Me.level<A.level?ue.cursor(Me.side(!u,n)+a.from,u?1:-1,Me.level):ue.cursor(X+a.from,u?-1:1,A.level)}const Pa="\uFFFF";class Dc{constructor(t,n){this.points=t,this.text="",this.lineSeparator=n.facet(ui.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=Pa}readRange(t,n){if(!t)return this;let o=t.parentNode;for(let u=t;;){this.findPointBefore(o,u),this.readNode(u);let p=u.nextSibling;if(p==n)break;let v=Go.get(u),S=Go.get(p);(v&&S?v.breakAfter:(v?v.breakAfter:Tu(u))||Tu(p)&&(u.nodeName!="BR"||u.cmIgnore))&&this.lineBreak(),u=p}return this.findPointBefore(o,n),this}readTextNode(t){let n=t.nodeValue;for(let o of this.points)o.node==t&&(o.pos=this.text.length+Math.min(o.offset,n.length));for(let o=0,u=this.lineSeparator?null:/\r\n?|\n/g;;){let p=-1,v=1,S;if(this.lineSeparator?(p=n.indexOf(this.lineSeparator,o),v=this.lineSeparator.length):(S=u.exec(n))&&(p=S.index,v=S[0].length),this.append(n.slice(o,p<0?n.length:p)),p<0)break;if(this.lineBreak(),v>1)for(let A of this.points)A.node==t&&A.pos>this.text.length&&(A.pos-=v-1);o=p+v}}readNode(t){if(t.cmIgnore)return;let n=Go.get(t),o=n&&n.overrideDOMText;if(o!=null){this.findPointInside(t,o.length);for(let u=o.iter();!u.next().done;)u.lineBreak?this.lineBreak():this.append(u.value)}else t.nodeType==3?this.readTextNode(t):t.nodeName=="BR"?t.nextSibling&&this.lineBreak():t.nodeType==1&&this.readRange(t.firstChild,null)}findPointBefore(t,n){for(let o of this.points)o.node==t&&t.childNodes[o.offset]==n&&(o.pos=this.text.length)}findPointInside(t,n){for(let o of this.points)(t.nodeType==3?o.node==t:t.contains(o.node))&&(o.pos=this.text.length+Math.min(n,o.offset))}}function Tu(a){return a.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(a.nodeName)}class Pc{constructor(t,n){this.node=t,this.offset=n,this.pos=-1}}class ha extends Go{constructor(t){super(),this.view=t,this.compositionDeco=Lr.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new gs],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ps(0,0,0,t.state.doc.length)],0)}get editorView(){return this.view}get length(){return this.view.state.doc.length}update(t){let n=t.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:v,toA:S})=>S<this.minWidthFrom||v>this.minWidthTo)?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=Lr.none:(t.transactions.length||this.dirty)&&(this.compositionDeco=sf(this.view,t.changes)),(xr.ie||xr.chrome)&&!this.compositionDeco.size&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,u=this.updateDeco(),p=_c(o,u,t.changes);return n=Ps.extendWithRanges(n,p),this.dirty==0&&n.length==0?!1:(this.updateInner(n,t.startState.doc.length),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,n);let{observer:o}=this.view;o.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let p=xr.chrome||xr.ios?{node:o.selectionRange.focusNode,written:!1}:void 0;this.sync(p),this.dirty=0,p&&(p.written||o.selectionRange.focusNode!=p.node)&&(this.forceSelection=!0),this.dom.style.height=""});let u=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let p of this.children)p instanceof Is&&p.widget instanceof hs&&u.push(p.dom);o.updateGaps(u)}updateChildren(t,n){let o=this.childCursor(n);for(let u=t.length-1;;u--){let p=u>=0?t[u]:null;if(!p)break;let{fromA:v,toA:S,fromB:A,toB:H}=p,{content:X,breakAtStart:Me,openStart:gt,openEnd:It}=cl.build(this.view.state.doc,A,H,this.decorations,this.dynamicDecorationMap),{i:un,off:or}=o.findPos(S,1),{i:ar,off:wr}=o.findPos(v,-1);$n(this,ar,wr,un,or,X,Me,gt,It)}}updateSelection(t=!1,n=!1){if((t||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange(),!(n||this.mayControlSelection()))return;let o=this.forceSelection;this.forceSelection=!1;let u=this.view.state.selection.main,p=this.domAtPos(u.anchor),v=u.empty?p:this.domAtPos(u.head);if(xr.gecko&&u.empty&&xa(p)){let A=document.createTextNode("");this.view.observer.ignore(()=>p.node.insertBefore(A,p.node.childNodes[p.offset]||null)),p=v=new us(A,0),o=!0}let S=this.view.observer.selectionRange;(o||!S.focusNode||!Zs(p.node,p.offset,S.anchorNode,S.anchorOffset)||!Zs(v.node,v.offset,S.focusNode,S.focusOffset))&&(this.view.observer.ignore(()=>{xr.android&&xr.chrome&&this.dom.contains(S.focusNode)&&Qf(S.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let A=Es(this.view.root);if(A)if(u.empty){if(xr.gecko){let H=wu(p.node,p.offset);if(H&&H!=3){let X=Rc(p.node,p.offset,H==1?1:-1);X&&(p=new us(X,H==1?0:X.nodeValue.length))}}A.collapse(p.node,p.offset),u.bidiLevel!=null&&S.cursorBidiLevel!=null&&(S.cursorBidiLevel=u.bidiLevel)}else if(A.extend){A.collapse(p.node,p.offset);try{A.extend(v.node,v.offset)}catch{}}else{let H=document.createRange();u.anchor>u.head&&([p,v]=[v,p]),H.setEnd(v.node,v.offset),H.setStart(p.node,p.offset),A.removeAllRanges(),A.addRange(H)}}),this.view.observer.setSelectionRange(p,v)),this.impreciseAnchor=p.precise?null:new us(S.anchorNode,S.anchorOffset),this.impreciseHead=v.precise?null:new us(S.focusNode,S.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:t}=this,n=t.state.selection.main,o=Es(t.root),{anchorNode:u,anchorOffset:p}=t.observer.selectionRange;if(!o||!n.empty||!n.assoc||!o.modify)return;let v=gs.find(this,n.head);if(!v)return;let S=v.posAtStart;if(n.head==S||n.head==S+v.length)return;let A=this.coordsAt(n.head,-1),H=this.coordsAt(n.head,1);if(!A||!H||A.bottom>H.top)return;let X=this.domAtPos(n.head+n.assoc);o.collapse(X.node,X.offset),o.modify("move",n.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let Me=t.observer.selectionRange;t.docView.posFromDOM(Me.anchorNode,Me.anchorOffset)!=n.from&&o.collapse(u,p)}mayControlSelection(){let t=this.view.root.activeElement;return t==this.dom||ua(this.dom,this.view.observer.selectionRange)&&!(t&&this.dom.contains(t))}nearest(t){for(let n=t;n;){let o=Go.get(n);if(o&&o.rootView==this)return o;n=n.parentNode}return null}posFromDOM(t,n){let o=this.nearest(t);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(t,n)+o.posAtStart}domAtPos(t){let{i:n,off:o}=this.childCursor().findPos(t,-1);for(;n<this.children.length-1;){let u=this.children[n];if(o<u.length||u instanceof gs)break;n++,o=0}return this.children[n].domAtPos(o)}coordsAt(t,n){for(let o=this.length,u=this.children.length-1;;u--){let p=this.children[u],v=o-p.breakAfter-p.length;if(t>v||t==v&&p.type!=Ro.WidgetBefore&&p.type!=Ro.WidgetAfter&&(!u||n==2||this.children[u-1].breakAfter||this.children[u-1].type==Ro.WidgetBefore&&n>-2))return p.coordsAt(t-v,n);o=v}}measureVisibleLineHeights(t){let n=[],{from:o,to:u}=t,p=this.view.contentDOM.clientWidth,v=p>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,S=-1,A=this.view.textDirection==ts.LTR;for(let H=0,X=0;X<this.children.length;X++){let Me=this.children[X],gt=H+Me.length;if(gt>u)break;if(H>=o){let It=Me.dom.getBoundingClientRect();if(n.push(It.height),v){let un=Me.dom.lastChild,or=un?co(un):[];if(or.length){let ar=or[or.length-1],wr=A?ar.right-It.left:It.right-ar.left;wr>S&&(S=wr,this.minWidth=p,this.minWidthFrom=H,this.minWidthTo=gt)}}}H=gt+Me.breakAfter}return n}textDirectionAt(t){let{i:n}=this.childPos(t,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?ts.RTL:ts.LTR}measureTextSize(){for(let u of this.children)if(u instanceof gs){let p=u.measureTextSize();if(p)return p}let t=document.createElement("div"),n,o;return t.className="cm-line",t.style.width="99999px",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(t);let u=co(t.firstChild)[0];n=t.getBoundingClientRect().height,o=u?u.width/27:7,t.remove()}),{lineHeight:n,charWidth:o}}childCursor(t=this.length){let n=this.children.length;return n&&(t-=this.children[--n].length),new Tn(this.children,t,n)}computeBlockGapDeco(){let t=[],n=this.view.viewState;for(let o=0,u=0;;u++){let p=u==n.viewports.length?null:n.viewports[u],v=p?p.from-1:this.length;if(v>o){let S=n.lineBlockAt(v).bottom-n.lineBlockAt(o).top;t.push(Lr.replace({widget:new hs(S),block:!0,inclusive:!0,isBlockGap:!0}).range(o,v))}if(!p)break;o=p.to+1}return Lr.set(t)}updateDeco(){let t=this.view.state.facet(qa).map((n,o)=>(this.dynamicDecorationMap[o]=typeof n=="function")?n(this.view):n);for(let n=t.length;n<t.length+3;n++)this.dynamicDecorationMap[n]=!1;return this.decorations=[...t,this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(t){let{range:n}=t,o=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),u;if(!o)return;!n.empty&&(u=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(o={left:Math.min(o.left,u.left),top:Math.min(o.top,u.top),right:Math.max(o.right,u.right),bottom:Math.max(o.bottom,u.bottom)});let p=0,v=0,S=0,A=0;for(let X of this.view.state.facet(su).map(Me=>Me(this.view)))if(X){let{left:Me,right:gt,top:It,bottom:un}=X;Me!=null&&(p=Math.max(p,Me)),gt!=null&&(v=Math.max(v,gt)),It!=null&&(S=Math.max(S,It)),un!=null&&(A=Math.max(A,un))}let H={left:o.left-p,top:o.top-S,right:o.right+v,bottom:o.bottom+A};ca(this.view.scrollDOM,H,n.head<n.anchor?-1:1,t.x,t.y,t.xMargin,t.yMargin,this.view.textDirection==ts.LTR)}}function xa(a){return a.node.nodeType==1&&a.node.firstChild&&(a.offset==0||a.node.childNodes[a.offset-1].contentEditable=="false")&&(a.offset==a.node.childNodes.length||a.node.childNodes[a.offset].contentEditable=="false")}class hs extends ba{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}}function hl(a){let t=a.observer.selectionRange,n=t.focusNode&&Rc(t.focusNode,t.focusOffset,0);if(!n)return null;let o=a.docView.nearest(n);if(!o)return null;if(o instanceof gs){let u=n;for(;u.parentNode!=o.dom;)u=u.parentNode;let p=u.previousSibling;for(;p&&!Go.get(p);)p=p.previousSibling;let v=p?Go.get(p).posAtEnd:o.posAtStart;return{from:v,to:v,node:u,text:n}}else{for(;;){let{parent:p}=o;if(!p)return null;if(p instanceof gs)break;o=p}let u=o.posAtStart;return{from:u,to:u+o.length,node:o.dom,text:n}}}function sf(a,t){let n=hl(a);if(!n)return Lr.none;let{from:o,to:u,node:p,text:v}=n,S=t.mapPos(o,1),A=Math.max(S,t.mapPos(u,-1)),{state:H}=a,X=p.nodeType==3?p.nodeValue:new Dc([],H).readRange(p.firstChild,null).text;if(A-S<X.length)if(H.doc.sliceString(S,Math.min(H.doc.length,S+X.length),Pa)==X)A=S+X.length;else if(H.doc.sliceString(Math.max(0,A-X.length),A,Pa)==X)S=A-X.length;else return Lr.none;else if(H.doc.sliceString(S,A,Pa)!=X)return Lr.none;let Me=Go.get(p);return Me instanceof as?Me=Me.widget.topView:Me&&(Me.parent=null),Lr.set(Lr.replace({widget:new Ac(p,v,Me),inclusive:!0}).range(S,A))}class Ac extends ba{constructor(t,n,o){super(),this.top=t,this.text=n,this.topView=o}eq(t){return this.top==t.top&&this.text==t.text}toDOM(){return this.top}ignoreEvent(){return!1}get customView(){return as}}function Rc(a,t,n){for(;;){if(a.nodeType==3)return a;if(a.nodeType==1&&t>0&&n<=0)a=a.childNodes[t-1],t=Oa(a);else if(a.nodeType==1&&t<a.childNodes.length&&n>=0)a=a.childNodes[t],t=0;else return null}}function wu(a,t){return a.nodeType!=1?0:(t&&a.childNodes[t-1].contentEditable=="false"?1:0)|(t<a.childNodes.length&&a.childNodes[t].contentEditable=="false"?2:0)}class Ic{constructor(){this.changes=[]}compareRange(t,n){ou(t,n,this.changes)}comparePoint(t,n){ou(t,n,this.changes)}}function _c(a,t,n){let o=new Ic;return hi.compare(a,t,n,o),o.changes}function Qf(a,t){for(let n=a;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function cu(a,t,n=1){let o=a.charCategorizer(t),u=a.doc.lineAt(t),p=t-u.from;if(u.length==0)return ue.cursor(t);p==0?n=1:p==u.length&&(n=-1);let v=p,S=p;n<0?v=ne(u.text,p,!1):S=ne(u.text,p);let A=o(u.text.slice(v,S));for(;v>0;){let H=ne(u.text,v,!1);if(o(u.text.slice(H,v))!=A)break;v=H}for(;S<u.length;){let H=ne(u.text,S);if(o(u.text.slice(S,H))!=A)break;S=H}return ue.range(v+u.from,S+u.from)}function af(a,t){return t.left>a?t.left-a:Math.max(0,a-t.right)}function Jf(a,t){return t.top>a?t.top-a:Math.max(0,a-t.bottom)}function ja(a,t){return a.top<t.bottom-1&&a.bottom>t.top+1}function Du(a,t){return t<a.top?{top:t,left:a.left,right:a.right,bottom:a.bottom}:a}function Pu(a,t){return t>a.bottom?{top:a.top,left:a.left,right:a.right,bottom:t}:a}function Ul(a,t,n){let o,u,p,v,S=!1,A,H,X,Me;for(let un=a.firstChild;un;un=un.nextSibling){let or=co(un);for(let ar=0;ar<or.length;ar++){let wr=or[ar];u&&ja(u,wr)&&(wr=Du(Pu(wr,u.bottom),u.top));let Si=af(t,wr),ki=Jf(n,wr);if(Si==0&&ki==0)return un.nodeType==3?pa(un,t,n):Ul(un,t,n);if(!o||v>ki||v==ki&&p>Si){o=un,u=wr,p=Si,v=ki;let mi=ki?n<wr.top?-1:1:Si?t<wr.left?-1:1:0;S=!mi||(mi>0?ar<or.length-1:ar>0)}Si==0?n>wr.bottom&&(!X||X.bottom<wr.bottom)?(A=un,X=wr):n<wr.top&&(!Me||Me.top>wr.top)&&(H=un,Me=wr):X&&ja(X,wr)?X=Pu(X,wr.bottom):Me&&ja(Me,wr)&&(Me=Du(Me,wr.top))}}if(X&&X.bottom>=n?(o=A,u=X):Me&&Me.top<=n&&(o=H,u=Me),!o)return{node:a,offset:0};let gt=Math.max(u.left,Math.min(u.right,t));if(o.nodeType==3)return pa(o,gt,n);if(S&&o.contentEditable!="false")return Ul(o,gt,n);let It=Array.prototype.indexOf.call(a.childNodes,o)+(t>=(u.left+u.right)/2?1:0);return{node:a,offset:It}}function pa(a,t,n){let o=a.nodeValue.length,u=-1,p=1e9,v=0;for(let S=0;S<o;S++){let A=go(a,S,S+1).getClientRects();for(let H=0;H<A.length;H++){let X=A[H];if(X.top==X.bottom)continue;v||(v=t-X.left);let Me=(X.top>n?X.top-n:n-X.bottom)-1;if(X.left-1<=t&&X.right+1>=t&&Me<p){let gt=t>=(X.left+X.right)/2,It=gt;if((xr.chrome||xr.gecko)&&go(a,S).getBoundingClientRect().left==X.right&&(It=!gt),Me<=0)return{node:a,offset:S+(It?1:0)};u=S+(It?1:0),p=Me}}}return{node:a,offset:u>-1?u:v>0?a.nodeValue.length:0}}function Au(a,{x:t,y:n},o,u=-1){var p;let v=a.contentDOM.getBoundingClientRect(),S=v.top+a.viewState.paddingTop,A,{docHeight:H}=a.viewState,X=n-S;if(X<0)return 0;if(X>H)return a.state.doc.length;for(let wr=a.defaultLineHeight/2,Si=!1;A=a.elementAtHeight(X),A.type!=Ro.Text;)for(;X=u>0?A.bottom+wr:A.top-wr,!(X>=0&&X<=H);){if(Si)return o?null:0;Si=!0,u=-u}n=S+X;let Me=A.from;if(Me<a.viewport.from)return a.viewport.from==0?0:o?null:Ru(a,v,A,t,n);if(Me>a.viewport.to)return a.viewport.to==a.state.doc.length?a.state.doc.length:o?null:Ru(a,v,A,t,n);let gt=a.dom.ownerDocument,It=a.root.elementFromPoint?a.root:gt,un=It.elementFromPoint(t,n);un&&!a.contentDOM.contains(un)&&(un=null),un||(t=Math.max(v.left+1,Math.min(v.right-1,t)),un=It.elementFromPoint(t,n),un&&!a.contentDOM.contains(un)&&(un=null));let or,ar=-1;if(un&&((p=a.docView.nearest(un))===null||p===void 0?void 0:p.isEditable)!=!1){if(gt.caretPositionFromPoint){let wr=gt.caretPositionFromPoint(t,n);wr&&({offsetNode:or,offset:ar}=wr)}else if(gt.caretRangeFromPoint){let wr=gt.caretRangeFromPoint(t,n);wr&&({startContainer:or,startOffset:ar}=wr,(!a.contentDOM.contains(or)||xr.safari&&tc(or,ar,t)||xr.chrome&&fu(or,ar,t))&&(or=void 0))}}if(!or||!a.docView.dom.contains(or)){let wr=gs.find(a.docView,Me);if(!wr)return X>A.top+A.height/2?A.to:A.from;({node:or,offset:ar}=Ul(wr.dom,t,n))}return a.docView.posFromDOM(or,ar)}function Ru(a,t,n,o,u){let p=Math.round((o-t.left)*a.defaultCharacterWidth);if(a.lineWrapping&&n.height>a.defaultLineHeight*1.5){let S=Math.floor((u-n.top)/a.defaultLineHeight);p+=S*a.viewState.heightOracle.lineLength}let v=a.state.sliceDoc(n.from,n.to);return n.from+Pr(v,p,a.state.tabSize)}function tc(a,t,n){let o;if(a.nodeType!=3||t!=(o=a.nodeValue.length))return!1;for(let u=a.nextSibling;u;u=u.nextSibling)if(u.nodeType!=1||u.nodeName!="BR")return!1;return go(a,o-1,o).getBoundingClientRect().left>n}function fu(a,t,n){if(t!=0)return!1;for(let u=a;;){let p=u.parentNode;if(!p||p.nodeType!=1||p.firstChild!=u)return!1;if(p.classList.contains("cm-line"))break;u=p}let o=a.nodeType==1?a.getBoundingClientRect():go(a,0,Math.max(a.nodeValue.length,1)).getBoundingClientRect();return n-o.left>5}function Ua(a,t,n,o){let u=a.state.doc.lineAt(t.head),p=!o||!a.lineWrapping?null:a.coordsAtPos(t.assoc<0&&t.head>u.from?t.head-1:t.head);if(p){let A=a.dom.getBoundingClientRect(),H=a.textDirectionAt(u.from),X=a.posAtCoords({x:n==(H==ts.LTR)?A.right-1:A.left+1,y:(p.top+p.bottom)/2});if(X!=null)return ue.cursor(X,n?-1:1)}let v=gs.find(a.docView,t.head),S=v?n?v.posAtEnd:v.posAtStart:n?u.to:u.from;return ue.cursor(S,n?-1:1)}function Jl(a,t,n,o){let u=a.state.doc.lineAt(t.head),p=a.bidiSpans(u),v=a.textDirectionAt(u.from);for(let S=t,A=null;;){let H=nl(u,p,v,S,n),X=tl;if(!H){if(u.number==(n?a.state.doc.lines:1))return S;X=`
2194
+ `,u=a.state.doc.line(u.number+(n?1:-1)),p=a.bidiSpans(u),H=ue.cursor(n?u.from:u.to)}if(A){if(!A(X))return S}else{if(!o)return H;A=o(X)}S=H}}function lf(a,t,n){let o=a.state.charCategorizer(t),u=o(n);return p=>{let v=o(p);return u==qr.Space&&(u=v),u==v}}function Lc(a,t,n,o){let u=t.head,p=n?1:-1;if(u==(n?a.state.doc.length:0))return ue.cursor(u,t.assoc);let v=t.goalColumn,S,A=a.contentDOM.getBoundingClientRect(),H=a.coordsAtPos(u),X=a.documentTop;if(H)v==null&&(v=H.left-A.left),S=p<0?H.top:H.bottom;else{let It=a.viewState.lineBlockAt(u);v==null&&(v=Math.min(A.right-A.left,a.defaultCharacterWidth*(u-It.from))),S=(p<0?It.top:It.bottom)+X}let Me=A.left+v,gt=o??a.defaultLineHeight>>1;for(let It=0;;It+=10){let un=S+(gt+It)*p,or=Au(a,{x:Me,y:un},!1,p);if(un<A.top||un>A.bottom||(p<0?or<u:or>u))return ue.cursor(or,t.assoc,void 0,v)}}function rl(a,t,n){let o=a.state.facet(na).map(u=>u(a));for(;;){let u=!1;for(let p of o)p.between(n.from-1,n.from+1,(v,S,A)=>{n.from>v&&n.from<S&&(n=t.head>n.from?ue.cursor(v,1):ue.cursor(S,-1),u=!0)});if(!u)return n}}class wl{constructor(t){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;let n=(o,u)=>{this.ignoreDuringComposition(u)||u.type=="keydown"&&this.keydown(t,u)||(this.mustFlushObserver(u)&&t.observer.forceFlush(),this.runCustomHandlers(u.type,t,u)?u.preventDefault():o(t,u))};for(let o in As){let u=As[o];t.contentDOM.addEventListener(o,p=>{Bc(t,p)&&n(u,p)},Iu[o]),this.registeredEvents.push(o)}t.scrollDOM.addEventListener("mousedown",o=>{o.target==t.scrollDOM&&n(As.mousedown,o)}),xr.chrome&&xr.chrome_version==102&&t.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?t.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,t.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=t.hasFocus,xr.safari&&t.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}ensureHandlers(t,n){var o;let u;this.customHandlers=[];for(let p of n)if(u=(o=p.update(t).spec)===null||o===void 0?void 0:o.domEventHandlers){this.customHandlers.push({plugin:p.value,handlers:u});for(let v in u)this.registeredEvents.indexOf(v)<0&&v!="scroll"&&(this.registeredEvents.push(v),t.contentDOM.addEventListener(v,S=>{Bc(t,S)&&this.runCustomHandlers(v,t,S)&&S.preventDefault()}))}}runCustomHandlers(t,n,o){for(let u of this.customHandlers){let p=u.handlers[t];if(p)try{if(p.call(u.plugin,o,n)||o.defaultPrevented)return!0}catch(v){Ls(n.state,v)}}return!1}runScrollHandlers(t,n){this.lastScrollTop=t.scrollDOM.scrollTop,this.lastScrollLeft=t.scrollDOM.scrollLeft;for(let o of this.customHandlers){let u=o.handlers.scroll;if(u)try{u.call(o.plugin,n,t)}catch(p){Ls(t.state,p)}}}keydown(t,n){if(this.lastKeyCode=n.keyCode,this.lastKeyTime=Date.now(),n.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(xr.android&&xr.chrome&&!n.synthetic&&(n.keyCode==13||n.keyCode==8))return t.observer.delayAndroidKey(n.key,n.keyCode),!0;let o;return xr.ios&&!n.synthetic&&!n.altKey&&!n.metaKey&&((o=$c.find(u=>u.keyCode==n.keyCode))&&!n.ctrlKey||Nc.indexOf(n.key)>-1&&n.ctrlKey&&!n.shiftKey)?(this.pendingIOSKey=o||n,setTimeout(()=>this.flushIOSKey(t),250),!0):!1}flushIOSKey(t){let n=this.pendingIOSKey;return n?(this.pendingIOSKey=void 0,Fo(t.contentDOM,n.key,n.keyCode)):!1}ignoreDuringComposition(t){return/^key/.test(t.type)?this.composing>0?!0:xr.safari&&!xr.ios&&Date.now()-this.compositionEndedAt<100?(this.compositionEndedAt=0,!0):!1:!1}mustFlushObserver(t){return t.type=="keydown"&&t.keyCode!=229}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.mouseSelection&&this.mouseSelection.update(t),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const $c=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Nc="dthko",il=[16,17,18,20,91,92,224,225];function Aa(a){return a*.7+8}class Fc{constructor(t,n,o,u){this.view=t,this.style=o,this.mustSelect=u,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=El(t.contentDOM);let p=t.contentDOM.ownerDocument;p.addEventListener("mousemove",this.move=this.move.bind(this)),p.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=t.state.facet(ui.allowMultipleSelections)&&Xf(t,n),this.dragMove=nc(t,n),this.dragging=rc(t,n)&&Xl(n)==1?null:!1,this.dragging===!1&&(n.preventDefault(),this.select(n))}move(t){var n;if(t.buttons==0)return this.destroy();if(this.dragging!==!1)return;this.select(this.lastEvent=t);let o=0,u=0,p=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};t.clientX<=p.left?o=-Aa(p.left-t.clientX):t.clientX>=p.right&&(o=Aa(t.clientX-p.right)),t.clientY<=p.top?u=-Aa(p.top-t.clientY):t.clientY>=p.bottom&&(u=Aa(t.clientY-p.bottom)),this.setScrollSpeed(o,u)}up(t){this.dragging==null&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(t,n){this.scrollSpeed={x:t,y:n},t||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}select(t){let n=this.style.get(t,this.extend,this.multiple);(this.mustSelect||!n.eq(this.view.state.selection)||n.main.assoc!=this.view.state.selection.main.assoc)&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.docChanged&&this.dragging&&(this.dragging=this.dragging.map(t.changes)),this.style.update(t)&&setTimeout(()=>this.select(this.lastEvent),20)}}function Xf(a,t){let n=a.state.facet(Ss);return n.length?n[0](t):xr.mac?t.metaKey:t.ctrlKey}function nc(a,t){let n=a.state.facet(fl);return n.length?n[0](t):xr.mac?!t.altKey:!t.ctrlKey}function rc(a,t){let{main:n}=a.state.selection;if(n.empty)return!1;let o=Es(a.root);if(!o||o.rangeCount==0)return!0;let u=o.getRangeAt(0).getClientRects();for(let p=0;p<u.length;p++){let v=u[p];if(v.left<=t.clientX&&v.right>=t.clientX&&v.top<=t.clientY&&v.bottom>=t.clientY)return!0}return!1}function Bc(a,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,o;n!=a.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(o=Go.get(n))&&o.ignoreEvent(t))return!1;return!0}const As=Object.create(null),Iu=Object.create(null),uf=xr.ie&&xr.ie_version<15||xr.ios&&xr.webkit_version<604;function _f(a){let t=a.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{a.focus(),n.remove(),cf(a,n.value)},50)}function cf(a,t){let{state:n}=a,o,u=1,p=n.toText(t),v=p.lines==n.selection.ranges.length;if(ql!=null&&n.selection.ranges.every(A=>A.empty)&&ql==p.toString()){let A=-1;o=n.changeByRange(H=>{let X=n.doc.lineAt(H.from);if(X.from==A)return{range:H};A=X.from;let Me=n.toText((v?p.line(u++).text:t)+n.lineBreak);return{changes:{from:X.from,insert:Me},range:ue.cursor(H.from+Me.length)}})}else v?o=n.changeByRange(A=>{let H=p.line(u++);return{changes:{from:A.from,to:A.to,insert:H.text},range:ue.cursor(A.from+H.length)}}):o=n.replaceSelection(p);a.dispatch(o,{userEvent:"input.paste",scrollIntoView:!0})}As.keydown=(a,t)=>{a.inputState.setSelectionOrigin("select"),t.keyCode==27?a.inputState.lastEscPress=Date.now():il.indexOf(t.keyCode)<0&&(a.inputState.lastEscPress=0)},As.touchstart=(a,t)=>{a.inputState.lastTouchTime=Date.now(),a.inputState.setSelectionOrigin("select.pointer")},As.touchmove=a=>{a.inputState.setSelectionOrigin("select.pointer")},Iu.touchstart=Iu.touchmove={passive:!0},As.mousedown=(a,t)=>{if(a.observer.flush(),a.inputState.lastTouchTime>Date.now()-2e3)return;let n=null;for(let o of a.state.facet(Yl))if(n=o(a,t),n)break;if(!n&&t.button==0&&(n=Vo(a,t)),n){let o=a.root.activeElement!=a.contentDOM;o&&a.observer.ignore(()=>Xo(a.contentDOM)),a.inputState.startMouseSelection(new Fc(a,t,n,o))}};function ff(a,t,n,o){if(o==1)return ue.cursor(t,n);if(o==2)return cu(a.state,t,n);{let u=gs.find(a.docView,t),p=a.state.doc.lineAt(u?u.posAtEnd:t),v=u?u.posAtStart:p.from,S=u?u.posAtEnd:p.to;return S<a.state.doc.length&&S==p.to&&S++,ue.range(v,S)}}let du=(a,t)=>a>=t.top&&a<=t.bottom,hu=(a,t,n)=>du(t,n)&&a>=n.left&&a<=n.right;function kc(a,t,n,o){let u=gs.find(a.docView,t);if(!u)return 1;let p=t-u.posAtStart;if(p==0)return 1;if(p==u.length)return-1;let v=u.coordsAt(p,-1);if(v&&hu(n,o,v))return-1;let S=u.coordsAt(p,1);return S&&hu(n,o,S)?1:v&&du(o,v)?-1:1}function df(a,t){let n=a.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:kc(a,n,t.clientX,t.clientY)}}const ic=xr.ie&&xr.ie_version<=11;let hf=null,pu=0,pl=0;function Xl(a){if(!ic)return a.detail;let t=hf,n=pl;return hf=a,pl=Date.now(),pu=!t||n>Date.now()-400&&Math.abs(t.clientX-a.clientX)<2&&Math.abs(t.clientY-a.clientY)<2?(pu+1)%3:1}function Vo(a,t){let n=df(a,t),o=Xl(t),u=a.state.selection;return{update(p){p.docChanged&&(n.pos=p.changes.mapPos(n.pos),u=u.map(p.changes))},get(p,v,S){let A=df(a,p),H=ff(a,A.pos,A.bias,o);if(n.pos!=A.pos&&!v){let X=ff(a,n.pos,n.bias,o),Me=Math.min(X.from,H.from),gt=Math.max(X.to,H.to);H=Me<H.from?ue.range(Me,gt):ue.range(gt,Me)}return v?u.replaceRange(u.main.extend(H.from,H.to)):S&&u.ranges.length>1&&u.ranges.some(X=>X.eq(H))?Dl(u,H):S?u.addRange(H):ue.create([H])}}}function Dl(a,t){for(let n=0;;n++)if(a.ranges[n].eq(t))return ue.create(a.ranges.slice(0,n).concat(a.ranges.slice(n+1)),a.mainIndex==n?0:a.mainIndex-(a.mainIndex>n?1:0))}As.dragstart=(a,t)=>{let{selection:{main:n}}=a.state,{mouseSelection:o}=a.inputState;o&&(o.dragging=n),t.dataTransfer&&(t.dataTransfer.setData("Text",a.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove")};function oc(a,t,n,o){if(!n)return;let u=a.posAtCoords({x:t.clientX,y:t.clientY},!1);t.preventDefault();let{mouseSelection:p}=a.inputState,v=o&&p&&p.dragging&&p.dragMove?{from:p.dragging.from,to:p.dragging.to}:null,S={from:u,insert:n},A=a.state.changes(v?[v,S]:S);a.focus(),a.dispatch({changes:A,selection:{anchor:A.mapPos(u,-1),head:A.mapPos(u,1)},userEvent:v?"move.drop":"input.drop"})}As.drop=(a,t)=>{if(!t.dataTransfer)return;if(a.state.readOnly)return t.preventDefault();let n=t.dataTransfer.files;if(n&&n.length){t.preventDefault();let o=Array(n.length),u=0,p=()=>{++u==n.length&&oc(a,t,o.filter(v=>v!=null).join(a.state.lineBreak),!1)};for(let v=0;v<n.length;v++){let S=new FileReader;S.onerror=p,S.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(S.result)||(o[v]=S.result),p()},S.readAsText(n[v])}}else oc(a,t,t.dataTransfer.getData("Text"),!0)},As.paste=(a,t)=>{if(a.state.readOnly)return t.preventDefault();a.observer.flush();let n=uf?null:t.clipboardData;n?(cf(a,n.getData("text/plain")),t.preventDefault()):_f(a)};function sc(a,t){let n=a.dom.parentNode;if(!n)return;let o=n.appendChild(document.createElement("textarea"));o.style.cssText="position: fixed; left: -10000px; top: 10px",o.value=t,o.focus(),o.selectionEnd=t.length,o.selectionStart=0,setTimeout(()=>{o.remove(),a.focus()},50)}function pf(a){let t=[],n=[],o=!1;for(let u of a.selection.ranges)u.empty||(t.push(a.sliceDoc(u.from,u.to)),n.push(u));if(!t.length){let u=-1;for(let{from:p}of a.selection.ranges){let v=a.doc.lineAt(p);v.number>u&&(t.push(v.text),n.push({from:v.from,to:Math.min(a.doc.length,v.to+1)})),u=v.number}o=!0}return{text:t.join(a.lineBreak),ranges:n,linewise:o}}let ql=null;As.copy=As.cut=(a,t)=>{let{text:n,ranges:o,linewise:u}=pf(a.state);if(!n&&!u)return;ql=u?n:null;let p=uf?null:t.clipboardData;p?(t.preventDefault(),p.clearData(),p.setData("text/plain",n)):sc(a,n),t.type=="cut"&&!a.state.readOnly&&a.dispatch({changes:o,scrollIntoView:!0,userEvent:"delete.cut"})};function vs(a){setTimeout(()=>{a.hasFocus!=a.inputState.notifiedFocused&&a.update([])},10)}As.focus=a=>{a.inputState.lastFocusTime=Date.now(),!a.scrollDOM.scrollTop&&(a.inputState.lastScrollTop||a.inputState.lastScrollLeft)&&(a.scrollDOM.scrollTop=a.inputState.lastScrollTop,a.scrollDOM.scrollLeft=a.inputState.lastScrollLeft),vs(a)},As.blur=a=>{a.observer.clearSelectionRange(),vs(a)},As.compositionstart=As.compositionupdate=a=>{a.inputState.compositionFirstChange==null&&(a.inputState.compositionFirstChange=!0),a.inputState.composing<0&&(a.inputState.composing=0)},As.compositionend=a=>{a.inputState.composing=-1,a.inputState.compositionEndedAt=Date.now(),a.inputState.compositionFirstChange=null,xr.chrome&&xr.android&&a.observer.flushSoon(),setTimeout(()=>{a.inputState.composing<0&&a.docView.compositionDeco.size&&a.update([])},50)},As.contextmenu=a=>{a.inputState.lastContextMenu=Date.now()},As.beforeinput=(a,t)=>{var n;let o;if(xr.chrome&&xr.android&&(o=$c.find(u=>u.inputType==t.inputType))&&(a.observer.delayAndroidKey(o.key,o.keyCode),o.key=="Backspace"||o.key=="Delete")){let u=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var p;(((p=window.visualViewport)===null||p===void 0?void 0:p.height)||0)>u+10&&a.hasFocus&&(a.contentDOM.blur(),a.focus())},100)}};const mu=["pre-wrap","normal","pre-line","break-spaces"];class ac{constructor(t){this.lineWrapping=t,this.doc=Cn.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}heightForGap(t,n){let o=this.doc.lineAt(n).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(o+=Math.ceil((n-t-o*this.lineLength*.5)/this.lineLength)),this.lineHeight*o}heightForLine(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return mu.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let n=!1;for(let o=0;o<t.length;o++){let u=t[o];u<0?o++:this.heightSamples[Math.floor(u*10)]||(n=!0,this.heightSamples[Math.floor(u*10)]=!0)}return n}refresh(t,n,o,u,p){let v=mu.indexOf(t)>-1,S=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=v;if(this.lineWrapping=v,this.lineHeight=n,this.charWidth=o,this.lineLength=u,S){this.heightSamples={};for(let A=0;A<p.length;A++){let H=p[A];H<0?A++:this.heightSamples[Math.floor(H*10)]=!0}}return S}}class jc{constructor(t,n){this.from=t,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Wa{constructor(t,n,o,u,p){this.from=t,this.length=n,this.top=o,this.height=u,this.type=p}get to(){return this.from+this.length}get bottom(){return this.top+this.height}join(t){let n=(Array.isArray(this.type)?this.type:[this]).concat(Array.isArray(t.type)?t.type:[t]);return new Wa(this.from,this.length+t.length,this.top,this.height+t.height,n)}}var rs=function(a){return a[a.ByPos=0]="ByPos",a[a.ByHeight=1]="ByHeight",a[a.ByPosNoHeight=2]="ByPosNoHeight",a}(rs||(rs={}));const za=.001;class Oo{constructor(t,n,o=2){this.length=t,this.height=n,this.flags=o}get outdated(){return(this.flags&2)>0}set outdated(t){this.flags=(t?2:0)|this.flags&-3}setHeight(t,n){this.height!=n&&(Math.abs(this.height-n)>za&&(t.heightChanged=!0),this.height=n)}replace(t,n,o){return Oo.of(o)}decomposeLeft(t,n){n.push(this)}decomposeRight(t,n){n.push(this)}applyChanges(t,n,o,u){let p=this;for(let v=u.length-1;v>=0;v--){let{fromA:S,toA:A,fromB:H,toB:X}=u[v],Me=p.lineAt(S,rs.ByPosNoHeight,n,0,0),gt=Me.to>=A?Me:p.lineAt(A,rs.ByPosNoHeight,n,0,0);for(X+=gt.to-A,A=gt.to;v>0&&Me.from<=u[v-1].toA;)S=u[v-1].fromA,H=u[v-1].fromB,v--,S<Me.from&&(Me=p.lineAt(S,rs.ByPosNoHeight,n,0,0));H+=Me.from-S,S=Me.from;let It=Fs.build(o,t,H,X);p=p.replace(S,A,It)}return p.updateHeight(o,0)}static empty(){return new Ho(0,0)}static of(t){if(t.length==1)return t[0];let n=0,o=t.length,u=0,p=0;for(;;)if(n==o)if(u>p*2){let S=t[n-1];S.break?t.splice(--n,1,S.left,null,S.right):t.splice(--n,1,S.left,S.right),o+=1+S.break,u-=S.size}else if(p>u*2){let S=t[o];S.break?t.splice(o,1,S.left,null,S.right):t.splice(o,1,S.left,S.right),o+=2+S.break,p-=S.size}else break;else if(u<p){let S=t[n++];S&&(u+=S.size)}else{let S=t[--o];S&&(p+=S.size)}let v=0;return t[n-1]==null?(v=1,n--):t[n]==null&&(v=1,o++),new gu(Oo.of(t.slice(0,n)),v,Oo.of(t.slice(o)))}}Oo.prototype.size=1;class Ts extends Oo{constructor(t,n,o){super(t,n),this.type=o}blockAt(t,n,o,u){return new Wa(u,this.length,o,this.height,this.type)}lineAt(t,n,o,u,p){return this.blockAt(0,o,u,p)}forEachLine(t,n,o,u,p,v){t<=p+this.length&&n>=p&&v(this.blockAt(0,o,u,p))}updateHeight(t,n=0,o=!1,u){return u&&u.from<=n&&u.more&&this.setHeight(t,u.heights[u.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ho extends Ts{constructor(t,n){super(t,n,Ro.Text),this.collapsed=0,this.widgetHeight=0}replace(t,n,o){let u=o[0];return o.length==1&&(u instanceof Ho||u instanceof Ns&&u.flags&4)&&Math.abs(this.length-u.length)<10?(u instanceof Ns?u=new Ho(u.length,this.height):u.height=this.height,this.outdated||(u.outdated=!1),u):Oo.of(o)}updateHeight(t,n=0,o=!1,u){return u&&u.from<=n&&u.more?this.setHeight(t,u.heights[u.index++]):(o||this.outdated)&&this.setHeight(t,Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ns extends Oo{constructor(t){super(t,0)}lines(t,n){let o=t.lineAt(n).number,u=t.lineAt(n+this.length).number;return{firstLine:o,lastLine:u,lineHeight:this.height/(u-o+1)}}blockAt(t,n,o,u){let{firstLine:p,lastLine:v,lineHeight:S}=this.lines(n,u),A=Math.max(0,Math.min(v-p,Math.floor((t-o)/S))),{from:H,length:X}=n.line(p+A);return new Wa(H,X,o+S*A,S,Ro.Text)}lineAt(t,n,o,u,p){if(n==rs.ByHeight)return this.blockAt(t,o,u,p);if(n==rs.ByPosNoHeight){let{from:Me,to:gt}=o.lineAt(t);return new Wa(Me,gt-Me,0,0,Ro.Text)}let{firstLine:v,lineHeight:S}=this.lines(o,p),{from:A,length:H,number:X}=o.lineAt(t);return new Wa(A,H,u+S*(X-v),S,Ro.Text)}forEachLine(t,n,o,u,p,v){let{firstLine:S,lineHeight:A}=this.lines(o,p);for(let H=Math.max(t,p),X=Math.min(p+this.length,n);H<=X;){let Me=o.lineAt(H);H==t&&(u+=A*(Me.number-S)),v(new Wa(Me.from,Me.length,u,A,Ro.Text)),u+=A,H=Me.to+1}}replace(t,n,o){let u=this.length-n;if(u>0){let p=o[o.length-1];p instanceof Ns?o[o.length-1]=new Ns(p.length+u):o.push(null,new Ns(u-1))}if(t>0){let p=o[0];p instanceof Ns?o[0]=new Ns(t+p.length):o.unshift(new Ns(t-1),null)}return Oo.of(o)}decomposeLeft(t,n){n.push(new Ns(t-1),null)}decomposeRight(t,n){n.push(null,new Ns(this.length-t-1))}updateHeight(t,n=0,o=!1,u){let p=n+this.length;if(u&&u.from<=n+this.length&&u.more){let v=[],S=Math.max(n,u.from),A=-1,H=t.heightChanged;for(u.from>n&&v.push(new Ns(u.from-n-1).updateHeight(t,n));S<=p&&u.more;){let Me=t.doc.lineAt(S).length;v.length&&v.push(null);let gt=u.heights[u.index++];A==-1?A=gt:Math.abs(gt-A)>=za&&(A=-2);let It=new Ho(Me,gt);It.outdated=!1,v.push(It),S+=Me+1}S<=p&&v.push(null,new Ns(p-S).updateHeight(t,S));let X=Oo.of(v);return t.heightChanged=H||A<0||Math.abs(X.height-this.height)>=za||Math.abs(A-this.lines(t.doc,n).lineHeight)>=za,X}else(o||this.outdated)&&(this.setHeight(t,t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class gu extends Oo{constructor(t,n,o){super(t.length+n+o.length,t.height+o.height,n|(t.outdated||o.outdated?2:0)),this.left=t,this.right=o,this.size=t.size+o.size}get break(){return this.flags&1}blockAt(t,n,o,u){let p=o+this.left.height;return t<p?this.left.blockAt(t,n,o,u):this.right.blockAt(t,n,p,u+this.left.length+this.break)}lineAt(t,n,o,u,p){let v=u+this.left.height,S=p+this.left.length+this.break,A=n==rs.ByHeight?t<v:t<S,H=A?this.left.lineAt(t,n,o,u,p):this.right.lineAt(t,n,o,v,S);if(this.break||(A?H.to<S:H.from>S))return H;let X=n==rs.ByPosNoHeight?rs.ByPosNoHeight:rs.ByPos;return A?H.join(this.right.lineAt(S,X,o,v,S)):this.left.lineAt(S,X,o,u,p).join(H)}forEachLine(t,n,o,u,p,v){let S=u+this.left.height,A=p+this.left.length+this.break;if(this.break)t<A&&this.left.forEachLine(t,n,o,u,p,v),n>=A&&this.right.forEachLine(t,n,o,S,A,v);else{let H=this.lineAt(A,rs.ByPos,o,u,p);t<H.from&&this.left.forEachLine(t,H.from-1,o,u,p,v),H.to>=t&&H.from<=n&&v(H),n>H.to&&this.right.forEachLine(H.to+1,n,o,S,A,v)}}replace(t,n,o){let u=this.left.length+this.break;if(n<u)return this.balanced(this.left.replace(t,n,o),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-u,n-u,o));let p=[];t>0&&this.decomposeLeft(t,p);let v=p.length;for(let S of o)p.push(S);if(t>0&&eu(p,v-1),n<this.length){let S=p.length;this.decomposeRight(n,p),eu(p,S)}return Oo.of(p)}decomposeLeft(t,n){let o=this.left.length;if(t<=o)return this.left.decomposeLeft(t,n);n.push(this.left),this.break&&(o++,t>=o&&n.push(null)),t>o&&this.right.decomposeLeft(t-o,n)}decomposeRight(t,n){let o=this.left.length,u=o+this.break;if(t>=u)return this.right.decomposeRight(t-u,n);t<o&&this.left.decomposeRight(t,n),this.break&&t<u&&n.push(null),n.push(this.right)}balanced(t,n){return t.size>2*n.size||n.size>2*t.size?Oo.of(this.break?[t,null,n]:[t,n]):(this.left=t,this.right=n,this.height=t.height+n.height,this.outdated=t.outdated||n.outdated,this.size=t.size+n.size,this.length=t.length+this.break+n.length,this)}updateHeight(t,n=0,o=!1,u){let{left:p,right:v}=this,S=n+p.length+this.break,A=null;return u&&u.from<=n+p.length&&u.more?A=p=p.updateHeight(t,n,o,u):p.updateHeight(t,n,o),u&&u.from<=S+v.length&&u.more?A=v=v.updateHeight(t,S,o,u):v.updateHeight(t,S,o),A?this.balanced(p,v):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function eu(a,t){let n,o;a[t]==null&&(n=a[t-1])instanceof Ns&&(o=a[t+1])instanceof Ns&&a.splice(t-1,3,new Ns(n.length+1+o.length))}const qf=5;class Fs{constructor(t,n){this.pos=t,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,n){if(this.lineStart>-1){let o=Math.min(n,this.lineEnd),u=this.nodes[this.nodes.length-1];u instanceof Ho?u.length+=o-this.pos:(o>this.pos||!this.isCovered)&&this.nodes.push(new Ho(o-this.pos,-1)),this.writtenTo=o,n>o&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(t,n,o){if(t<n||o.heightRelevant){let u=o.widget?o.widget.estimatedHeight:0;u<0&&(u=this.oracle.lineHeight);let p=n-t;o.block?this.addBlock(new Ts(p,u,o.type)):(p||u>=qf)&&this.addLineDeco(u,p)}else n>t&&this.span(t,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=n,this.writtenTo<t&&((this.writtenTo<t-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new Ho(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,n){let o=new Ns(n-t);return this.oracle.doc.lineAt(t).to==n&&(o.flags|=4),o}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Ho)return t;let n=new Ho(0,-1);return this.nodes.push(n),n}addBlock(t){this.enterLine(),t.type==Ro.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,t.type!=Ro.WidgetBefore&&(this.covering=t)}addLineDeco(t,n){let o=this.ensureLine();o.length+=n,o.collapsed+=n,o.widgetHeight=Math.max(o.widgetHeight,t),this.writtenTo=this.pos=this.pos+n}finish(t){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ho)&&!this.isCovered?this.nodes.push(new Ho(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let o=t;for(let u of this.nodes)u instanceof Ho&&u.updateHeight(this.oracle,o),o+=u?u.length:1;return this.nodes}static build(t,n,o,u){let p=new Fs(o,t);return hi.spans(n,o,u,p,0),p.finish(o)}}function Uc(a,t,n){let o=new mf;return hi.compare(a,t,n,o,0),o.changes}class mf{constructor(){this.changes=[]}compareRange(){}comparePoint(t,n,o,u){(t<n||o&&o.heightRelevant||u&&u.heightRelevant)&&ou(t,n,this.changes,5)}}function lc(a,t){let n=a.getBoundingClientRect(),o=a.ownerDocument,u=o.defaultView||window,p=Math.max(0,n.left),v=Math.min(u.innerWidth,n.right),S=Math.max(0,n.top),A=Math.min(u.innerHeight,n.bottom);for(let H=a.parentNode;H&&H!=o.body;)if(H.nodeType==1){let X=H,Me=window.getComputedStyle(X);if((X.scrollHeight>X.clientHeight||X.scrollWidth>X.clientWidth)&&Me.overflow!="visible"){let gt=X.getBoundingClientRect();p=Math.max(p,gt.left),v=Math.min(v,gt.right),S=Math.max(S,gt.top),A=H==a.parentNode?gt.bottom:Math.min(A,gt.bottom)}H=Me.position=="absolute"||Me.position=="fixed"?X.offsetParent:X.parentNode}else if(H.nodeType==11)H=H.host;else break;return{left:p-n.left,right:Math.max(p,v)-n.left,top:S-(n.top+t),bottom:Math.max(S,A)-(n.top+t)}}function ml(a,t){let n=a.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class Ca{constructor(t,n,o){this.from=t,this.to=n,this.size=o}static same(t,n){if(t.length!=n.length)return!1;for(let o=0;o<t.length;o++){let u=t[o],p=n[o];if(u.from!=p.from||u.to!=p.to||u.size!=p.size)return!1}return!0}draw(t){return Lr.replace({widget:new _u(this.size,t)}).range(this.from,this.to)}}class _u extends ba{constructor(t,n){super(),this.size=t,this.vertical=n}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");return this.vertical?t.style.height=this.size+"px":(t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block"),t}get estimatedHeight(){return this.vertical?this.size:-1}}class uc{constructor(t){this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaler=yf,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=ts.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(Ml).some(o=>typeof o!="function"&&o.class=="cm-lineWrapping");this.heightOracle=new ac(n),this.stateDeco=t.facet(qa).filter(o=>typeof o!="function"),this.heightMap=Oo.empty().applyChanges(this.stateDeco,Cn.empty,this.heightOracle.setDoc(t.doc),[new Ps(0,0,0,t.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Lr.set(this.lineGaps.map(o=>o.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:n}=this.state.selection;for(let o=0;o<=1;o++){let u=o?n.head:n.anchor;if(!t.some(({from:p,to:v})=>u>=p&&u<=v)){let{from:p,to:v}=this.lineBlockAt(u);t.push(new vu(p,v))}}this.viewports=t.sort((o,u)=>o.from-u.from),this.scaler=this.heightMap.height<=7e6?yf:new Lf(this.heightOracle.doc,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,t=>{this.viewportLines.push(this.scaler.scale==1?t:Pl(t,this.scaler))})}update(t,n=null){this.state=t.state;let o=this.stateDeco;this.stateDeco=this.state.facet(qa).filter(H=>typeof H!="function");let u=t.changedRanges,p=Ps.extendWithRanges(u,Uc(o,this.stateDeco,t?t.changes:Jn.empty(this.state.doc.length))),v=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),p),this.heightMap.height!=v&&(t.flags|=2);let S=p.length?this.mapViewport(this.viewport,t.changes):this.viewport;(n&&(n.range.head<S.from||n.range.head>S.to)||!this.viewportIsAppropriate(S))&&(S=this.getViewport(0,n));let A=!t.changes.empty||t.flags&2||S.from!=this.viewport.from||S.to!=this.viewport.to;this.viewport=S,this.updateForViewport(),A&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(jl)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let n=t.contentDOM,o=window.getComputedStyle(n),u=this.heightOracle,p=o.whiteSpace;this.defaultTextDirection=o.direction=="rtl"?ts.RTL:ts.LTR;let v=this.heightOracle.mustRefreshForWrapping(p),S=v||this.mustMeasureContent||this.contentDOMHeight!=n.clientHeight;this.contentDOMHeight=n.clientHeight,this.mustMeasureContent=!1;let A=0,H=0,X=parseInt(o.paddingTop)||0,Me=parseInt(o.paddingBottom)||0;(this.paddingTop!=X||this.paddingBottom!=Me)&&(this.paddingTop=X,this.paddingBottom=Me,A|=10),this.editorWidth!=t.scrollDOM.clientWidth&&(u.lineWrapping&&(S=!0),this.editorWidth=t.scrollDOM.clientWidth,A|=8);let gt=(this.printing?ml:lc)(n,this.paddingTop),It=gt.top-this.pixelViewport.top,un=gt.bottom-this.pixelViewport.bottom;this.pixelViewport=gt;let or=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(or!=this.inView&&(this.inView=or,or&&(S=!0)),!this.inView&&!this.scrollTarget)return 0;let ar=n.clientWidth;if((this.contentDOMWidth!=ar||this.editorHeight!=t.scrollDOM.clientHeight)&&(this.contentDOMWidth=ar,this.editorHeight=t.scrollDOM.clientHeight,A|=8),S){let Si=t.docView.measureVisibleLineHeights(this.viewport);if(u.mustRefreshForHeights(Si)&&(v=!0),v||u.lineWrapping&&Math.abs(ar-this.contentDOMWidth)>u.charWidth){let{lineHeight:ki,charWidth:mi}=t.docView.measureTextSize();v=ki>0&&u.refresh(p,ki,mi,ar/mi,Si),v&&(t.docView.minWidth=0,A|=8)}It>0&&un>0?H=Math.max(It,un):It<0&&un<0&&(H=Math.min(It,un)),u.heightChanged=!1;for(let ki of this.viewports){let mi=ki.from==this.viewport.from?Si:t.docView.measureVisibleLineHeights(ki);this.heightMap=(v?Oo.empty().applyChanges(this.stateDeco,Cn.empty,this.heightOracle,[new Ps(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(u,0,v,new jc(ki.from,mi))}u.heightChanged&&(A|=2)}let wr=!this.viewportIsAppropriate(this.viewport,H)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return wr&&(this.viewport=this.getViewport(H,this.scrollTarget)),this.updateForViewport(),(A&2||wr)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(v?[]:this.lineGaps,t)),A|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),A}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,n){let o=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),u=this.heightMap,p=this.state.doc,{visibleTop:v,visibleBottom:S}=this,A=new vu(u.lineAt(v-o*1e3,rs.ByHeight,p,0,0).from,u.lineAt(S+(1-o)*1e3,rs.ByHeight,p,0,0).to);if(n){let{head:H}=n.range;if(H<A.from||H>A.to){let X=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),Me=u.lineAt(H,rs.ByPos,p,0,0),gt;n.y=="center"?gt=(Me.top+Me.bottom)/2-X/2:n.y=="start"||n.y=="nearest"&&H<A.from?gt=Me.top:gt=Me.bottom-X,A=new vu(u.lineAt(gt-1e3/2,rs.ByHeight,p,0,0).from,u.lineAt(gt+X+1e3/2,rs.ByHeight,p,0,0).to)}}return A}mapViewport(t,n){let o=n.mapPos(t.from,-1),u=n.mapPos(t.to,1);return new vu(this.heightMap.lineAt(o,rs.ByPos,this.state.doc,0,0).from,this.heightMap.lineAt(u,rs.ByPos,this.state.doc,0,0).to)}viewportIsAppropriate({from:t,to:n},o=0){if(!this.inView)return!0;let{top:u}=this.heightMap.lineAt(t,rs.ByPos,this.state.doc,0,0),{bottom:p}=this.heightMap.lineAt(n,rs.ByPos,this.state.doc,0,0),{visibleTop:v,visibleBottom:S}=this;return(t==0||u<=v-Math.max(10,Math.min(-o,250)))&&(n==this.state.doc.length||p>=S+Math.max(10,Math.min(o,250)))&&u>v-2*1e3&&p<S+2*1e3}mapLineGaps(t,n){if(!t.length||n.empty)return t;let o=[];for(let u of t)n.touchesRange(u.from,u.to)||o.push(new Ca(n.mapPos(u.from),n.mapPos(u.to),u.size));return o}ensureLineGaps(t,n){let o=this.heightOracle.lineWrapping,u=o?1e4:2e3,p=u>>1,v=u<<1;if(this.defaultTextDirection!=ts.LTR&&!o)return[];let S=[],A=(H,X,Me,gt)=>{if(X-H<p)return;let It=this.state.selection.main,un=[It.from];It.empty||un.push(It.to);for(let ar of un)if(ar>H&&ar<X){A(H,ar-10,Me,gt),A(ar+10,X,Me,gt);return}let or=vf(t,ar=>ar.from>=Me.from&&ar.to<=Me.to&&Math.abs(ar.from-H)<p&&Math.abs(ar.to-X)<p&&!un.some(wr=>ar.from<wr&&ar.to>wr));if(!or){if(X<Me.to&&n&&o&&n.visibleRanges.some(ar=>ar.from<=X&&ar.to>=X)){let ar=n.moveToLineBoundary(ue.cursor(X),!1,!0).head;ar>H&&(X=ar)}or=new Ca(H,X,this.gapSize(Me,H,X,gt))}S.push(or)};for(let H of this.viewportLines){if(H.length<v)continue;let X=gf(H.from,H.to,this.stateDeco);if(X.total<v)continue;let Me=this.scrollTarget?this.scrollTarget.range.head:null,gt,It;if(o){let un=u/this.heightOracle.lineLength*this.heightOracle.lineHeight,or,ar;if(Me!=null){let wr=cc(X,Me),Si=((this.visibleBottom-this.visibleTop)/2+un)/H.height;or=wr-Si,ar=wr+Si}else or=(this.visibleTop-H.top-un)/H.height,ar=(this.visibleBottom-H.top+un)/H.height;gt=yu(X,or),It=yu(X,ar)}else{let un=X.total*this.heightOracle.charWidth,or=u*this.heightOracle.charWidth,ar,wr;if(Me!=null){let Si=cc(X,Me),ki=((this.pixelViewport.right-this.pixelViewport.left)/2+or)/un;ar=Si-ki,wr=Si+ki}else ar=(this.pixelViewport.left-or)/un,wr=(this.pixelViewport.right+or)/un;gt=yu(X,ar),It=yu(X,wr)}gt>H.from&&A(H.from,gt,H,X),It<H.to&&A(It,H.to,H,X)}return S}gapSize(t,n,o,u){let p=cc(u,o)-cc(u,n);return this.heightOracle.lineWrapping?t.height*p:u.total*this.heightOracle.charWidth*p}updateLineGaps(t){Ca.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=Lr.set(t.map(n=>n.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];hi.spans(t,this.viewport.from,this.viewport.to,{span(u,p){n.push({from:u,to:p})},point(){}},20);let o=n.length!=this.visibleRanges.length||this.visibleRanges.some((u,p)=>u.from!=n[p].from||u.to!=n[p].to);return this.visibleRanges=n,o?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find(n=>n.from<=t&&n.to>=t)||Pl(this.heightMap.lineAt(t,rs.ByPos,this.state.doc,0,0),this.scaler)}lineBlockAtHeight(t){return Pl(this.heightMap.lineAt(this.scaler.fromDOM(t),rs.ByHeight,this.state.doc,0,0),this.scaler)}elementAtHeight(t){return Pl(this.heightMap.blockAt(this.scaler.fromDOM(t),this.state.doc,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class vu{constructor(t,n){this.from=t,this.to=n}}function gf(a,t,n){let o=[],u=a,p=0;return hi.spans(n,a,t,{span(){},point(v,S){v>u&&(o.push({from:u,to:v}),p+=v-u),u=S}},20),u<t&&(o.push({from:u,to:t}),p+=t-u),{total:p,ranges:o}}function yu({total:a,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let o=Math.floor(a*n);for(let u=0;;u++){let{from:p,to:v}=t[u],S=v-p;if(o<=S)return p+o;o-=S}}function cc(a,t){let n=0;for(let{from:o,to:u}of a.ranges){if(t<=u){n+=t-o;break}n+=u-o}return n/a.total}function vf(a,t){for(let n of a)if(t(n))return n}const yf={toDOM(a){return a},fromDOM(a){return a},scale:1};class Lf{constructor(t,n,o){let u=0,p=0,v=0;this.viewports=o.map(({from:S,to:A})=>{let H=n.lineAt(S,rs.ByPos,t,0,0).top,X=n.lineAt(A,rs.ByPos,t,0,0).bottom;return u+=X-H,{from:S,to:A,top:H,bottom:X,domTop:0,domBottom:0}}),this.scale=(7e6-u)/(n.height-u);for(let S of this.viewports)S.domTop=v+(S.top-p)*this.scale,v=S.domBottom=S.domTop+(S.bottom-S.top),p=S.bottom}toDOM(t){for(let n=0,o=0,u=0;;n++){let p=n<this.viewports.length?this.viewports[n]:null;if(!p||t<p.top)return u+(t-o)*this.scale;if(t<=p.bottom)return p.domTop+(t-p.top);o=p.bottom,u=p.domBottom}}fromDOM(t){for(let n=0,o=0,u=0;;n++){let p=n<this.viewports.length?this.viewports[n]:null;if(!p||t<p.domTop)return o+(t-u)/this.scale;if(t<=p.domBottom)return p.top+(t-p.domTop);o=p.bottom,u=p.domBottom}}}function Pl(a,t){if(t.scale==1)return a;let n=t.toDOM(a.top),o=t.toDOM(a.bottom);return new Wa(a.from,a.length,n,o-n,Array.isArray(a.type)?a.type.map(u=>Pl(u,t)):a.type)}const Lu=ft.define({combine:a=>a.join(" ")}),tu=ft.define({combine:a=>a.indexOf(!0)>-1}),Wc=pr.newName(),fc=pr.newName(),dc=pr.newName(),Ef={"&light":"."+fc,"&dark":"."+dc};function zo(a,t,n){return new pr(t,{finish(o){return/&/.test(o)?o.replace(/&\w*/,u=>{if(u=="&")return a;if(!n||!n[u])throw new RangeError(`Unsupported selector: ${u}`);return n[u]}):a+" "+o}})}const $f=zo("."+Wc,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Ef);class Al{constructor(t,n,o,u){this.typeOver=u,this.bounds=null,this.text="";let{impreciseHead:p,impreciseAnchor:v}=t.docView;if(t.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=t.docView.domBoundsAround(n,o,0))){let S=p||v?[]:Qs(t),A=new Dc(S,t.state);A.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=A.text,this.newSel=Wl(S,this.bounds.from)}else{let S=t.observer.selectionRange,A=p&&p.node==S.focusNode&&p.offset==S.focusOffset||!Qn(t.contentDOM,S.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(S.focusNode,S.focusOffset),H=v&&v.node==S.anchorNode&&v.offset==S.anchorOffset||!Qn(t.contentDOM,S.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(S.anchorNode,S.anchorOffset);this.newSel=ue.single(H,A)}}}function zc(a,t){let n,{newSel:o}=t,u=a.state.selection.main;if(t.bounds){let{from:p,to:v}=t.bounds,S=u.from,A=null;(a.inputState.lastKeyCode===8&&a.inputState.lastKeyTime>Date.now()-100||xr.android&&t.text.length<v-p)&&(S=u.to,A="end");let H=bf(a.state.doc.sliceString(p,v,Pa),t.text,S-p,A);H&&(xr.chrome&&a.inputState.lastKeyCode==13&&H.toB==H.from+2&&t.text.slice(H.from,H.toB)==Pa+Pa&&H.toB--,n={from:p+H.from,to:p+H.toA,insert:Cn.of(t.text.slice(H.from,H.toB).split(Pa))})}else o&&(!a.hasFocus&&a.state.facet(Ba)||o.main.eq(u))&&(o=null);if(!n&&!o)return!1;if(!n&&t.typeOver&&!u.empty&&o&&o.main.empty?n={from:u.from,to:u.to,insert:a.state.doc.slice(u.from,u.to)}:n&&n.from>=u.from&&n.to<=u.to&&(n.from!=u.from||n.to!=u.to)&&u.to-u.from-(n.to-n.from)<=4?n={from:u.from,to:u.to,insert:a.state.doc.slice(u.from,n.from).append(n.insert).append(a.state.doc.slice(n.to,u.to))}:(xr.mac||xr.android)&&n&&n.from==n.to&&n.from==u.head-1&&/^\. ?$/.test(n.insert.toString())?(o&&n.insert.length==2&&(o=ue.single(o.main.anchor-1,o.main.head-1)),n={from:u.from,to:u.to,insert:Cn.of([" "])}):xr.chrome&&n&&n.from==n.to&&n.from==u.head&&n.insert.toString()==`
2195
+ `&&a.lineWrapping&&(o&&(o=ue.single(o.main.anchor-1,o.main.head-1)),n={from:u.from,to:u.to,insert:Cn.of([" "])}),n){let p=a.state;if(xr.ios&&a.inputState.flushIOSKey(a)||xr.android&&(n.from==u.from&&n.to==u.to&&n.insert.length==1&&n.insert.lines==2&&Fo(a.contentDOM,"Enter",13)||n.from==u.from-1&&n.to==u.to&&n.insert.length==0&&Fo(a.contentDOM,"Backspace",8)||n.from==u.from&&n.to==u.to+1&&n.insert.length==0&&Fo(a.contentDOM,"Delete",46)))return!0;let v=n.insert.toString();if(a.state.facet(Xa).some(H=>H(a,n.from,n.to,v)))return!0;a.inputState.composing>=0&&a.inputState.composing++;let S;if(n.from>=u.from&&n.to<=u.to&&n.to-n.from>=(u.to-u.from)/3&&(!o||o.main.empty&&o.main.from==n.from+n.insert.length)&&a.inputState.composing<0){let H=u.from<n.from?p.sliceDoc(u.from,n.from):"",X=u.to>n.to?p.sliceDoc(n.to,u.to):"";S=p.replaceSelection(a.state.toText(H+n.insert.sliceString(0,void 0,a.state.lineBreak)+X))}else{let H=p.changes(n),X=o&&!p.selection.main.eq(o.main)&&o.main.to<=H.newLength?o.main:void 0;if(p.selection.ranges.length>1&&a.inputState.composing>=0&&n.to<=u.to&&n.to>=u.to-10){let Me=a.state.sliceDoc(n.from,n.to),gt=hl(a)||a.state.doc.lineAt(u.head),It=u.to-n.to,un=u.to-u.from;S=p.changeByRange(or=>{if(or.from==u.from&&or.to==u.to)return{changes:H,range:X||or.map(H)};let ar=or.to-It,wr=ar-Me.length;if(or.to-or.from!=un||a.state.sliceDoc(wr,ar)!=Me||gt&&or.to>=gt.from&&or.from<=gt.to)return{range:or};let Si=p.changes({from:wr,to:ar,insert:n.insert}),ki=or.to-u.to;return{changes:Si,range:X?ue.range(Math.max(0,X.anchor+ki),Math.max(0,X.head+ki)):or.map(Si)}})}else S={changes:H,selection:X&&p.selection.replaceRange(X)}}let A="input.type";return a.composing&&(A+=".compose",a.inputState.compositionFirstChange&&(A+=".start",a.inputState.compositionFirstChange=!1)),a.dispatch(S,{scrollIntoView:!0,userEvent:A}),!0}else if(o&&!o.main.eq(u)){let p=!1,v="select";return a.inputState.lastSelectionTime>Date.now()-50&&(a.inputState.lastSelectionOrigin=="select"&&(p=!0),v=a.inputState.lastSelectionOrigin),a.dispatch({selection:o,scrollIntoView:p,userEvent:v}),!0}else return!1}function bf(a,t,n,o){let u=Math.min(a.length,t.length),p=0;for(;p<u&&a.charCodeAt(p)==t.charCodeAt(p);)p++;if(p==u&&a.length==t.length)return null;let v=a.length,S=t.length;for(;v>0&&S>0&&a.charCodeAt(v-1)==t.charCodeAt(S-1);)v--,S--;if(o=="end"){let A=Math.max(0,p-Math.min(v,S));n-=v+A-p}if(v<p&&a.length<t.length){let A=n<=p&&n>=v?p-n:0;p-=A,S=p+(S-v),v=p}else if(S<p){let A=n<=p&&n>=S?p-n:0;p-=A,v=p+(v-S),S=p}return{from:p,toA:v,toB:S}}function Qs(a){let t=[];if(a.root.activeElement!=a.contentDOM)return t;let{anchorNode:n,anchorOffset:o,focusNode:u,focusOffset:p}=a.observer.selectionRange;return n&&(t.push(new Pc(n,o)),(u!=n||p!=o)&&t.push(new Pc(u,p))),t}function Wl(a,t){if(a.length==0)return null;let n=a[0].pos,o=a.length==2?a[1].pos:n;return n>-1&&o>-1?ue.single(n+t,o+t):null}const Nf={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},$u=xr.ie&&xr.ie_version<=11;class fd{constructor(t){this.view=t,this.active=!1,this.selectionRange=new Ds,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver(n=>{for(let o of n)this.queue.push(o);(xr.ie&&xr.ie_version<=11||xr.ios&&t.composing)&&n.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),$u&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(t.scrollDOM),this.resizeContent=new ResizeObserver(()=>this.view.requestMeasure()),this.resizeContent.observe(t.contentDOM)),this.addWindowListeners(this.win=t.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runScrollHandlers(this.view,t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some((n,o)=>n!=t[o]))){this.gapIntersection.disconnect();for(let n of t)this.gapIntersection.observe(n);this.gaps=t}}onSelectionChange(t){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:o}=this,u=this.selectionRange;if(o.state.facet(Ba)?o.root.activeElement!=this.dom:!ua(o.dom,u))return;let p=u.anchorNode&&o.docView.nearest(u.anchorNode);if(p&&p.ignoreEvent(t)){n||(this.selectionChanged=!1);return}(xr.ie&&xr.ie_version<=11||xr.android&&xr.chrome)&&!o.state.selection.main.empty&&u.focusNode&&Zs(u.focusNode,u.focusOffset,u.anchorNode,u.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,n=xr.safari&&t.root.nodeType==11&&ms(this.dom.ownerDocument)==this.dom&&xf(this.view)||Es(t.root);if(!n||this.selectionRange.eq(n))return!1;let o=ua(this.dom,n);return o&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&$a(this.dom,n)?(this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1):(this.selectionRange.setRange(n),o&&(this.selectionChanged=!0),!0)}setSelectionRange(t,n){this.selectionRange.set(t.node,t.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,n=null;for(let o=this.dom;o;)if(o.nodeType==1)!n&&t<this.scrollTargets.length&&this.scrollTargets[t]==o?t++:n||(n=this.scrollTargets.slice(0,t)),n&&n.push(o),o=o.assignedSlot||o.parentNode;else if(o.nodeType==11)o=o.host;else break;if(t<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,t)),n){for(let o of this.scrollTargets)o.removeEventListener("scroll",this.onScroll);for(let o of this.scrollTargets=n)o.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Nf),$u&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),$u&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,n){var o;if(!this.delayedAndroidKey){let u=()=>{let p=this.delayedAndroidKey;p&&(this.clearDelayedAndroidKey(),!this.flush()&&p.force&&Fo(this.dom,p.key,p.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(u)}(!this.delayedAndroidKey||t=="Enter")&&(this.delayedAndroidKey={key:t,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((o=this.delayedAndroidKey)===null||o===void 0)&&o.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}processRecords(){let t=this.queue;for(let p of this.observer.takeRecords())t.push(p);t.length&&(this.queue=[]);let n=-1,o=-1,u=!1;for(let p of t){let v=this.readMutation(p);v&&(v.typeOver&&(u=!0),n==-1?{from:n,to:o}=v:(n=Math.min(v.from,n),o=Math.max(v.to,o)))}return{from:n,to:o,typeOver:u}}readChange(){let{from:t,to:n,typeOver:o}=this.processRecords(),u=this.selectionChanged&&ua(this.dom,this.selectionRange);return t<0&&!u?null:(t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new Al(this.view,t,n,o))}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let n=this.readChange();if(!n)return!1;let o=this.view.state,u=zc(this.view,n);return this.view.state==o&&this.view.update([]),u}readMutation(t){let n=this.view.docView.nearest(t.target);if(!n||n.ignoreMutation(t))return null;if(n.markDirty(t.type=="attributes"),t.type=="attributes"&&(n.dirty|=4),t.type=="childList"){let o=Vc(n,t.previousSibling||t.target.previousSibling,-1),u=Vc(n,t.nextSibling||t.target.nextSibling,1);return{from:o?n.posAfter(o):n.posAtStart,to:u?n.posBefore(u):n.posAtEnd,typeOver:!1}}else return t.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var t,n,o,u;this.stop(),(t=this.intersection)===null||t===void 0||t.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(o=this.resizeScroll)===null||o===void 0||o.disconnect(),(u=this.resizeContent)===null||u===void 0||u.disconnect();for(let p of this.scrollTargets)p.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function Vc(a,t,n){for(;t;){let o=Go.get(t);if(o&&o.parent==a)return o;let u=t.parentNode;t=u!=a.dom?u:n>0?t.nextSibling:t.previousSibling}return null}function xf(a){let t=null;function n(A){A.preventDefault(),A.stopImmediatePropagation(),t=A.getTargetRanges()[0]}if(a.contentDOM.addEventListener("beforeinput",n,!0),a.dom.ownerDocument.execCommand("indent"),a.contentDOM.removeEventListener("beforeinput",n,!0),!t)return null;let o=t.startContainer,u=t.startOffset,p=t.endContainer,v=t.endOffset,S=a.docView.domAtPos(a.state.selection.main.anchor);return Zs(S.node,S.offset,p,v)&&([o,u,p,v]=[p,v,o,u]),{anchorNode:o,anchorOffset:u,focusNode:p,focusOffset:v}}class Di{constructor(t={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=t.dispatch||(n=>this.update([n])),this.dispatch=this.dispatch.bind(this),this._root=t.root||xs(t.parent)||document,this.viewState=new uc(t.state||ui.create(t)),this.plugins=this.state.facet(Bo).map(n=>new $s(n));for(let n of this.plugins)n.update(this);this.observer=new fd(this),this.inputState=new wl(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new ha(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),t.parent&&t.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...t){this._dispatch(t.length==1&&t[0]instanceof Xt?t[0]:this.state.update(...t))}update(t){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,o=!1,u,p=this.state;for(let H of t){if(H.startState!=p)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");p=H.state}if(this.destroyed){this.viewState.state=p;return}let v=this.observer.delayedAndroidKey,S=null;if(v?(this.observer.clearDelayedAndroidKey(),S=this.observer.readChange(),(S&&!this.state.doc.eq(p.doc)||!this.state.selection.eq(p.selection))&&(S=null)):this.observer.clear(),p.facet(ui.phrases)!=this.state.facet(ui.phrases))return this.setState(p);u=au.create(this,p,t);let A=this.viewState.scrollTarget;try{this.updateState=2;for(let H of t){if(A&&(A=A.map(H.changes)),H.scrollIntoView){let{main:X}=H.state.selection;A=new Da(X.empty?X:ue.cursor(X.head,X.head>X.anchor?-1:1))}for(let X of H.effects)X.is(Cl)&&(A=X.value)}this.viewState.update(u,A),this.bidiCache=Ra.update(this.bidiCache,u.changes),u.empty||(this.updatePlugins(u),this.inputState.update(u)),n=this.docView.update(u),this.state.facet(Sl)!=this.styleModules&&this.mountStyles(),o=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(H=>H.isUserEvent("select.pointer")))}finally{this.updateState=0}if(u.startState.facet(Lu)!=u.state.facet(Lu)&&(this.viewState.mustMeasureContent=!0),(n||o||A||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!u.empty)for(let H of this.state.facet(qu))H(u);S&&!zc(this,S)&&v.force&&Fo(this.contentDOM,v.key,v.keyCode)}setState(t){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=t;return}this.updateState=2;let n=this.hasFocus;try{for(let o of this.plugins)o.destroy(this);this.viewState=new uc(t),this.plugins=t.facet(Bo).map(o=>new $s(o)),this.pluginMap.clear();for(let o of this.plugins)o.update(this);this.docView=new ha(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(t){let n=t.startState.facet(Bo),o=t.state.facet(Bo);if(n!=o){let u=[];for(let p of o){let v=n.indexOf(p);if(v<0)u.push(new $s(p));else{let S=this.plugins[v];S.mustUpdate=t,u.push(S)}}for(let p of this.plugins)p.mustUpdate!=t&&p.destroy(this);this.plugins=u,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let u of this.plugins)u.mustUpdate=t;for(let u=0;u<this.plugins.length;u++)this.plugins[u].update(this)}measure(t=!0){if(this.destroyed)return;this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,t&&this.observer.forceFlush();let n=null,{scrollHeight:o,scrollTop:u,clientHeight:p}=this.scrollDOM,v=u>o-p-4?o:u;try{for(let S=0;;S++){this.updateState=1;let A=this.viewport,H=this.viewState.lineBlockAtHeight(v),X=this.viewState.measure(this);if(!X&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(S>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let Me=[];X&4||([this.measureRequests,Me]=[Me,this.measureRequests]);let gt=Me.map(ar=>{try{return ar.read(this)}catch(wr){return Ls(this.state,wr),cs}}),It=au.create(this,this.state,[]),un=!1,or=!1;It.flags|=X,n?n.flags|=X:n=It,this.updateState=2,It.empty||(this.updatePlugins(It),this.inputState.update(It),this.updateAttrs(),un=this.docView.update(It));for(let ar=0;ar<Me.length;ar++)if(gt[ar]!=cs)try{let wr=Me[ar];wr.write&&wr.write(gt[ar],this)}catch(wr){Ls(this.state,wr)}if(this.viewState.editorHeight)if(this.viewState.scrollTarget)this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,or=!0;else{let ar=this.viewState.lineBlockAt(H.from).top-H.top;(ar>1||ar<-1)&&(this.scrollDOM.scrollTop+=ar,or=!0)}if(un&&this.docView.updateSelection(!0),this.viewport.from==A.from&&this.viewport.to==A.to&&!or&&this.measureRequests.length==0)break}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let S of this.state.facet(qu))S(n)}get themeClasses(){return Wc+" "+(this.state.facet(tu)?dc:fc)+" "+this.state.facet(Lu)}updateAttrs(){let t=hc(this,da,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Ba)?"true":"false",class:"cm-content",style:`${xr.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),hc(this,Ml,n);let o=this.observer.ignore(()=>{let u=Bl(this.contentDOM,this.contentAttrs,n),p=Bl(this.dom,this.editorAttrs,t);return u||p});return this.editorAttrs=t,this.contentAttrs=n,o}showAnnouncements(t){let n=!0;for(let o of t)for(let u of o.effects)if(u.is(Di.announce)){n&&(this.announceDOM.textContent=""),n=!1;let p=this.announceDOM.appendChild(document.createElement("div"));p.textContent=u.value}}mountStyles(){this.styleModules=this.state.facet(Sl),pr.mount(this.root,this.styleModules.concat($f).reverse())}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),t){if(this.measureRequests.indexOf(t)>-1)return;if(t.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===t.key){this.measureRequests[n]=t;return}}this.measureRequests.push(t)}}plugin(t){let n=this.pluginMap.get(t);return(n===void 0||n&&n.spec!=t)&&this.pluginMap.set(t,n=this.plugins.find(o=>o.spec==t)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,n,o){return rl(this,t,Jl(this,t,n,o))}moveByGroup(t,n){return rl(this,t,Jl(this,t,n,o=>lf(this,t.head,o)))}moveToLineBoundary(t,n,o=!0){return Ua(this,t,n,o)}moveVertically(t,n,o){return rl(this,t,Lc(this,t,n,o))}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,n=0){return this.docView.posFromDOM(t,n)}posAtCoords(t,n=!0){return this.readMeasured(),Au(this,t,n)}coordsAtPos(t,n=1){this.readMeasured();let o=this.docView.coordsAt(t,n);if(!o||o.left==o.right)return o;let u=this.state.doc.lineAt(t),p=this.bidiSpans(u),v=p[Ol.find(p,t-u.from,-1,n)];return Mo(o,v.dir==ts.LTR==n>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(xl)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>dd)return Tl(t.length);let n=this.textDirectionAt(t.from);for(let u of this.bidiCache)if(u.from==t.from&&u.dir==n)return u.order;let o=ka(t.text,n);return this.bidiCache.push(new Ra(t.from,t.to,n,o)),o}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||xr.safari&&((t=this.inputState)===null||t===void 0?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Xo(this.contentDOM),this.docView.updateSelection()})}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((t.nodeType==9?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,n={}){return Cl.of(new Da(typeof t=="number"?ue.cursor(t):t,n.y,n.x,n.yMargin,n.xMargin))}static domEventHandlers(t){return Wo.define(()=>({}),{eventHandlers:t})}static theme(t,n){let o=pr.newName(),u=[Lu.of(o),Sl.of(zo(`.${o}`,t))];return n&&n.dark&&u.push(tu.of(!0)),u}static baseTheme(t){return xn.lowest(Sl.of(zo("."+Wc,t,Ef)))}static findFromDOM(t){var n;let o=t.querySelector(".cm-content"),u=o&&Go.get(o)||Go.get(t);return((n=u?.rootView)===null||n===void 0?void 0:n.view)||null}}Di.styleModule=Sl,Di.inputHandler=Xa,Di.perLineTextDirection=xl,Di.exceptionSink=Xu,Di.updateListener=qu,Di.editable=Ba,Di.mouseSelectionStyle=Yl,Di.dragMovesSelection=fl,Di.clickAddsSelectionRange=Ss,Di.decorations=qa,Di.atomicRanges=na,Di.scrollMargins=su,Di.darkTheme=tu,Di.contentAttributes=Ml,Di.editorAttributes=da,Di.lineWrapping=Di.contentAttributes.of({class:"cm-lineWrapping"}),Di.announce=Et.define();const dd=4096,cs={};class Ra{constructor(t,n,o,u){this.from=t,this.to=n,this.dir=o,this.order=u}static update(t,n){if(n.empty)return t;let o=[],u=t.length?t[t.length-1].dir:ts.LTR;for(let p=Math.max(0,t.length-10);p<t.length;p++){let v=t[p];v.dir==u&&!n.touchesRange(v.from,v.to)&&o.push(new Ra(n.mapPos(v.from,1),n.mapPos(v.to,-1),v.dir,v.order))}return o}}function hc(a,t,n){for(let o=a.state.facet(t),u=o.length-1;u>=0;u--){let p=o[u],v=typeof p=="function"?p(a):p;v&&Fl(v,n)}return n}const pc=xr.mac?"mac":xr.windows?"win":xr.linux?"linux":"key";function Ff(a,t){const n=a.split(/-(?!$)/);let o=n[n.length-1];o=="Space"&&(o=" ");let u,p,v,S;for(let A=0;A<n.length-1;++A){const H=n[A];if(/^(cmd|meta|m)$/i.test(H))S=!0;else if(/^a(lt)?$/i.test(H))u=!0;else if(/^(c|ctrl|control)$/i.test(H))p=!0;else if(/^s(hift)?$/i.test(H))v=!0;else if(/^mod$/i.test(H))t=="mac"?S=!0:p=!0;else throw new Error("Unrecognized modifier name: "+H)}return u&&(o="Alt-"+o),p&&(o="Ctrl-"+o),S&&(o="Meta-"+o),v&&(o="Shift-"+o),o}function Hc(a,t,n){return t.altKey&&(a="Alt-"+a),t.ctrlKey&&(a="Ctrl-"+a),t.metaKey&&(a="Meta-"+a),n!==!1&&t.shiftKey&&(a="Shift-"+a),a}const zl=xn.default(Di.domEventHandlers({keydown(a,t){return Mf(mc(t.state),a,t,"editor")}})),Eu=ft.define({enables:zl}),Rl=new WeakMap;function mc(a){let t=a.facet(Eu),n=Rl.get(t);return n||Rl.set(t,n=ed(t.reduce((o,u)=>o.concat(u),[]))),n}function Cf(a,t,n){return Mf(mc(a.state),t,a,n)}let Il=null;const Bf=4e3;function ed(a,t=pc){let n=Object.create(null),o=Object.create(null),u=(v,S)=>{let A=o[v];if(A==null)o[v]=S;else if(A!=S)throw new Error("Key binding "+v+" is used both as a regular binding and as a multi-stroke prefix")},p=(v,S,A,H)=>{var X,Me;let gt=n[v]||(n[v]=Object.create(null)),It=S.split(/ (?!$)/).map(ar=>Ff(ar,t));for(let ar=1;ar<It.length;ar++){let wr=It.slice(0,ar).join(" ");u(wr,!0),gt[wr]||(gt[wr]={preventDefault:!0,run:[Si=>{let ki=Il={view:Si,prefix:wr,scope:v};return setTimeout(()=>{Il==ki&&(Il=null)},Bf),!0}]})}let un=It.join(" ");u(un,!1);let or=gt[un]||(gt[un]={preventDefault:!1,run:((Me=(X=gt._any)===null||X===void 0?void 0:X.run)===null||Me===void 0?void 0:Me.slice())||[]});A&&or.run.push(A),H&&(or.preventDefault=!0)};for(let v of a){let S=v.scope?v.scope.split(" "):["editor"];if(v.any)for(let H of S){let X=n[H]||(n[H]=Object.create(null));X._any||(X._any={preventDefault:!1,run:[]});for(let Me in X)X[Me].run.push(v.any)}let A=v[t]||v.key;if(A)for(let H of S)p(H,A,v.run,v.preventDefault),v.shift&&p(H,"Shift-"+A,v.shift,v.preventDefault)}return n}function Mf(a,t,n,o){let u=la(t),p=Rt(u,0),v=qt(p)==u.length&&u!=" ",S="",A=!1;Il&&Il.view==n&&Il.scope==o&&(S=Il.prefix+" ",(A=il.indexOf(t.keyCode)<0)&&(Il=null));let H=new Set,X=un=>{if(un){for(let or of un.run)if(!H.has(or)&&(H.add(or),or(n,t)))return!0;un.preventDefault&&(A=!0)}return!1},Me=a[o],gt,It;if(Me){if(X(Me[S+Hc(u,t,!v)]))return!0;if(v&&(t.altKey||t.metaKey||t.ctrlKey)&&!(xr.windows&&t.ctrlKey&&t.altKey)&&(gt=Mn[t.keyCode])&&gt!=u){if(X(Me[S+Hc(gt,t,!0)]))return!0;if(t.shiftKey&&(It=qi[t.keyCode])!=u&&It!=gt&&X(Me[S+Hc(It,t,!1)]))return!0}else if(v&&t.shiftKey&&X(Me[S+Hc(u,t,!0)]))return!0;if(X(Me._any))return!0}return A}class gc{constructor(t,n,o,u,p){this.className=t,this.left=n,this.top=o,this.width=u,this.height=p}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,n){return n.className!=this.className?!1:(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",this.width!=null&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,n,o){if(o.empty){let u=t.coordsAtPos(o.head,o.assoc||1);if(!u)return[];let p=Js(t);return[new gc(n,u.left-p.left,u.top-p.top,null,u.bottom-u.top)]}else return Of(t,n,o)}}function Js(a){let t=a.scrollDOM.getBoundingClientRect();return{left:(a.textDirection==ts.LTR?t.left:t.right-a.scrollDOM.clientWidth)-a.scrollDOM.scrollLeft,top:t.top-a.scrollDOM.scrollTop}}function ma(a,t,n){let o=ue.cursor(t);return{from:Math.max(n.from,a.moveToLineBoundary(o,!1,!0).from),to:Math.min(n.to,a.moveToLineBoundary(o,!0,!0).from),type:Ro.Text}}function Sf(a,t){let n=a.lineBlockAt(t);if(Array.isArray(n.type)){for(let o of n.type)if(o.to>t||o.to==t&&(o.to==n.to||o.type==Ro.Text))return o}return n}function Of(a,t,n){if(n.to<=a.viewport.from||n.from>=a.viewport.to)return[];let o=Math.max(n.from,a.viewport.from),u=Math.min(n.to,a.viewport.to),p=a.textDirection==ts.LTR,v=a.contentDOM,S=v.getBoundingClientRect(),A=Js(a),H=window.getComputedStyle(v.firstChild),X=S.left+parseInt(H.paddingLeft)+Math.min(0,parseInt(H.textIndent)),Me=S.right-parseInt(H.paddingRight),gt=Sf(a,o),It=Sf(a,u),un=gt.type==Ro.Text?gt:null,or=It.type==Ro.Text?It:null;if(a.lineWrapping&&(un&&(un=ma(a,o,un)),or&&(or=ma(a,u,or))),un&&or&&un.from==or.from)return wr(Si(n.from,n.to,un));{let mi=un?Si(n.from,null,un):ki(gt,!1),Ci=or?Si(null,n.to,or):ki(It,!0),Pi=[];return(un||gt).to<(or||It).from-1?Pi.push(ar(X,mi.bottom,Me,Ci.top)):mi.bottom<Ci.top&&a.elementAtHeight((mi.bottom+Ci.top)/2).type==Ro.Text&&(mi.bottom=Ci.top=(mi.bottom+Ci.top)/2),wr(mi).concat(Pi).concat(wr(Ci))}function ar(mi,Ci,Pi,Fi){return new gc(t,mi-A.left,Ci-A.top-.01,Pi-mi,Fi-Ci+.01)}function wr({top:mi,bottom:Ci,horizontal:Pi}){let Fi=[];for(let To=0;To<Pi.length;To+=2)Fi.push(ar(Pi[To],mi,Pi[To+1],Ci));return Fi}function Si(mi,Ci,Pi){let Fi=1e9,To=-1e9,eo=[];function oo(oa,Qa,yl,sa,La){let aa=a.coordsAtPos(oa,oa==Pi.to?-2:2),Hs=a.coordsAtPos(yl,yl==Pi.from?2:-2);Fi=Math.min(aa.top,Hs.top,Fi),To=Math.max(aa.bottom,Hs.bottom,To),La==ts.LTR?eo.push(p&&Qa?X:aa.left,p&&sa?Me:Hs.right):eo.push(!p&&sa?X:Hs.left,!p&&Qa?Me:aa.right)}let Zo=mi??Pi.from,Us=Ci??Pi.to;for(let oa of a.visibleRanges)if(oa.to>Zo&&oa.from<Us)for(let Qa=Math.max(oa.from,Zo),yl=Math.min(oa.to,Us);;){let sa=a.state.doc.lineAt(Qa);for(let La of a.bidiSpans(sa)){let aa=La.from+sa.from,Hs=La.to+sa.from;if(aa>=yl)break;Hs>Qa&&oo(Math.max(aa,Qa),mi==null&&aa<=Zo,Math.min(Hs,yl),Ci==null&&Hs>=Us,La.dir)}if(Qa=sa.to+1,Qa>=yl)break}return eo.length==0&&oo(Zo,mi==null,Us,Ci==null,a.textDirection),{top:Fi,bottom:To,horizontal:eo}}function ki(mi,Ci){let Pi=S.top+(Ci?mi.top:mi.bottom);return{top:Pi,bottom:Pi,horizontal:[]}}}function kf(a,t){return a.constructor==t.constructor&&a.eq(t)}class Va{constructor(t,n){this.view=t,this.layer=n,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,t)}update(t){t.startState.facet(vc)!=t.state.facet(vc)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&t.view.requestMeasure(this.measureReq)}setOrder(t){let n=0,o=t.facet(vc);for(;n<o.length&&o[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}draw(t){if(t.length!=this.drawn.length||t.some((n,o)=>!kf(n,this.drawn[o]))){let n=this.dom.firstChild,o=0;for(let u of t)u.update&&n&&u.constructor&&this.drawn[o].constructor&&u.update(n,this.drawn[o])?(n=n.nextSibling,o++):this.dom.insertBefore(u.draw(),n);for(;n;){let u=n.nextSibling;n.remove(),n=u}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const vc=ft.define();function yc(a){return[Wo.define(t=>new Va(t,a)),vc.of(a)]}const Zc=!xr.ios,Nu=ft.define({combine(a){return Vi(a,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,n)=>Math.min(t,n),drawRangeCursor:(t,n)=>t||n})}});function jf(a={}){return[Nu.of(a),wf,Uf,Kc,jl.of(!0)]}function Tf(a){return a.startState.facet(Nu)!=a.state.facet(Nu)}const wf=yc({above:!0,markers(a){let{state:t}=a,n=t.facet(Nu),o=[];for(let u of t.selection.ranges){let p=u==t.selection.main;if(u.empty?!p||Zc:n.drawRangeCursor){let v=p?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",S=u.empty?u:ue.cursor(u.head,u.head>u.anchor?-1:1);for(let A of gc.forRange(a,v,S))o.push(A)}}return o},update(a,t){a.transactions.some(o=>o.selection)&&(t.style.animationName=t.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=Tf(a);return n&&Ec(a.state,t),a.docChanged||a.selectionSet||n},mount(a,t){Ec(t.state,a)},class:"cm-cursorLayer"});function Ec(a,t){t.style.animationDuration=a.facet(Nu).cursorBlinkRate+"ms"}const Uf=yc({above:!1,markers(a){return a.state.selection.ranges.map(t=>t.empty?[]:gc.forRange(a,"cm-selectionBackground",t)).reduce((t,n)=>t.concat(n))},update(a,t){return a.docChanged||a.selectionSet||a.viewportChanged||Tf(a)},class:"cm-selectionLayer"}),Vl={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};Zc&&(Vl[".cm-line"].caretColor="transparent !important");const Kc=xn.highest(Di.theme(Vl)),Wf=Et.define({map(a,t){return a==null?null:t.mapPos(a)}}),Fu=Ut.define({create(){return null},update(a,t){return a!=null&&(a=t.changes.mapPos(a)),t.effects.reduce((n,o)=>o.is(Wf)?o.value:n,a)}}),td=Wo.fromClass(class{constructor(a){this.view=a,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(a){var t;let n=a.state.field(Fu);n==null?this.cursor!=null&&((t=this.cursor)===null||t===void 0||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(a.startState.field(Fu)!=n||a.docChanged||a.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let a=this.view.state.field(Fu),t=a!=null&&this.view.coordsAtPos(a);if(!t)return null;let n=this.view.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+this.view.scrollDOM.scrollLeft,top:t.top-n.top+this.view.scrollDOM.scrollTop,height:t.bottom-t.top}}drawCursor(a){this.cursor&&(a?(this.cursor.style.left=a.left+"px",this.cursor.style.top=a.top+"px",this.cursor.style.height=a.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(a){this.view.state.field(Fu)!=a&&this.view.dispatch({effects:Wf.of(a)})}},{eventHandlers:{dragover(a){this.setDropPos(this.view.posAtCoords({x:a.clientX,y:a.clientY}))},dragleave(a){(a.target==this.view.contentDOM||!this.view.contentDOM.contains(a.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function nd(){return[Fu,td]}function Gc(a,t,n,o,u){t.lastIndex=0;for(let p=a.iterRange(n,o),v=n,S;!p.next().done;v+=p.value.length)if(!p.lineBreak)for(;S=t.exec(p.value);)u(v+S.index,S)}function nu(a,t){let n=a.visibleRanges;if(n.length==1&&n[0].from==a.viewport.from&&n[0].to==a.viewport.to)return n;let o=[];for(let{from:u,to:p}of n)u=Math.max(a.state.doc.lineAt(u).from,u-t),p=Math.min(a.state.doc.lineAt(p).to,p+t),o.length&&o[o.length-1].to>=u?o[o.length-1].to=p:o.push({from:u,to:p});return o}class ce{constructor(t){const{regexp:n,decoration:o,decorate:u,boundary:p,maxLength:v=1e3}=t;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,u)this.addMatch=(S,A,H,X)=>u(X,H,H+S[0].length,S,A);else if(typeof o=="function")this.addMatch=(S,A,H,X)=>{let Me=o(S,A,H);Me&&X(H,H+S[0].length,Me)};else if(o)this.addMatch=(S,A,H,X)=>X(H,H+S[0].length,o);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=p,this.maxLength=v}createDeco(t){let n=new Uo,o=n.add.bind(n);for(let{from:u,to:p}of nu(t,this.maxLength))Gc(t.state.doc,this.regexp,u,p,(v,S)=>this.addMatch(S,t,v,o));return n.finish()}updateDeco(t,n){let o=1e9,u=-1;return t.docChanged&&t.changes.iterChanges((p,v,S,A)=>{A>t.view.viewport.from&&S<t.view.viewport.to&&(o=Math.min(S,o),u=Math.max(A,u))}),t.viewportChanged||u-o>1e3?this.createDeco(t.view):u>-1?this.updateRange(t.view,n.map(t.changes),o,u):n}updateRange(t,n,o,u){for(let p of t.visibleRanges){let v=Math.max(p.from,o),S=Math.min(p.to,u);if(S>v){let A=t.state.doc.lineAt(v),H=A.to<S?t.state.doc.lineAt(S):A,X=Math.max(p.from,A.from),Me=Math.min(p.to,H.to);if(this.boundary){for(;v>A.from;v--)if(this.boundary.test(A.text[v-1-A.from])){X=v;break}for(;S<H.to;S++)if(this.boundary.test(H.text[S-H.from])){Me=S;break}}let gt=[],It,un=(or,ar,wr)=>gt.push(wr.range(or,ar));if(A==H)for(this.regexp.lastIndex=X-A.from;(It=this.regexp.exec(A.text))&&It.index<Me-A.from;)this.addMatch(It,t,It.index+A.from,un);else Gc(t.state.doc,this.regexp,X,Me,(or,ar)=>this.addMatch(ar,t,or,un));n=n.update({filterFrom:X,filterTo:Me,filter:(or,ar)=>or<X||ar>Me,add:gt})}}return n}}const et=/x/.unicode!=null?"gu":"g",Wt=new RegExp(`[\0-\b
2196
+ -\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,et),mn={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let gn=null;function nr(){var a;if(gn==null&&typeof document<"u"&&document.body){let t=document.body.style;gn=((a=t.tabSize)!==null&&a!==void 0?a:t.MozTabSize)!=null}return gn||!1}const dr=ft.define({combine(a){let t=Vi(a,{render:null,specialChars:Wt,addSpecialChars:null});return(t.replaceTabs=!nr())&&(t.specialChars=new RegExp(" |"+t.specialChars.source,et)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,et)),t}});function ri(a={}){return[dr.of(a),$i()]}let Ki=null;function $i(){return Ki||(Ki=Wo.fromClass(class{constructor(a){this.view=a,this.decorations=Lr.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(a.state.facet(dr)),this.decorations=this.decorator.createDeco(a)}makeDecorator(a){return new ce({regexp:a.specialChars,decoration:(t,n,o)=>{let{doc:u}=n.state,p=Rt(t[0],0);if(p==9){let v=u.lineAt(o),S=n.state.tabSize,A=Ur(v.text,S,o-v.from);return Lr.replace({widget:new ns((S-A%S)*this.view.defaultCharacterWidth)})}return this.decorationCache[p]||(this.decorationCache[p]=Lr.replace({widget:new hr(a,p)}))},boundary:a.replaceTabs?void 0:/[^]/})}update(a){let t=a.state.facet(dr);a.startState.facet(dr)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(a.view)):this.decorations=this.decorator.updateDeco(a,this.decorations)}},{decorations:a=>a.decorations}))}const Lo="\u2022";function xo(a){return a>=32?Lo:a==10?"\u2424":String.fromCharCode(9216+a)}class hr extends ba{constructor(t,n){super(),this.options=t,this.code=n}eq(t){return t.code==this.code}toDOM(t){let n=xo(this.code),o=t.state.phrase("Control character")+" "+(mn[this.code]||"0x"+this.code.toString(16)),u=this.options.render&&this.options.render(this.code,o,n);if(u)return u;let p=document.createElement("span");return p.textContent=n,p.title=o,p.setAttribute("aria-label",o),p.className="cm-specialChar",p}ignoreEvent(){return!1}}class ns extends ba{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent=" ",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}const ra=null;function ga(){return[ra,Ml.of(a=>{var t;return((t=a.plugin(ra))===null||t===void 0?void 0:t.attrs)||null})]}function ws(){return Ia}const is=Lr.line({class:"cm-activeLine"}),Ia=Wo.fromClass(class{constructor(a){this.decorations=this.getDeco(a)}update(a){(a.docChanged||a.selectionSet)&&(this.decorations=this.getDeco(a.view))}getDeco(a){let t=-1,n=[];for(let o of a.state.selection.ranges){let u=a.lineBlockAt(o.head);u.from>t&&(n.push(is.range(u.from)),t=u.from)}return Lr.set(n)}},{decorations:a=>a.decorations});class bu extends ba{constructor(t){super(),this.content=t}toDOM(){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}ignoreEvent(){return!1}}function Qo(a){return Wo.fromClass(class{constructor(t){this.view=t,this.placeholder=Lr.set([Lr.widget({widget:new bu(a),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?Lr.none:this.placeholder}},{decorations:t=>t.decorations})}const Jo=2e3;function Df(a,t,n){let o=Math.min(t.line,n.line),u=Math.max(t.line,n.line),p=[];if(t.off>Jo||n.off>Jo||t.col<0||n.col<0){let v=Math.min(t.off,n.off),S=Math.max(t.off,n.off);for(let A=o;A<=u;A++){let H=a.doc.line(A);H.length<=S&&p.push(ue.range(H.from+v,H.to+S))}}else{let v=Math.min(t.col,n.col),S=Math.max(t.col,n.col);for(let A=o;A<=u;A++){let H=a.doc.line(A),X=Pr(H.text,v,a.tabSize,!0);if(X<0)p.push(ue.cursor(H.to));else{let Me=Pr(H.text,S,a.tabSize);p.push(ue.range(H.from+X,H.from+Me))}}}return p}function bc(a,t){let n=a.coordsAtPos(a.viewport.from);return n?Math.round(Math.abs((n.left-t)/a.defaultCharacterWidth)):-1}function Yc(a,t){let n=a.posAtCoords({x:t.clientX,y:t.clientY},!1),o=a.state.doc.lineAt(n),u=n-o.from,p=u>Jo?-1:u==o.length?bc(a,t.clientX):Ur(o.text,a.state.tabSize,n-o.from);return{line:o.number,col:p,off:u}}function Xs(a,t){let n=Yc(a,t),o=a.state.selection;return n?{update(u){if(u.docChanged){let p=u.changes.mapPos(u.startState.doc.line(n.line).from),v=u.state.doc.lineAt(p);n={line:v.number,col:n.col,off:Math.min(n.off,v.length)},o=o.map(u.changes)}},get(u,p,v){let S=Yc(a,u);if(!S)return o;let A=Df(a.state,n,S);return A.length?v?ue.create(A.concat(o.ranges)):ue.create(A):o}}:null}function _l(a){let t=a?.eventFilter||(n=>n.altKey&&n.button==0);return Di.mouseSelectionStyle.of((n,o)=>t(o)?Xs(n,o):null)}const qs={Alt:[18,a=>a.altKey],Control:[17,a=>a.ctrlKey],Shift:[16,a=>a.shiftKey],Meta:[91,a=>a.metaKey]},Bu={style:"cursor: crosshair"};function Pf(a={}){let[t,n]=qs[a.key||"Alt"],o=Wo.fromClass(class{constructor(u){this.view=u,this.isDown=!1}set(u){this.isDown!=u&&(this.isDown=u,this.view.update([]))}},{eventHandlers:{keydown(u){this.set(u.keyCode==t||n(u))},keyup(u){(u.keyCode==t||!n(u))&&this.set(!1)},mousemove(u){this.set(n(u))}}});return[o,Di.contentAttributes.of(u=>{var p;return!((p=u.plugin(o))===null||p===void 0)&&p.isDown?Bu:null})]}const Ha="-10000px";class Af{constructor(t,n,o){this.facet=n,this.createTooltipView=o,this.input=t.state.facet(n),this.tooltips=this.input.filter(u=>u),this.tooltipViews=this.tooltips.map(o)}update(t){var n;let o=t.state.facet(this.facet),u=o.filter(v=>v);if(o===this.input){for(let v of this.tooltipViews)v.update&&v.update(t);return!1}let p=[];for(let v=0;v<u.length;v++){let S=u[v],A=-1;if(S){for(let H=0;H<this.tooltips.length;H++){let X=this.tooltips[H];X&&X.create==S.create&&(A=H)}if(A<0)p[v]=this.createTooltipView(S);else{let H=p[v]=this.tooltipViews[A];H.update&&H.update(t)}}}for(let v of this.tooltipViews)p.indexOf(v)<0&&(v.dom.remove(),(n=v.destroy)===null||n===void 0||n.call(v));return this.input=o,this.tooltips=u,this.tooltipViews=p,!0}}function Ll(a={}){return ku.of(a)}function zf(a){let{win:t}=a;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const ku=ft.define({combine:a=>{var t,n,o;return{position:xr.ios?"absolute":((t=a.find(u=>u.position))===null||t===void 0?void 0:t.position)||"fixed",parent:((n=a.find(u=>u.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((o=a.find(u=>u.tooltipSpace))===null||o===void 0?void 0:o.tooltipSpace)||zf}}}),ju=Wo.fromClass(class{constructor(a){this.view=a,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let t=a.state.facet(ku);this.position=t.position,this.parent=t.parent,this.classes=a.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new Af(a,Uu,n=>this.createTooltip(n)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),a.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let a of this.manager.tooltipViews)this.intersectionObserver.observe(a.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(a){a.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(a);t&&this.observeIntersection();let n=t||a.geometryChanged,o=a.state.facet(ku);if(o.position!=this.position){this.position=o.position;for(let u of this.manager.tooltipViews)u.dom.style.position=this.position;n=!0}if(o.parent!=this.parent){this.parent&&this.container.remove(),this.parent=o.parent,this.createContainer();for(let u of this.manager.tooltipViews)this.container.appendChild(u.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(a){let t=a.create(this.view);if(t.dom.classList.add("cm-tooltip"),a.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let n=document.createElement("div");n.className="cm-tooltip-arrow",t.dom.appendChild(n)}return t.dom.style.position=this.position,t.dom.style.top=Ha,this.container.appendChild(t.dom),t.mount&&t.mount(this.view),t}destroy(){var a,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(a=n.destroy)===null||a===void 0||a.call(n);(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let a=this.view.dom.getBoundingClientRect();return{editor:a,parent:this.parent?this.container.getBoundingClientRect():a,pos:this.manager.tooltips.map((t,n)=>{let o=this.manager.tooltipViews[n];return o.getCoords?o.getCoords(t.pos):this.view.coordsAtPos(t.pos)}),size:this.manager.tooltipViews.map(({dom:t})=>t.getBoundingClientRect()),space:this.view.state.facet(ku).tooltipSpace(this.view)}}writeMeasure(a){let{editor:t,space:n}=a,o=[];for(let u=0;u<this.manager.tooltips.length;u++){let p=this.manager.tooltips[u],v=this.manager.tooltipViews[u],{dom:S}=v,A=a.pos[u],H=a.size[u];if(!A||A.bottom<=Math.max(t.top,n.top)||A.top>=Math.min(t.bottom,n.bottom)||A.right<Math.max(t.left,n.left)-.1||A.left>Math.min(t.right,n.right)+.1){S.style.top=Ha;continue}let X=p.arrow?v.dom.querySelector(".cm-tooltip-arrow"):null,Me=X?7:0,gt=H.right-H.left,It=H.bottom-H.top,un=v.offset||Rf,or=this.view.textDirection==ts.LTR,ar=H.width>n.right-n.left?or?n.left:n.right-H.width:or?Math.min(A.left-(X?14:0)+un.x,n.right-gt):Math.max(n.left,A.left-gt+(X?14:0)-un.x),wr=!!p.above;!p.strictSide&&(wr?A.top-(H.bottom-H.top)-un.y<n.top:A.bottom+(H.bottom-H.top)+un.y>n.bottom)&&wr==n.bottom-A.bottom>A.top-n.top&&(wr=!wr);let Si=(wr?A.top-n.top:n.bottom-A.bottom)-Me;if(Si<It&&v.resize!==!1){if(Si<this.view.defaultLineHeight){S.style.top=Ha;continue}S.style.height=(It=Si)+"px"}else S.style.height&&(S.style.height="");let ki=wr?A.top-It-Me-un.y:A.bottom+Me+un.y,mi=ar+gt;if(v.overlap!==!0)for(let Ci of o)Ci.left<mi&&Ci.right>ar&&Ci.top<ki+It&&Ci.bottom>ki&&(ki=wr?Ci.top-It-2-Me:Ci.bottom+Me+2);this.position=="absolute"?(S.style.top=ki-a.parent.top+"px",S.style.left=ar-a.parent.left+"px"):(S.style.top=ki+"px",S.style.left=ar+"px"),X&&(X.style.left=`${A.left+(or?un.x:-un.x)-(ar+14-7)}px`),v.overlap!==!0&&o.push({left:ar,top:ki,right:mi,bottom:ki+It}),S.classList.toggle("cm-tooltip-above",wr),S.classList.toggle("cm-tooltip-below",!wr),v.positioned&&v.positioned(a.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let a of this.manager.tooltipViews)a.dom.style.top=Ha}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),xu=Di.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:`${7}px`,width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:`${7}px solid transparent`,borderRight:`${7}px solid transparent`},".cm-tooltip-above &":{bottom:`-${7}px`,"&:before":{borderTop:`${7}px solid #bbb`},"&:after":{borderTop:`${7}px solid #f5f5f5`,bottom:"1px"}},".cm-tooltip-below &":{top:`-${7}px`,"&:before":{borderBottom:`${7}px solid #bbb`},"&:after":{borderBottom:`${7}px solid #f5f5f5`,top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Rf={x:0,y:0},Uu=ft.define({enables:[ju,xu]}),Za=ft.define();class xc{constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Af(t,Za,n=>this.createHostedView(n))}static create(t){return new xc(t)}createHostedView(t){let n=t.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(n.dom),this.mounted&&n.mount&&n.mount(this.view),n}mount(t){for(let n of this.manager.tooltipViews)n.mount&&n.mount(t);this.mounted=!0}positioned(t){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(t)}update(t){this.manager.update(t)}}const Ka=Uu.compute([Za],a=>{let t=a.facet(Za).filter(n=>n);return t.length===0?null:{pos:Math.min(...t.map(n=>n.pos)),end:Math.max(...t.filter(n=>n.end!=null).map(n=>n.end)),create:xc.create,above:t[0].above,arrow:t.some(n=>n.arrow)}});class $o{constructor(t,n,o,u,p){this.view=t,this.source=n,this.field=o,this.setHover=u,this.hoverTime=p,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let t=Date.now()-this.lastMove.time;t<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{lastMove:t}=this,n=this.view.contentDOM.contains(t.target)?this.view.posAtCoords(t):null;if(n==null)return;let o=this.view.coordsAtPos(n);if(o==null||t.y<o.top||t.y>o.bottom||t.x<o.left-this.view.defaultCharacterWidth||t.x>o.right+this.view.defaultCharacterWidth)return;let u=this.view.bidiSpans(this.view.state.doc.lineAt(n)).find(S=>S.from<=n&&S.to>=n),p=u&&u.dir==ts.RTL?-1:1,v=this.source(this.view,n,t.x<o.left?-p:p);if(v?.then){let S=this.pending={pos:n};v.then(A=>{this.pending==S&&(this.pending=null,A&&this.view.dispatch({effects:this.setHover.of(A)}))},A=>Ls(this.view.state,A,"hover tooltip"))}else v&&this.view.dispatch({effects:this.setHover.of(v)})}mousemove(t){var n;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let o=this.active;if(o&&!Bs(this.lastMove.target)||this.pending){let{pos:u}=o||this.pending,p=(n=o?.end)!==null&&n!==void 0?n:u;(u==p?this.view.posAtCoords(this.lastMove)!=u:!ks(this.view,u,p,t.clientX,t.clientY,6))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!Bs(t.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function Bs(a){for(let t=a;t;t=t.parentNode)if(t.nodeType==1&&t.classList.contains("cm-tooltip"))return!0;return!1}function ks(a,t,n,o,u,p){let v=document.createRange(),S=a.domAtPos(t),A=a.domAtPos(n);v.setEnd(A.node,A.offset),v.setStart(S.node,S.offset);let H=v.getClientRects();v.detach();for(let X=0;X<H.length;X++){let Me=H[X];if(Math.max(Me.top-u,u-Me.bottom,Me.left-o,o-Me.right)<=p)return!0}return!1}function zs(a,t={}){let n=Et.define(),o=Ut.define({create(){return null},update(u,p){if(u&&(t.hideOnChange&&(p.docChanged||p.selection)||t.hideOn&&t.hideOn(p,u)))return null;if(u&&p.docChanged){let v=p.changes.mapPos(u.pos,-1,Jt.TrackDel);if(v==null)return null;let S=Object.assign(Object.create(null),u);S.pos=v,u.end!=null&&(S.end=p.changes.mapPos(u.end)),u=S}for(let v of p.effects)v.is(n)&&(u=v.value),v.is(Vs)&&(u=null);return u},provide:u=>Za.from(u)});return[o,Wo.define(u=>new $o(u,a,o,n,t.hoverTime||300)),Ka]}function Ga(a,t){let n=a.plugin(ju);if(!n)return null;let o=n.manager.tooltips.indexOf(t);return o<0?null:n.manager.tooltipViews[o]}function Wu(a){return a.facet(Za).some(t=>t)}const Vs=Et.define(),Qc=null;function zu(a){var t;(t=a.plugin(ju))===null||t===void 0||t.maybeMeasure()}const Vu=ft.define({combine(a){let t,n;for(let o of a)t=t||o.topContainer,n=n||o.bottomContainer;return{topContainer:t,bottomContainer:n}}});function Vf(a){return a?[Vu.of(a)]:[]}function gl(a,t){let n=a.plugin(Ma),o=n?n.specs.indexOf(t):-1;return o>-1?n.panels[o]:null}const Ma=Wo.fromClass(class{constructor(a){this.input=a.state.facet(pi),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(a));let t=a.state.facet(Vu);this.top=new Hu(a,!0,t.topContainer),this.bottom=new Hu(a,!1,t.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(a){let t=a.state.facet(Vu);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new Hu(a.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new Hu(a.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=a.state.facet(pi);if(n!=this.input){let o=n.filter(A=>A),u=[],p=[],v=[],S=[];for(let A of o){let H=this.specs.indexOf(A),X;H<0?(X=A(a.view),S.push(X)):(X=this.panels[H],X.update&&X.update(a)),u.push(X),(X.top?p:v).push(X)}this.specs=o,this.panels=u,this.top.sync(p),this.bottom.sync(v);for(let A of S)A.dom.classList.add("cm-panel"),A.mount&&A.mount()}else for(let o of this.panels)o.update&&o.update(a)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:a=>Di.scrollMargins.of(t=>{let n=t.plugin(a);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Hu{constructor(t,n,o){this.view=t,this.top=n,this.container=o,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let n of this.panels)n.destroy&&t.indexOf(n)<0&&n.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let t=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;t!=n.dom;)t=sr(t);t=t.nextSibling}else this.dom.insertBefore(n.dom,t);for(;t;)t=sr(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function sr(a){let t=a.nextSibling;return a.remove(),t}const pi=ft.define({enables:Ma});class Mi extends Bi{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}Mi.prototype.elementClass="",Mi.prototype.toDOM=void 0,Mi.prototype.mapMode=Jt.TrackBefore,Mi.prototype.startSide=Mi.prototype.endSide=-1,Mi.prototype.point=!0;const Gi=ft.define(),ao={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>hi.empty,lineMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Io=ft.define();function os(a){return[Cu(),Io.of(Object.assign(Object.assign({},ao),a))]}const Hl=ft.define({combine:a=>a.some(t=>t)});function Cu(a){let t=[Cc];return a&&a.fixed===!1&&t.push(Hl.of(!0)),t}const Cc=Wo.fromClass(class{constructor(a){this.view=a,this.prevViewport=a.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=a.state.facet(Io).map(t=>new Zl(a,t));for(let t of this.gutters)this.dom.appendChild(t.dom);this.fixed=!a.state.facet(Hl),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),a.scrollDOM.insertBefore(this.dom,a.contentDOM)}update(a){if(this.updateGutters(a)){let t=this.prevViewport,n=a.view.viewport,o=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(o<(n.to-n.from)*.8)}a.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(Hl)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=a.view.viewport}syncGutters(a){let t=this.dom.nextSibling;a&&this.dom.remove();let n=hi.iter(this.view.state.facet(Gi),this.view.viewport.from),o=[],u=this.gutters.map(p=>new va(p,this.view.viewport,-this.view.documentPadding.top));for(let p of this.view.viewportLineBlocks){let v;if(Array.isArray(p.type)){for(let S of p.type)if(S.type==Ro.Text){v=S;break}}else v=p.type==Ro.Text?p:void 0;if(v){o.length&&(o=[]),Xc(n,o,p.from);for(let S of u)S.line(this.view,v,o)}}for(let p of u)p.finish();a&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(a){let t=a.startState.facet(Io),n=a.state.facet(Io),o=a.docChanged||a.heightChanged||a.viewportChanged||!hi.eq(a.startState.facet(Gi),a.state.facet(Gi),a.view.viewport.from,a.view.viewport.to);if(t==n)for(let u of this.gutters)u.update(a)&&(o=!0);else{o=!0;let u=[];for(let p of n){let v=t.indexOf(p);v<0?u.push(new Zl(this.view,p)):(this.gutters[v].update(a),u.push(this.gutters[v]))}for(let p of this.gutters)p.dom.remove(),u.indexOf(p)<0&&p.destroy();for(let p of u)this.dom.appendChild(p.dom);this.gutters=u}return o}destroy(){for(let a of this.gutters)a.destroy();this.dom.remove()}},{provide:a=>Di.scrollMargins.of(t=>{let n=t.plugin(a);return!n||n.gutters.length==0||!n.fixed?null:t.textDirection==ts.LTR?{left:n.dom.offsetWidth}:{right:n.dom.offsetWidth}})});function Jc(a){return Array.isArray(a)?a:[a]}function Xc(a,t,n){for(;a.value&&a.from<=n;)a.from==n&&t.push(a.value),a.next()}class va{constructor(t,n,o){this.gutter=t,this.height=o,this.i=0,this.cursor=hi.iter(t.markers,n.from)}line(t,n,o){let u=[];Xc(this.cursor,u,n.from),o.length&&(u=u.concat(o));let p=this.gutter.config.lineMarker(t,n,u);p&&u.unshift(p);let v=this.gutter;if(u.length==0&&!v.config.renderEmptyElements)return;let S=n.top-this.height;if(this.i==v.elements.length){let A=new Kl(t,n.height,S,u);v.elements.push(A),v.dom.appendChild(A.dom)}else v.elements[this.i].update(t,n.height,S,u);this.height=n.bottom,this.i++}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let n=t.elements.pop();t.dom.removeChild(n.dom),n.destroy()}}}class Zl{constructor(t,n){this.view=t,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let o in n.domEventHandlers)this.dom.addEventListener(o,u=>{let p=u.target,v;if(p!=this.dom&&this.dom.contains(p)){for(;p.parentNode!=this.dom;)p=p.parentNode;let A=p.getBoundingClientRect();v=(A.top+A.bottom)/2}else v=u.clientY;let S=t.lineBlockAtHeight(v-t.documentTop);n.domEventHandlers[o](t,S,u)&&u.preventDefault()});this.markers=Jc(n.markers(t)),n.initialSpacer&&(this.spacer=new Kl(t,0,0,[n.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let n=this.markers;if(this.markers=Jc(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let u=this.config.updateSpacer(this.spacer.markers[0],t);u!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[u])}let o=t.view.viewport;return!hi.eq(this.markers,n,o.from,o.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(t):!1)}destroy(){for(let t of this.elements)t.destroy()}}class Kl{constructor(t,n,o,u){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,n,o,u)}update(t,n,o,u){this.height!=n&&(this.dom.style.height=(this.height=n)+"px"),this.above!=o&&(this.dom.style.marginTop=(this.above=o)?o+"px":""),ol(this.markers,u)||this.setMarkers(t,u)}setMarkers(t,n){let o="cm-gutterElement",u=this.dom.firstChild;for(let p=0,v=0;;){let S=v,A=p<n.length?n[p++]:null,H=!1;if(A){let X=A.elementClass;X&&(o+=" "+X);for(let Me=v;Me<this.markers.length;Me++)if(this.markers[Me].compare(A)){S=Me,H=!0;break}}else S=this.markers.length;for(;v<S;){let X=this.markers[v++];if(X.toDOM){X.destroy(u);let Me=u.nextSibling;u.remove(),u=Me}}if(!A)break;A.toDOM&&(H?u=u.nextSibling:this.dom.insertBefore(A.toDOM(t),u)),H&&v++}this.dom.className=o,this.markers=n}destroy(){this.setMarkers(null,[])}}function ol(a,t){if(a.length!=t.length)return!1;for(let n=0;n<a.length;n++)if(!a[n].compare(t[n]))return!1;return!0}const hd=ft.define(),Zu=ft.define({combine(a){return Vi(a,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,n){let o=Object.assign({},t);for(let u in n){let p=o[u],v=n[u];o[u]=p?(S,A,H)=>p(S,A,H)||v(S,A,H):v}return o}})}});class If extends Mi{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function rd(a,t){return a.state.facet(Zu).formatNumber(t,a.state)}const Ku=Io.compute([Zu],a=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(t){return t.state.facet(hd)},lineMarker(t,n,o){return o.some(u=>u.toDOM)?null:new If(rd(t,t.state.doc.lineAt(n.from).number))},lineMarkerChange:t=>t.startState.facet(Zu)!=t.state.facet(Zu),initialSpacer(t){return new If(rd(t,Hf(t.state.doc.lines)))},updateSpacer(t,n){let o=rd(n.view,Hf(n.view.state.doc.lines));return o==t.number?t:new If(o)},domEventHandlers:a.facet(Zu).domEventHandlers}));function pd(a={}){return[Zu.of(a),Cu(),Ku]}function Hf(a){let t=9;for(;t<a;)t=t*10+9;return t}const Mc=new class extends Mi{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},id=Gi.compute(["selection"],a=>{let t=[],n=-1;for(let o of a.selection.ranges){let u=a.doc.lineAt(o.head).from;u>n&&(n=u,t.push(Mc.range(u)))}return hi.of(t)});function Sc(){return id}const od=new Map;function md(a){let t=od.get(a);return t||od.set(a,t=Lr.mark({attributes:a===" "?{class:"cm-highlightTab"}:{class:"cm-highlightSpace","data-display":a.replace(/ /g,"\xB7")}})),t}function Zf(a){return Wo.define(t=>({decorations:a.createDeco(t),update(n){this.decorations=a.updateDeco(n,this.decorations)}}),{decorations:t=>t.decorations})}const Kf=Zf(new ce({regexp:/\t| +/g,decoration:a=>md(a[0]),boundary:/\S/}));function kd(){return Kf}const Od=Zf(new ce({regexp:/\s+$/g,decoration:Lr.mark({class:"cm-trailingSpace"}),boundary:/\S/}));function Td(){return Od}const wd={HeightMap:Oo,HeightOracle:ac,MeasuredHeights:jc,QueryType:rs,ChangedRange:Ps,computeOrder:ka,moveVisually:nl};var Mu;const qc=new m;function Oc(a){return ft.define({combine:a?t=>t.concat(a):void 0})}class sl{constructor(t,n,o=[],u=""){this.data=t,this.name=u,ui.prototype.hasOwnProperty("tree")||Object.defineProperty(ui.prototype,"tree",{get(){return Z(this)}}),this.parser=n,this.extension=[mr.of(this),ui.languageData.of((p,v,S)=>p.facet(Rs(p,v,S)))].concat(o)}isActiveAt(t,n,o=-1){return Rs(t,n,o)==this.data}findRegions(t){let n=t.facet(mr);if(n?.data==this.data)return[{from:0,to:t.doc.length}];if(!n||!n.allowsNesting)return[];let o=[],u=(p,v)=>{if(p.prop(qc)==this.data){o.push({from:v,to:v+p.length});return}let S=p.prop(m.mounted);if(S){if(S.tree.prop(qc)==this.data){if(S.overlay)for(let A of S.overlay)o.push({from:A.from+v,to:A.to+v});else o.push({from:v,to:v+p.length});return}else if(S.overlay){let A=o.length;if(u(S.tree,S.overlay[0].from+v),o.length>A)return}}for(let A=0;A<p.children.length;A++){let H=p.children[A];H instanceof F&&u(H,p.positions[A]+v)}};return u(Z(t),0),o}get allowsNesting(){return!0}}sl.setState=Et.define();function Rs(a,t,n){let o=a.facet(mr);if(!o)return null;let u=o.data;if(o.allowsNesting)for(let p=Z(a).topNode;p;p=p.enter(t,n,R.ExcludeBuffers))u=p.type.prop(qc)||u;return u}class sd extends sl{constructor(t,n,o){super(t,n,[],o),this.parser=n}static define(t){let n=Oc(t.languageData);return new sd(n,t.parser.configure({props:[qc.add(o=>o.isTop?n:void 0)]}),t.name)}configure(t,n){return new sd(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Z(a){let t=a.field(sl.state,!1);return t?t.tree:F.empty}function me(a,t,n=50){var o;let u=(o=a.field(sl.state,!1))===null||o===void 0?void 0:o.context;if(!u)return null;let p=u.viewport;u.updateViewport({from:0,to:t});let v=u.isDone(t)||u.work(n,t)?u.tree:null;return u.updateViewport(p),v}function Le(a,t=a.doc.length){var n;return((n=a.field(sl.state,!1))===null||n===void 0?void 0:n.context.isDone(t))||!1}function nt(a,t=a.viewport.to,n=100){let o=me(a.state,t,n);return o!=Z(a.state)&&a.dispatch({}),!!o}function oe(a){var t;return((t=a.plugin(Dr))===null||t===void 0?void 0:t.isWorking())||!1}class wt{constructor(t,n=t.length){this.doc=t,this.length=n,this.cursorPos=0,this.string="",this.cursor=t.iter()}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,n){let o=this.cursorPos-this.string.length;return t<o||n>=this.cursorPos?this.doc.sliceString(t,n):this.string.slice(t-o,n-o)}}let Ft=null;class Je{constructor(t,n,o=[],u,p,v,S,A){this.parser=t,this.state=n,this.fragments=o,this.tree=u,this.treeLen=p,this.viewport=v,this.skipped=S,this.scheduleOn=A,this.parse=null,this.tempSkipped=[]}static create(t,n,o){return new Je(t,n,[],F.empty,0,o,[],null)}startParse(){return this.parser.startParse(new wt(this.state.doc),this.fragments)}work(t,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=F.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var o;if(typeof t=="number"){let u=Date.now()+t;t=()=>Date.now()>u}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let u=this.parse.advance();if(u)if(this.fragments=this.withoutTempSkipped(q.addTree(u,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(o=this.parse.stoppedAt)!==null&&o!==void 0?o:this.state.doc.length,this.tree=u,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(t())return!1}})}takeTree(){let t,n;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=t,this.tree=n,this.fragments=this.withoutTempSkipped(q.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let n=Ft;Ft=this;try{return t()}finally{Ft=n}}withoutTempSkipped(t){for(let n;n=this.tempSkipped.pop();)t=Nt(t,n.from,n.to);return t}changes(t,n){let{fragments:o,tree:u,treeLen:p,viewport:v,skipped:S}=this;if(this.takeTree(),!t.empty){let A=[];if(t.iterChangedRanges((H,X,Me,gt)=>A.push({fromA:H,toA:X,fromB:Me,toB:gt})),o=q.applyChanges(o,A),u=F.empty,p=0,v={from:t.mapPos(v.from,-1),to:t.mapPos(v.to,1)},this.skipped.length){S=[];for(let H of this.skipped){let X=t.mapPos(H.from,1),Me=t.mapPos(H.to,-1);X<Me&&S.push({from:X,to:Me})}}}return new Je(this.parser,n,o,u,p,v,S,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let n=this.skipped.length;for(let o=0;o<this.skipped.length;o++){let{from:u,to:p}=this.skipped[o];u<t.to&&p>t.from&&(this.fragments=Nt(this.fragments,u,p),this.skipped.splice(o--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,n){this.skipped.push({from:t,to:n})}static getSkippingParser(t){return new class extends ee{createParse(n,o,u){let p=u[0].from,v=u[u.length-1].to;return{parsedPos:p,advance(){let A=Ft;if(A){for(let H of u)A.tempSkipped.push(H);t&&(A.scheduleOn=A.scheduleOn?Promise.all([A.scheduleOn,t]):t)}return this.parsedPos=v,new F(P.none,[],[],v-p)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let n=this.fragments;return this.treeLen>=t&&n.length&&n[0].from==0&&n[0].to>=t}static get(){return Ft}}function Nt(a,t,n){return q.applyChanges(a,[{fromA:t,toA:n,fromB:t,toB:n}])}class sn{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),o=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,o)||n.takeTree(),new sn(n)}static init(t){let n=Math.min(3e3,t.doc.length),o=Je.create(t.facet(mr).parser,t,{from:0,to:n});return o.work(20,n)||o.takeTree(),new sn(o)}}sl.state=Ut.define({create:sn.init,update(a,t){for(let n of t.effects)if(n.is(sl.setState))return n.value;return t.startState.facet(mr)!=t.state.facet(mr)?sn.init(t.state):a.apply(t)}});let Dn=a=>{let t=setTimeout(()=>a(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<"u"&&(Dn=a=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(a,{timeout:500-100})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const Kn=typeof navigator<"u"&&(!((Mu=navigator.scheduling)===null||Mu===void 0)&&Mu.isInputPending)?()=>navigator.scheduling.isInputPending():null,Dr=Wo.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let n=this.view.state.field(sl.state).context;(n.updateViewport(t.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),t.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:t}=this.view,n=t.field(sl.state);(n.tree!=n.context.tree||!n.context.isDone(t.doc.length))&&(this.working=Dn(this.work))}work(t){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:o,viewport:{to:u}}=this.view,p=o.field(sl.state);if(p.tree==p.context.tree&&p.context.isDone(u+1e5))return;let v=Date.now()+Math.min(this.chunkBudget,100,t&&!Kn?Math.max(25,t.timeRemaining()-5):1e9),S=p.context.treeLen<u&&o.doc.length>u+1e3,A=p.context.work(()=>Kn&&Kn()||Date.now()>v,u+(S?0:1e5));this.chunkBudget-=Date.now()-n,(A||this.chunkBudget<=0)&&(p.context.takeTree(),this.view.dispatch({effects:sl.setState.of(new sn(p.context))})),this.chunkBudget>0&&!(A&&!S)&&this.scheduleWork(),this.checkAsyncSchedule(p.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Ls(this.view.state,n)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),mr=ft.define({combine(a){return a.length?a[0]:null},enables:a=>[sl.state,Dr,Di.contentAttributes.compute([a],t=>{let n=t.facet(a);return n&&n.name?{"data-language":n.name}:{}})]});class Nr{constructor(t,n=[]){this.language=t,this.support=n,this.extension=[t,n]}}class ti{constructor(t,n,o,u,p,v=void 0){this.name=t,this.alias=n,this.extensions=o,this.filename=u,this.loadFunc=p,this.support=v,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(t=>this.support=t,t=>{throw this.loading=null,t}))}static of(t){let{load:n,support:o}=t;if(!n){if(!o)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(o)}return new ti(t.name,(t.alias||[]).concat(t.name).map(u=>u.toLowerCase()),t.extensions||[],t.filename,n,o)}static matchFilename(t,n){for(let u of t)if(u.filename&&u.filename.test(n))return u;let o=/\.([^.]+)$/.exec(n);if(o){for(let u of t)if(u.extensions.indexOf(o[1])>-1)return u}return null}static matchLanguageName(t,n,o=!0){n=n.toLowerCase();for(let u of t)if(u.alias.some(p=>p==n))return u;if(o)for(let u of t)for(let p of u.alias){let v=n.indexOf(p);if(v>-1&&(p.length>2||!/\w/.test(n[v-1])&&!/\w/.test(n[v+p.length])))return u}return null}}const Tr=ft.define(),Ai=ft.define({combine:a=>{if(!a.length)return" ";if(!/^(?: +|\t+)$/.test(a[0]))throw new Error("Invalid indent unit: "+JSON.stringify(a[0]));return a[0]}});function Yi(a){let t=a.facet(Ai);return t.charCodeAt(0)==9?a.tabSize*t.length:t.length}function yi(a,t){let n="",o=a.tabSize;if(a.facet(Ai).charCodeAt(0)==9)for(;t>=o;)n+=" ",t-=o;for(let u=0;u<t;u++)n+=" ";return n}function Ji(a,t){a instanceof ui&&(a=new Ri(a));for(let o of a.state.facet(Tr)){let u=o(a,t);if(u!==void 0)return u}let n=Z(a.state);return n?vo(a,n,t):null}function ko(a,t,n){let o=Object.create(null),u=new Ri(a,{overrideIndentation:v=>{var S;return(S=o[v])!==null&&S!==void 0?S:-1}}),p=[];for(let v=t;v<=n;){let S=a.doc.lineAt(v);v=S.to+1;let A=Ji(u,S.from);if(A==null)continue;/\S/.test(S.text)||(A=0);let H=/^\s*/.exec(S.text)[0],X=yi(a,A);H!=X&&(o[S.from]=A,p.push({from:S.from,to:S.from+H.length,insert:X}))}return a.changes(p)}class Ri{constructor(t,n={}){this.state=t,this.options=n,this.unit=Yi(t)}lineAt(t,n=1){let o=this.state.doc.lineAt(t),{simulateBreak:u,simulateDoubleBreak:p}=this.options;return u!=null&&u>=o.from&&u<=o.to?p&&u==t?{text:"",from:t}:(n<0?u<t:u<=t)?{text:o.text.slice(u-o.from),from:u}:{text:o.text.slice(0,u-o.from),from:o.from}:o}textAfterPos(t,n=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:o,from:u}=this.lineAt(t,n);return o.slice(t-u,Math.min(o.length,t+100-u))}column(t,n=1){let{text:o,from:u}=this.lineAt(t,n),p=this.countColumn(o,t-u),v=this.options.overrideIndentation?this.options.overrideIndentation(u):-1;return v>-1&&(p+=v-this.countColumn(o,o.search(/\S|$/))),p}countColumn(t,n=t.length){return Ur(t,this.state.tabSize,n)}lineIndent(t,n=1){let{text:o,from:u}=this.lineAt(t,n),p=this.options.overrideIndentation;if(p){let v=p(u);if(v>-1)return v}return this.countColumn(o,o.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const jo=new m;function vo(a,t,n){return fs(t.resolveInner(n).enterUnfinishedNodesBefore(n),n,a)}function Cs(a){return a.pos==a.options.simulateBreak&&a.options.simulateDoubleBreak}function al(a){let t=a.type.prop(jo);if(t)return t;let n=a.firstChild,o;if(n&&(o=n.type.prop(m.closedBy))){let u=a.lastChild,p=u&&o.indexOf(u.name)>-1;return v=>Ya(v,!0,1,void 0,p&&!Cs(v)?u.from:void 0)}return a.parent==null?ps:null}function fs(a,t,n){for(;a;a=a.parent){let o=al(a);if(o)return o(ys.create(n,t,a))}return null}function ps(){return 0}class ys extends Ri{constructor(t,n,o){super(t.state,t.options),this.base=t,this.pos=n,this.node=o}static create(t,n,o){return new ys(t,n,o)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let t=this.state.doc.lineAt(this.node.from);for(;;){let n=this.node.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(Xi(n,this.node))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){let t=this.node.parent;return t?fs(t,this.pos,this.base):0}}function Xi(a,t){for(let n=t;n;n=n.parent)if(a==n)return!0;return!1}function ls(a){let t=a.node,n=t.childAfter(t.from),o=t.lastChild;if(!n)return null;let u=a.options.simulateBreak,p=a.state.doc.lineAt(n.from),v=u==null||u<=p.from?p.to:Math.min(p.to,u);for(let S=n.to;;){let A=t.childAfter(S);if(!A||A==o)return null;if(!A.type.isSkipped)return A.from<v?n:null;S=A.to}}function _a({closing:a,align:t=!0,units:n=1}){return o=>Ya(o,t,n,a)}function Ya(a,t,n,o,u){let p=a.textAfter,v=p.match(/^\s*/)[0].length,S=o&&p.slice(v,v+o.length)==o||u==a.pos+v,A=t?ls(a):null;return A?S?a.column(A.from):a.column(A.to):a.baseIndent+(S?0:a.unit*n)}const ea=a=>a.baseIndent;function ll({except:a,units:t=1}={}){return n=>{let o=a&&a.test(n.textAfter);return n.baseIndent+(o?0:t*n.unit)}}const vl=200;function c(){return ui.transactionFilter.of(a=>{if(!a.docChanged||!a.isUserEvent("input.type")&&!a.isUserEvent("input.complete"))return a;let t=a.startState.languageDataAt("indentOnInput",a.startState.selection.main.head);if(!t.length)return a;let n=a.newDoc,{head:o}=a.newSelection.main,u=n.lineAt(o);if(o>u.from+vl)return a;let p=n.sliceString(u.from,o);if(!t.some(H=>H.test(p)))return a;let{state:v}=a,S=-1,A=[];for(let{head:H}of v.selection.ranges){let X=v.doc.lineAt(H);if(X.from==S)continue;S=X.from;let Me=Ji(v,X.from);if(Me==null)continue;let gt=/^\s*/.exec(X.text)[0],It=yi(v,Me);gt!=It&&A.push({from:X.from,to:X.from+gt.length,insert:It})}return A.length?[a,{changes:A,sequential:!0}]:a})}const h=ft.define(),M=new m;function I(a){let t=a.firstChild,n=a.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?a.to:n.from}:null}function Q(a,t,n){let o=Z(a);if(o.length<n)return null;let u=o.resolveInner(n,1),p=null;for(let v=u;v;v=v.parent){if(v.to<=n||v.from>n)continue;if(p&&v.from<t)break;let S=v.type.prop(M);if(S&&(v.to<o.length-50||o.length==a.doc.length||!se(v))){let A=S(v,a);A&&A.from<=n&&A.from>=t&&A.to>n&&(p=A)}}return p}function se(a){let t=a.lastChild;return t&&t.to==a.to&&t.type.isError}function Ve(a,t,n){for(let o of a.facet(h)){let u=o(a,t,n);if(u)return u}return Q(a,t,n)}function Gt(a,t){let n=t.mapPos(a.from,1),o=t.mapPos(a.to,-1);return n>=o?void 0:{from:n,to:o}}const pn=Et.define({map:Gt}),ir=Et.define({map:Gt});function zr(a){let t=[];for(let{head:n}of a.state.selection.ranges)t.some(o=>o.from<=n&&o.to>=n)||t.push(a.lineBlockAt(n));return t}const kr=Ut.define({create(){return Lr.none},update(a,t){a=a.map(t.changes);for(let n of t.effects)n.is(pn)&&!Ii(a,n.value.from,n.value.to)?a=a.update({add:[Sa.range(n.value.from,n.value.to)]}):n.is(ir)&&(a=a.update({filter:(o,u)=>n.value.from!=o||n.value.to!=u,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let n=!1,{head:o}=t.selection.main;a.between(o,o,(u,p)=>{u<o&&p>o&&(n=!0)}),n&&(a=a.update({filterFrom:o,filterTo:o,filter:(u,p)=>p<=o||u>=o}))}return a},provide:a=>Di.decorations.from(a),toJSON(a,t){let n=[];return a.between(0,t.doc.length,(o,u)=>{n.push(o,u)}),n},fromJSON(a){if(!Array.isArray(a)||a.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<a.length;){let o=a[n++],u=a[n++];if(typeof o!="number"||typeof u!="number")throw new RangeError("Invalid JSON for fold state");t.push(Sa.range(o,u))}return Lr.set(t,!0)}});function Hr(a){return a.field(kr,!1)||RangeSet.empty}function Ei(a,t,n){var o;let u=null;return(o=a.field(kr,!1))===null||o===void 0||o.between(t,n,(p,v)=>{(!u||u.from>p)&&(u={from:p,to:v})}),u}function Ii(a,t,n){let o=!1;return a.between(t,t,(u,p)=>{u==t&&p==n&&(o=!0)}),o}function Ni(a,t){return a.field(kr,!1)?t:t.concat(Et.appendConfig.of(fo()))}const ia=a=>{for(let t of zr(a)){let n=Ve(a.state,t.from,t.to);if(n)return a.dispatch({effects:Ni(a.state,[pn.of(n),wn(a,n)])}),!0}return!1},Zn=a=>{if(!a.state.field(kr,!1))return!1;let t=[];for(let n of zr(a)){let o=Ei(a.state,n.from,n.to);o&&t.push(ir.of(o),wn(a,o,!1))}return t.length&&a.dispatch({effects:t}),t.length>0};function wn(a,t,n=!0){let o=a.state.doc.lineAt(t.from).number,u=a.state.doc.lineAt(t.to).number;return Di.announce.of(`${a.state.phrase(n?"Folded lines":"Unfolded lines")} ${o} ${a.state.phrase("to")} ${u}.`)}const Ui=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:ia},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Zn},{key:"Ctrl-Alt-[",run:a=>{let{state:t}=a,n=[];for(let o=0;o<t.doc.length;){let u=a.lineBlockAt(o),p=Ve(t,u.from,u.to);p&&n.push(pn.of(p)),o=(p?a.lineBlockAt(p.to):u).to+1}return n.length&&a.dispatch({effects:Ni(a.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:a=>{let t=a.state.field(kr,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,a.state.doc.length,(o,u)=>{n.push(ir.of({from:o,to:u}))}),a.dispatch({effects:n}),!0}}],io={placeholderDOM:null,placeholderText:"\u2026"},ro=ft.define({combine(a){return Vi(a,io)}});function fo(a){let t=[kr,g0];return a&&t.push(ro.of(a)),t}const Sa=Lr.replace({widget:new class extends ba{toDOM(a){let{state:t}=a,n=t.facet(ro),o=p=>{let v=a.lineBlockAt(a.posAtDOM(p.target)),S=Ei(a.state,v.from,v.to);S&&a.dispatch({effects:ir.of(S)}),p.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(a,o);let u=document.createElement("span");return u.textContent=n.placeholderText,u.setAttribute("aria-label",t.phrase("folded code")),u.title=t.phrase("unfold"),u.className="cm-foldPlaceholder",u.onclick=o,u}}}),ss={openText:"\u2304",closedText:"\u203A",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Gu extends Mi{constructor(t,n){super(),this.config=t,this.open=n}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=t.state.phrase(this.open?"Fold line":"Unfold line"),n}}function yh(a={}){let t=Object.assign(Object.assign({},ss),a),n=new Gu(t,!0),o=new Gu(t,!1),u=Wo.fromClass(class{constructor(v){this.from=v.viewport.from,this.markers=this.buildMarkers(v)}update(v){(v.docChanged||v.viewportChanged||v.startState.facet(mr)!=v.state.facet(mr)||v.startState.field(kr,!1)!=v.state.field(kr,!1)||Z(v.startState)!=Z(v.state)||t.foldingChanged(v))&&(this.markers=this.buildMarkers(v.view))}buildMarkers(v){let S=new Uo;for(let A of v.viewportLineBlocks){let H=Ei(v.state,A.from,A.to)?o:Ve(v.state,A.from,A.to)?n:null;H&&S.add(A.from,A.from,H)}return S.finish()}}),{domEventHandlers:p}=t;return[u,os({class:"cm-foldGutter",markers(v){var S;return((S=v.plugin(u))===null||S===void 0?void 0:S.markers)||hi.empty},initialSpacer(){return new Gu(t,!1)},domEventHandlers:Object.assign(Object.assign({},p),{click:(v,S,A)=>{if(p.click&&p.click(v,S,A))return!0;let H=Ei(v.state,S.from,S.to);if(H)return v.dispatch({effects:ir.of(H)}),!0;let X=Ve(v.state,S.from,S.to);return X?(v.dispatch({effects:pn.of(X)}),!0):!1}})}),fo()]}const g0=Di.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Dd{constructor(t,n){this.specs=t;let o;function u(S){let A=pr.newName();return(o||(o=Object.create(null)))["."+A]=S,A}const p=typeof n.all=="string"?n.all:n.all?u(n.all):void 0,v=n.scope;this.scope=v instanceof sl?S=>S.prop(qc)==v.data:v?S=>S==v:void 0,this.style=Vr(t.map(S=>({tag:S.tag,class:S.class||u(Object.assign({},S,{tag:null}))})),{all:p}).style,this.module=o?new pr(o):null,this.themeType=n.themeType}static define(t,n){return new Dd(t,n||{})}}const Eh=ft.define(),sp=ft.define({combine(a){return a.length?[a[0]]:null}});function jd(a){let t=a.facet(Eh);return t.length?t:a.facet(sp)}function ap(a,t){let n=[y0],o;return a instanceof Dd&&(a.module&&n.push(Di.styleModule.of(a.module)),o=a.themeType),t?.fallback?n.push(sp.of(a)):o?n.push(Eh.computeN([Di.darkTheme],u=>u.facet(Di.darkTheme)==(o=="dark")?[a]:[])):n.push(Eh.of(a)),n}function Ky(a,t,n){let o=jd(a),u=null;if(o){for(let p of o)if(!p.scope||n&&p.scope(n)){let v=p.style(t);v&&(u=u?u+" "+v:v)}}return u}class v0{constructor(t){this.markCache=Object.create(null),this.tree=Z(t.state),this.decorations=this.buildDeco(t,jd(t.state))}update(t){let n=Z(t.state),o=jd(t.state),u=o!=jd(t.startState);n.length<t.view.viewport.to&&!u&&n.type==this.tree.type?this.decorations=this.decorations.map(t.changes):(n!=this.tree||t.viewportChanged||u)&&(this.tree=n,this.decorations=this.buildDeco(t.view,o))}buildDeco(t,n){if(!n||!this.tree.length)return Lr.none;let o=new Uo;for(let{from:u,to:p}of t.visibleRanges)Ct(this.tree,n,(v,S,A)=>{o.add(v,S,this.markCache[A]||(this.markCache[A]=Lr.mark({class:A})))},u,p);return o.finish()}}const y0=xn.high(Wo.fromClass(v0,{decorations:a=>a.decorations})),E0=Dd.define([{tag:Ke.meta,color:"#404740"},{tag:Ke.link,textDecoration:"underline"},{tag:Ke.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Ke.emphasis,fontStyle:"italic"},{tag:Ke.strong,fontWeight:"bold"},{tag:Ke.strikethrough,textDecoration:"line-through"},{tag:Ke.keyword,color:"#708"},{tag:[Ke.atom,Ke.bool,Ke.url,Ke.contentSeparator,Ke.labelName],color:"#219"},{tag:[Ke.literal,Ke.inserted],color:"#164"},{tag:[Ke.string,Ke.deleted],color:"#a11"},{tag:[Ke.regexp,Ke.escape,Ke.special(Ke.string)],color:"#e40"},{tag:Ke.definition(Ke.variableName),color:"#00f"},{tag:Ke.local(Ke.variableName),color:"#30a"},{tag:[Ke.typeName,Ke.namespace],color:"#085"},{tag:Ke.className,color:"#167"},{tag:[Ke.special(Ke.variableName),Ke.macroName],color:"#256"},{tag:Ke.definition(Ke.propertyName),color:"#00c"},{tag:Ke.comment,color:"#940"},{tag:Ke.invalid,color:"#f00"}]),b0=Di.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),lp=1e4,up="()[]{}",cp=ft.define({combine(a){return Vi(a,{afterCursor:!0,brackets:up,maxScanDistance:lp,renderMatch:M0})}}),x0=Lr.mark({class:"cm-matchingBracket"}),C0=Lr.mark({class:"cm-nonmatchingBracket"});function M0(a){let t=[],n=a.matched?x0:C0;return t.push(n.range(a.start.from,a.start.to)),a.end&&t.push(n.range(a.end.from,a.end.to)),t}const S0=[Ut.define({create(){return Lr.none},update(a,t){if(!t.docChanged&&!t.selection)return a;let n=[],o=t.state.facet(cp);for(let u of t.state.selection.ranges){if(!u.empty)continue;let p=ef(t.state,u.head,-1,o)||u.head>0&&ef(t.state,u.head-1,1,o)||o.afterCursor&&(ef(t.state,u.head,1,o)||u.head<t.state.doc.length&&ef(t.state,u.head+1,-1,o));p&&(n=n.concat(o.renderMatch(p,t.state)))}return Lr.set(n,!0)},provide:a=>Di.decorations.from(a)}),b0];function O0(a={}){return[cp.of(a),S0]}const T0=new m;function bh(a,t,n){let o=a.prop(t<0?m.openedBy:m.closedBy);if(o)return o;if(a.name.length==1){let u=n.indexOf(a.name);if(u>-1&&u%2==(t<0?1:0))return[n[u+t]]}return null}function xh(a){let t=a.type.prop(T0);return t?t(a.node):a}function ef(a,t,n,o={}){let u=o.maxScanDistance||lp,p=o.brackets||up,v=Z(a),S=v.resolveInner(t,n);for(let A=S;A;A=A.parent){let H=bh(A.type,n,p);if(H&&A.from<A.to){let X=xh(A);if(X&&(n>0?t>=X.from&&t<X.to:t>X.from&&t<=X.to))return w0(a,t,n,A,X,H,p)}}return D0(a,t,n,v,S.type,u,p)}function w0(a,t,n,o,u,p,v){let S=o.parent,A={from:u.from,to:u.to},H=0,X=S?.cursor();if(X&&(n<0?X.childBefore(o.from):X.childAfter(o.to)))do if(n<0?X.to<=o.from:X.from>=o.to){if(H==0&&p.indexOf(X.type.name)>-1&&X.from<X.to){let Me=xh(X);return{start:A,end:Me?{from:Me.from,to:Me.to}:void 0,matched:!0}}else if(bh(X.type,n,v))H++;else if(bh(X.type,-n,v)){if(H==0){let Me=xh(X);return{start:A,end:Me&&Me.from<Me.to?{from:Me.from,to:Me.to}:void 0,matched:!1}}H--}}while(n<0?X.prevSibling():X.nextSibling());return{start:A,matched:!1}}function D0(a,t,n,o,u,p,v){let S=n<0?a.sliceDoc(t-1,t):a.sliceDoc(t,t+1),A=v.indexOf(S);if(A<0||A%2==0!=n>0)return null;let H={from:n<0?t-1:t,to:n>0?t+1:t},X=a.doc.iterRange(t,n>0?a.doc.length:0),Me=0;for(let gt=0;!X.next().done&&gt<=p;){let It=X.value;n<0&&(gt+=It.length);let un=t+gt*n;for(let or=n>0?0:It.length-1,ar=n>0?It.length:-1;or!=ar;or+=n){let wr=v.indexOf(It[or]);if(!(wr<0||o.resolveInner(un+or,1).type!=u))if(wr%2==0==n>0)Me++;else{if(Me==1)return{start:H,end:{from:un+or,to:un+or+1},matched:wr>>1==A>>1};Me--}}n>0&&(gt+=It.length)}return X.done?{start:H,matched:!1}:null}function fp(a,t,n,o=0,u=0){t==null&&(t=a.search(/[^\s\u00a0]/),t==-1&&(t=a.length));let p=u;for(let v=o;v<t;v++)a.charCodeAt(v)==9?p+=n-p%n:p++;return p}class dp{constructor(t,n,o){this.string=t,this.tabSize=n,this.indentUnit=o,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(t){let n=this.string.charAt(this.pos),o;if(typeof t=="string"?o=n==t:o=n&&(t instanceof RegExp?t.test(n):t(n)),o)return++this.pos,n}eatWhile(t){let n=this.pos;for(;this.eat(t););return this.pos>n}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let n=this.string.indexOf(t,this.pos);if(n>-1)return this.pos=n,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=fp(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){return fp(this.string,null,this.tabSize)}match(t,n,o){if(typeof t=="string"){let u=v=>o?v.toLowerCase():v,p=this.string.substr(this.pos,t.length);return u(p)==u(t)?(n!==!1&&(this.pos+=t.length),!0):null}else{let u=this.string.slice(this.pos).match(t);return u&&u.index>0?null:(u&&n!==!1&&(this.pos+=u[0].length),u)}}current(){return this.string.slice(this.start,this.pos)}}function P0(a){return{name:a.name||"",token:a.token,blankLine:a.blankLine||(()=>{}),startState:a.startState||(()=>!0),copyState:a.copyState||A0,indent:a.indent||(()=>null),languageData:a.languageData||{},tokenTable:a.tokenTable||Mh}}function A0(a){if(typeof a!="object")return a;let t={};for(let n in a){let o=a[n];t[n]=o instanceof Array?o.slice():o}return t}class hp extends null{constructor(t){let n=Oc(t.languageData),o=P0(t),u,p=new class extends Parser{createParse(v,S,A){return new I0(u,v,S,A)}};super(n,p,[Tr.of((v,S)=>this.getIndent(v,S))],t.name),this.topNode=$0(n),u=this,this.streamParser=o,this.stateAfter=new NodeProp({perNode:!0}),this.tokenTable=t.tokenTable?new yp(o.tokenTable):L0}static define(t){return new hp(t)}getIndent(t,n){let o=Z(t.state),u=o.resolve(n);for(;u&&u.type!=this.topNode;)u=u.parent;if(!u)return null;let p=Ch(this,o,0,u.from,n),v,S;if(p?(S=p.state,v=p.pos+1):(S=this.streamParser.startState(t.unit),v=0),n-v>1e4)return null;for(;v<n;){let H=t.state.doc.lineAt(v),X=Math.min(n,H.to);if(H.length){let Me=new dp(H.text,t.state.tabSize,t.unit);for(;Me.pos<X-H.from;)mp(this.streamParser.token,Me,S)}else this.streamParser.blankLine(S,t.unit);if(X==n)break;v=H.to+1}let{text:A}=t.lineAt(n);return this.streamParser.indent(S,/^\s*(.*)/.exec(A)[1],t)}get allowsNesting(){return!1}}function Ch(a,t,n,o,u){let p=n>=o&&n+t.length<=u&&t.prop(a.stateAfter);if(p)return{state:a.streamParser.copyState(p),pos:n+t.length};for(let v=t.children.length-1;v>=0;v--){let S=t.children[v],A=n+t.positions[v],H=S instanceof Tree&&A<u&&Ch(a,S,A,o,u);if(H)return H}return null}function pp(a,t,n,o,u){if(u&&n<=0&&o>=t.length)return t;!u&&t.type==a.topNode&&(u=!0);for(let p=t.children.length-1;p>=0;p--){let v=t.positions[p],S=t.children[p],A;if(v<o&&S instanceof Tree){if(!(A=pp(a,S,n-v,o-v,u)))break;return u?new Tree(t.type,t.children.slice(0,p).concat(A),t.positions.slice(0,p+1),v+A.length):A}}return null}function R0(a,t,n,o){for(let u of t){let p=u.from+(u.openStart?25:0),v=u.to-(u.openEnd?25:0),S=p<=n&&v>n&&Ch(a,u.tree,0-u.offset,n,v),A;if(S&&(A=pp(a,u.tree,n+u.offset,S.pos+u.offset,!1)))return{state:S.state,tree:A}}return{state:a.streamParser.startState(o?Yi(o):4),tree:Tree.empty}}class I0{constructor(t,n,o,u){this.lang=t,this.input=n,this.fragments=o,this.ranges=u,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=u[u.length-1].to;let p=Je.get(),v=u[0].from,{state:S,tree:A}=R0(t,o,v,p?.state);this.state=S,this.parsedPos=this.chunkStart=v+A.length;for(let H=0;H<A.children.length;H++)this.chunks.push(A.children[H]),this.chunkPos.push(A.positions[H]);p&&this.parsedPos<p.viewport.from-1e5&&(this.state=this.lang.streamParser.startState(Yi(p.state)),p.skipUntilInView(this.parsedPos,p.viewport.from),this.parsedPos=p.viewport.from),this.moveRangeIndex()}advance(){let t=Je.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),o=Math.min(n,this.chunkStart+2048);for(t&&(o=Math.min(o,t.viewport.to));this.parsedPos<o;)this.parseLine(t);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=n?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let n=this.input.chunk(t);if(this.input.lineChunks)n==`
2197
2197
  `&&(n="");else{let o=n.indexOf(`
2198
2198
  `);o>-1&&(n=n.slice(0,o))}return t+n.length<=this.to?n:n.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,n=this.lineAfter(t),o=t+n.length;for(let u=this.rangeIndex;;){let p=this.ranges[u].to;if(p>=o||(n=n.slice(0,p-(o-n.length)),u++,u==this.ranges.length))break;let v=this.ranges[u].from,S=this.lineAfter(v);n+=S,o=v+S.length}return{line:n,end:o}}skipGapsTo(t,n,o){for(;;){let u=this.ranges[this.rangeIndex].to,p=t+n;if(o>0?u>p:u>=p)break;let v=this.ranges[++this.rangeIndex].from;n+=v-u}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(t,n,o,u,p){if(this.ranges.length>1){p=this.skipGapsTo(n,p,1),n+=p;let v=this.chunk.length;p=this.skipGapsTo(o,p,-1),o+=p,u+=this.chunk.length-v}return this.chunk.push(t,n,o,u),p}parseLine(t){let{line:n,end:o}=this.nextLine(),u=0,{streamParser:p}=this.lang,v=new dp(n,t?t.state.tabSize:4,t?Yi(t.state):2);if(v.eol())p.blankLine(this.state,v.indentUnit);else for(;!v.eol();){let S=mp(p.token,v,this.state);if(S&&(u=this.emitToken(this.lang.tokenTable.resolve(S),this.parsedPos+v.start,this.parsedPos+v.pos,4,u)),v.start>1e4)break}this.parsedPos=o,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let t=Tree.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:_0,topID:0,maxBufferLength:2048,reused:this.chunkReused});t=new Tree(t.type,t.children,t.positions,t.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(t),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new Tree(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}}function mp(a,t,n){t.start=t.pos;for(let o=0;o<10;o++){let u=a(t,n);if(t.pos>t.start)return u}throw new Error("Stream parser failed to advance stream.")}const Mh=Object.create(null),Pd=[P.none],_0=new T(Pd),gp=[],vp=Object.create(null);for(let[a,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])vp[a]=Ep(Mh,t);class yp{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),vp)}resolve(t){return t?this.table[t]||(this.table[t]=Ep(this.extra,t)):0}}const L0=new yp(Mh);function Sh(a,t){gp.indexOf(a)>-1||(gp.push(a),console.warn(t))}function Ep(a,t){let n=null;for(let p of t.split(".")){let v=a[p]||Ke[p];v?typeof v=="function"?n?n=v(n):Sh(p,`Modifier ${p} used at start of tag`):n?Sh(p,`Tag ${p} used as modifier`):n=v:Sh(p,`Unknown highlighting tag ${p}`)}if(!n)return 0;let o=t.replace(/ /g,"_"),u=P.define({id:Pd.length,name:o,props:[gr({[o]:n})]});return Pd.push(u),u.id}function $0(a){let t=NodeType.define({id:Pd.length,name:"Document",props:[qc.add(()=>a)]});return Pd.push(t),t}const N0=()=>a=>{try{JSON.parse(a.state.doc.toString())}catch(t){if(!(t instanceof SyntaxError))throw t;const n=F0(t,a.state.doc);return[{from:n,message:t.message,severity:"error",to:n}]}return[]};function F0(a,t){let n;return(n=a.message.match(/at position (\d+)/))?Math.min(+n[1],t.length):(n=a.message.match(/at line (\d+) column (\d+)/))?Math.min(t.line(+n[1]).from+ +n[2]-1,t.length):0}const B0=sd.define({name:"json",parser:Fn.configure({props:[jo.add({Object:ll({except:/^\s*\}/}),Array:ll({except:/^\s*\]/})}),M.add({"Object Array":I})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function k0(){return new Nr(B0)}var j0=i(20011),U0=i(66017);const W0=a=>{let{state:t}=a,n=t.doc.lineAt(t.selection.main.head),o=Th(a.state,n.from);return o.line?z0(a):o.block?H0(a):!1};function Oh(a,t){return({state:n,dispatch:o})=>{if(n.readOnly)return!1;let u=a(t,n);return u?(o(n.update(u)),!0):!1}}const z0=Oh(G0,0),Yy=null,Qy=null,V0=Oh(bp,0),Jy=null,Xy=null,H0=Oh((a,t)=>bp(a,t,K0(t)),0);function Th(a,t){let n=a.languageDataAt("commentTokens",t);return n.length?n[0]:{}}const Ad=50;function Z0(a,{open:t,close:n},o,u){let p=a.sliceDoc(o-Ad,o),v=a.sliceDoc(u,u+Ad),S=/\s*$/.exec(p)[0].length,A=/^\s*/.exec(v)[0].length,H=p.length-S;if(p.slice(H-t.length,H)==t&&v.slice(A,A+n.length)==n)return{open:{pos:o-S,margin:S&&1},close:{pos:u+A,margin:A&&1}};let X,Me;u-o<=2*Ad?X=Me=a.sliceDoc(o,u):(X=a.sliceDoc(o,o+Ad),Me=a.sliceDoc(u-Ad,u));let gt=/^\s*/.exec(X)[0].length,It=/\s*$/.exec(Me)[0].length,un=Me.length-It-n.length;return X.slice(gt,gt+t.length)==t&&Me.slice(un,un+n.length)==n?{open:{pos:o+gt+t.length,margin:/\s/.test(X.charAt(gt+t.length))?1:0},close:{pos:u-It-n.length,margin:/\s/.test(Me.charAt(un-1))?1:0}}:null}function K0(a){let t=[];for(let n of a.selection.ranges){let o=a.doc.lineAt(n.from),u=n.to<=o.to?o:a.doc.lineAt(n.to),p=t.length-1;p>=0&&t[p].to>o.from?t[p].to=u.to:t.push({from:o.from,to:u.to})}return t}function bp(a,t,n=t.selection.ranges){let o=n.map(p=>Th(t,p.from).block);if(!o.every(p=>p))return null;let u=n.map((p,v)=>Z0(t,o[v],p.from,p.to));if(a!=2&&!u.every(p=>p))return{changes:t.changes(n.map((p,v)=>u[v]?[]:[{from:p.from,insert:o[v].open+" "},{from:p.to,insert:" "+o[v].close}]))};if(a!=1&&u.some(p=>p)){let p=[];for(let v=0,S;v<u.length;v++)if(S=u[v]){let A=o[v],{open:H,close:X}=S;p.push({from:H.pos-A.open.length,to:H.pos+H.margin},{from:X.pos-X.margin,to:X.pos+A.close.length})}return{changes:p}}return null}function G0(a,t,n=t.selection.ranges){let o=[],u=-1;for(let{from:p,to:v}of n){let S=o.length,A=1e9;for(let H=p;H<=v;){let X=t.doc.lineAt(H);if(X.from>u&&(p==v||v>X.from)){u=X.from;let Me=Th(t,X.from).line;if(!Me)continue;let gt=/^\s*/.exec(X.text)[0].length,It=gt==X.length,un=X.text.slice(gt,gt+Me.length)==Me?gt:-1;gt<X.text.length&&gt<A&&(A=gt),o.push({line:X,comment:un,token:Me,indent:gt,empty:It,single:!1})}H=X.to+1}if(A<1e9)for(let H=S;H<o.length;H++)o[H].indent<o[H].line.text.length&&(o[H].indent=A);o.length==S+1&&(o[S].single=!0)}if(a!=2&&o.some(p=>p.comment<0&&(!p.empty||p.single))){let p=[];for(let{line:S,token:A,indent:H,empty:X,single:Me}of o)(Me||!X)&&p.push({from:S.from+H,insert:A+" "});let v=t.changes(p);return{changes:v,selection:t.selection.map(v,1)}}else if(a!=1&&o.some(p=>p.comment>=0)){let p=[];for(let{line:v,comment:S,token:A}of o)if(S>=0){let H=v.from+S,X=H+A.length;v.text[X-v.from]==" "&&X++,p.push({from:H,to:X})}return{changes:p}}return null}const wh=Xe.define(),Y0=Xe.define(),Q0=ft.define(),xp=ft.define({combine(a){return Vi(a,{minDepth:100,newGroupDelay:500,joinToEvent:(t,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,n)=>(o,u)=>t(o,u)||n(o,u)})}});function J0(a){let t=0;return a.iterChangedRanges((n,o)=>t=o),t}const Dh=Ut.define({create(){return tf.empty},update(a,t){let n=t.state.facet(xp),o=t.annotation(wh);if(o){let A=t.docChanged?ue.single(J0(t.changes)):void 0,H=ru.fromTransaction(t,A),X=o.side,Me=X==0?a.undone:a.done;return H?Me=Wd(Me,Me.length,n.minDepth,H):Me=Sp(Me,t.startState.selection),new tf(X==0?o.rest:Me,X==0?Me:o.rest)}let u=t.annotation(Y0);if((u=="full"||u=="before")&&(a=a.isolate()),t.annotation(Xt.addToHistory)===!1)return t.changes.empty?a:a.addMapping(t.changes.desc);let p=ru.fromTransaction(t),v=t.annotation(Xt.time),S=t.annotation(Xt.userEvent);return p?a=a.addChanges(p,v,S,n,t):t.selection&&(a=a.addSelection(t.startState.selection,v,S,n.newGroupDelay)),(u=="full"||u=="after")&&(a=a.isolate()),a},toJSON(a){return{done:a.done.map(t=>t.toJSON()),undone:a.undone.map(t=>t.toJSON())}},fromJSON(a){return new tf(a.done.map(ru.fromJSON),a.undone.map(ru.fromJSON))}});function X0(a={}){return[Dh,xp.of(a),Di.domEventHandlers({beforeinput(t,n){let o=t.inputType=="historyUndo"?Cp:t.inputType=="historyRedo"?Ph:null;return o?(t.preventDefault(),o(n)):!1}})]}const qy=null;function Ud(a,t){return function({state:n,dispatch:o}){if(!t&&n.readOnly)return!1;let u=n.field(Dh,!1);if(!u)return!1;let p=u.pop(a,n,t);return p?(o(p),!0):!1}}const Cp=Ud(0,!1),Ph=Ud(1,!1),q0=Ud(0,!0),eg=Ud(1,!0);function e1(a){return function(t){let n=t.field(Dh,!1);if(!n)return 0;let o=a==0?n.done:n.undone;return o.length-(o.length&&!o[0].changes?1:0)}}const t1=null,n1=null;class ru{constructor(t,n,o,u,p){this.changes=t,this.effects=n,this.mapped=o,this.startSelection=u,this.selectionsAfter=p}setSelAfter(t){return new ru(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,n,o;return{changes:(t=this.changes)===null||t===void 0?void 0:t.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(o=this.startSelection)===null||o===void 0?void 0:o.toJSON(),selectionsAfter:this.selectionsAfter.map(u=>u.toJSON())}}static fromJSON(t){return new ru(t.changes&&Jn.fromJSON(t.changes),[],t.mapped&&dn.fromJSON(t.mapped),t.startSelection&&ue.fromJSON(t.startSelection),t.selectionsAfter.map(ue.fromJSON))}static fromTransaction(t,n){let o=Yu;for(let u of t.startState.facet(Q0)){let p=u(t);p.length&&(o=o.concat(p))}return!o.length&&t.changes.empty?null:new ru(t.changes.invert(t.startState.doc),o,void 0,n||t.startState.selection,Yu)}static selection(t){return new ru(void 0,Yu,void 0,void 0,t)}}function Wd(a,t,n,o){let u=t+1>n+20?t-n-1:0,p=a.slice(u,t);return p.push(o),p}function tg(a,t){let n=[],o=!1;return a.iterChangedRanges((u,p)=>n.push(u,p)),t.iterChangedRanges((u,p,v,S)=>{for(let A=0;A<n.length;){let H=n[A++],X=n[A++];S>=H&&v<=X&&(o=!0)}}),o}function ng(a,t){return a.ranges.length==t.ranges.length&&a.ranges.filter((n,o)=>n.empty!=t.ranges[o].empty).length===0}function Mp(a,t){return a.length?t.length?a.concat(t):a:t}const Yu=[],rg=200;function Sp(a,t){if(a.length){let n=a[a.length-1],o=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-rg));return o.length&&o[o.length-1].eq(t)?a:(o.push(t),Wd(a,a.length-1,1e9,n.setSelAfter(o)))}else return[ru.selection([t])]}function ig(a){let t=a[a.length-1],n=a.slice();return n[a.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function Ah(a,t){if(!a.length)return a;let n=a.length,o=Yu;for(;n;){let u=og(a[n-1],t,o);if(u.changes&&!u.changes.empty||u.effects.length){let p=a.slice(0,n);return p[n-1]=u,p}else t=u.mapped,n--,o=u.selectionsAfter}return o.length?[ru.selection(o)]:Yu}function og(a,t,n){let o=Mp(a.selectionsAfter.length?a.selectionsAfter.map(S=>S.map(t)):Yu,n);if(!a.changes)return ru.selection(o);let u=a.changes.map(t),p=t.mapDesc(a.changes,!0),v=a.mapped?a.mapped.composeDesc(p):p;return new ru(u,Et.mapEffects(a.effects,t),v,a.startSelection.map(p),o)}const sg=/^(input\.type|delete)($|\.)/;class tf{constructor(t,n,o=0,u=void 0){this.done=t,this.undone=n,this.prevTime=o,this.prevUserEvent=u}isolate(){return this.prevTime?new tf(this.done,this.undone):this}addChanges(t,n,o,u,p){let v=this.done,S=v[v.length-1];return S&&S.changes&&!S.changes.empty&&t.changes&&(!o||sg.test(o))&&(!S.selectionsAfter.length&&n-this.prevTime<u.newGroupDelay&&u.joinToEvent(p,tg(S.changes,t.changes))||o=="input.type.compose")?v=Wd(v,v.length-1,u.minDepth,new ru(t.changes.compose(S.changes),Mp(t.effects,S.effects),S.mapped,S.startSelection,Yu)):v=Wd(v,v.length,u.minDepth,t),new tf(v,Yu,n,o)}addSelection(t,n,o,u){let p=this.done.length?this.done[this.done.length-1].selectionsAfter:Yu;return p.length>0&&n-this.prevTime<u&&o==this.prevUserEvent&&o&&/^select($|\.)/.test(o)&&ng(p[p.length-1],t)?this:new tf(Sp(this.done,t),this.undone,n,o)}addMapping(t){return new tf(Ah(this.done,t),Ah(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,n,o){let u=t==0?this.done:this.undone;if(u.length==0)return null;let p=u[u.length-1];if(o&&p.selectionsAfter.length)return n.update({selection:p.selectionsAfter[p.selectionsAfter.length-1],annotations:wh.of({side:t,rest:ig(u)}),userEvent:t==0?"select.undo":"select.redo",scrollIntoView:!0});if(p.changes){let v=u.length==1?Yu:u.slice(0,u.length-1);return p.mapped&&(v=Ah(v,p.mapped)),n.update({changes:p.changes,selection:p.startSelection,effects:p.effects,annotations:wh.of({side:t,rest:v}),filter:!1,userEvent:t==0?"undo":"redo",scrollIntoView:!0})}else return null}}tf.empty=new tf(Yu,Yu);const ag=[{key:"Mod-z",run:Cp,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Ph,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Ph,preventDefault:!0},{key:"Mod-u",run:q0,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:eg,preventDefault:!0}];function gd(a,t){return ue.create(a.ranges.map(t),a.mainIndex)}function nf(a,t){return a.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function Qu({state:a,dispatch:t},n){let o=gd(a.selection,n);return o.eq(a.selection)?!1:(t(nf(a,o)),!0)}function Rd(a,t){return ue.cursor(t?a.to:a.from)}function zd(a,t){return Qu(a,n=>n.empty?a.moveByChar(n,t):Rd(n,t))}function $l(a){return a.textDirectionAt(a.state.selection.main.head)==ts.LTR}const Op=a=>zd(a,!$l(a)),Tp=a=>zd(a,$l(a)),r1=a=>zd(a,!0),i1=a=>zd(a,!1);function Vd(a,t){return Qu(a,n=>n.empty?a.moveByGroup(n,t):Rd(n,t))}const lg=a=>Vd(a,!$l(a)),ug=a=>Vd(a,$l(a)),o1=a=>Vd(a,!0),s1=a=>Vd(a,!1);function wp(a,t,n){let o=a.state.charCategorizer(t.from);return a.moveByChar(t,n,u=>{let p=CharCategory.Space,v=t.from,S=!1,A=!1,H=!1,X=Me=>{if(S)return!1;v+=n?Me.length:-Me.length;let gt=o(Me),It;if(p==CharCategory.Space&&(p=gt),p!=gt)return!1;if(p==CharCategory.Word)if(Me.toLowerCase()==Me){if(!n&&A)return!1;H=!0}else if(H){if(n)return!1;S=!0}else{if(A&&n&&o(It=a.state.sliceDoc(v,v+1))==CharCategory.Word&&It.toLowerCase()==It)return!1;A=!0}return!0};return X(u),X})}function Dp(a,t){return Qu(a,n=>n.empty?wp(a,n,t):Rd(n,t))}const a1=a=>Dp(a,!0),l1=a=>Dp(a,!1);function cg(a,t,n){if(t.type.prop(n))return!0;let o=t.to-t.from;return o&&(o>2||/[^\s,.;:]/.test(a.sliceDoc(t.from,t.to)))||t.firstChild}function Hd(a,t,n){let o=Z(a).resolveInner(t.head),u=n?m.closedBy:m.openedBy;for(let A=t.head;;){let H=n?o.childAfter(A):o.childBefore(A);if(!H)break;cg(a,H,u)?o=H:A=n?H.to:H.from}let p=o.type.prop(u),v,S;return p&&(v=n?ef(a,o.from,1):ef(a,o.to,-1))&&v.matched?S=n?v.end.to:v.end.from:S=n?o.to:o.from,ue.cursor(S,n?-1:1)}const fg=a=>Qu(a,t=>Hd(a.state,t,!$l(a))),dg=a=>Qu(a,t=>Hd(a.state,t,$l(a)));function Pp(a,t){return Qu(a,n=>{if(!n.empty)return Rd(n,t);let o=a.moveVertically(n,t);return o.head!=n.head?o:a.moveToLineBoundary(n,t)})}const Ap=a=>Pp(a,!1),Rp=a=>Pp(a,!0);function Ip(a){let t=a.scrollDOM.clientHeight<a.scrollDOM.scrollHeight-2,n=0,o=0,u;if(t){for(let p of a.state.facet(Di.scrollMargins)){let v=p(a);v?.top&&(n=Math.max(v?.top,n)),v?.bottom&&(o=Math.max(v?.bottom,o))}u=a.scrollDOM.clientHeight-n-o}else u=(a.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:o,selfScroll:t,height:Math.max(a.defaultLineHeight,u-5)}}function _p(a,t){let n=Ip(a),{state:o}=a,u=gd(o.selection,v=>v.empty?a.moveVertically(v,t,n.height):Rd(v,t));if(u.eq(o.selection))return!1;let p;if(n.selfScroll){let v=a.coordsAtPos(o.selection.main.head),S=a.scrollDOM.getBoundingClientRect(),A=S.top+n.marginTop,H=S.bottom-n.marginBottom;v&&v.top>A&&v.bottom<H&&(p=Di.scrollIntoView(u.main.head,{y:"start",yMargin:v.top-A}))}return a.dispatch(nf(o,u),{effects:p}),!0}const Lp=a=>_p(a,!1),Rh=a=>_p(a,!0);function Gf(a,t,n){let o=a.lineBlockAt(t.head),u=a.moveToLineBoundary(t,n);if(u.head==t.head&&u.head!=(n?o.to:o.from)&&(u=a.moveToLineBoundary(t,n,!1)),!n&&u.head==o.from&&o.length){let p=/^\s*/.exec(a.state.sliceDoc(o.from,Math.min(o.from+100,o.to)))[0].length;p&&t.head!=o.from+p&&(u=ue.cursor(o.from+p))}return u}const hg=a=>Qu(a,t=>Gf(a,t,!0)),pg=a=>Qu(a,t=>Gf(a,t,!1)),mg=a=>Qu(a,t=>Gf(a,t,!$l(a))),gg=a=>Qu(a,t=>Gf(a,t,$l(a))),vg=a=>Qu(a,t=>ue.cursor(a.lineBlockAt(t.head).from,1)),yg=a=>Qu(a,t=>ue.cursor(a.lineBlockAt(t.head).to,-1));function $p(a,t,n){let o=!1,u=gd(a.selection,p=>{let v=ef(a,p.head,-1)||ef(a,p.head,1)||p.head>0&&ef(a,p.head-1,1)||p.head<a.doc.length&&ef(a,p.head+1,-1);if(!v||!v.end)return p;o=!0;let S=v.start.from==p.head?v.end.to:v.end.from;return n?ue.range(p.anchor,S):ue.cursor(S)});return o?(t(nf(a,u)),!0):!1}const Eg=({state:a,dispatch:t})=>$p(a,t,!1),u1=({state:a,dispatch:t})=>$p(a,t,!0);function Su(a,t){let n=gd(a.state.selection,o=>{let u=t(o);return ue.range(o.anchor,u.head,u.goalColumn,u.bidiLevel||void 0)});return n.eq(a.state.selection)?!1:(a.dispatch(nf(a.state,n)),!0)}function Zd(a,t){return Su(a,n=>a.moveByChar(n,t))}const Np=a=>Zd(a,!$l(a)),Fp=a=>Zd(a,$l(a)),c1=a=>Zd(a,!0),f1=a=>Zd(a,!1);function Kd(a,t){return Su(a,n=>a.moveByGroup(n,t))}const bg=a=>Kd(a,!$l(a)),xg=a=>Kd(a,$l(a)),d1=a=>Kd(a,!0),h1=a=>Kd(a,!1);function Bp(a,t){return Su(a,n=>wp(a,n,t))}const p1=a=>Bp(a,!0),m1=a=>Bp(a,!1),Cg=a=>Su(a,t=>Hd(a.state,t,!$l(a))),Mg=a=>Su(a,t=>Hd(a.state,t,$l(a)));function kp(a,t){return Su(a,n=>a.moveVertically(n,t))}const jp=a=>kp(a,!1),Up=a=>kp(a,!0);function Wp(a,t){return Su(a,n=>a.moveVertically(n,t,Ip(a).height))}const zp=a=>Wp(a,!1),Vp=a=>Wp(a,!0),Sg=a=>Su(a,t=>Gf(a,t,!0)),Og=a=>Su(a,t=>Gf(a,t,!1)),Tg=a=>Su(a,t=>Gf(a,t,!$l(a))),wg=a=>Su(a,t=>Gf(a,t,$l(a))),Dg=a=>Su(a,t=>ue.cursor(a.lineBlockAt(t.head).from)),Pg=a=>Su(a,t=>ue.cursor(a.lineBlockAt(t.head).to)),Hp=({state:a,dispatch:t})=>(t(nf(a,{anchor:0})),!0),Zp=({state:a,dispatch:t})=>(t(nf(a,{anchor:a.doc.length})),!0),Kp=({state:a,dispatch:t})=>(t(nf(a,{anchor:a.selection.main.anchor,head:0})),!0),Gp=({state:a,dispatch:t})=>(t(nf(a,{anchor:a.selection.main.anchor,head:a.doc.length})),!0),Ag=({state:a,dispatch:t})=>(t(a.update({selection:{anchor:0,head:a.doc.length},userEvent:"select"})),!0),Rg=({state:a,dispatch:t})=>{let n=Qd(a).map(({from:o,to:u})=>ue.range(o,Math.min(u+1,a.doc.length)));return t(a.update({selection:ue.create(n),userEvent:"select"})),!0},Ig=({state:a,dispatch:t})=>{let n=gd(a.selection,o=>{var u;let p=Z(a).resolveInner(o.head,1);for(;!(p.from<o.from&&p.to>=o.to||p.to>o.to&&p.from<=o.from||!(!((u=p.parent)===null||u===void 0)&&u.parent));)p=p.parent;return ue.range(p.to,p.from)});return t(nf(a,n)),!0},_g=({state:a,dispatch:t})=>{let n=a.selection,o=null;return n.ranges.length>1?o=ue.create([n.main]):n.main.empty||(o=ue.create([ue.cursor(n.main.head)])),o?(t(nf(a,o)),!0):!1};function Gd(a,t){if(a.state.readOnly)return!1;let n="delete.selection",{state:o}=a,u=o.changeByRange(p=>{let{from:v,to:S}=p;if(v==S){let A=t(v);A<v?(n="delete.backward",A=Yd(a,A,!1)):A>v&&(n="delete.forward",A=Yd(a,A,!0)),v=Math.min(v,A),S=Math.max(S,A)}else v=Yd(a,v,!1),S=Yd(a,S,!0);return v==S?{range:p}:{changes:{from:v,to:S},range:ue.cursor(v)}});return u.changes.empty?!1:(a.dispatch(o.update(u,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?Di.announce.of(o.phrase("Selection deleted")):void 0})),!0)}function Yd(a,t,n){if(a instanceof Di)for(let o of a.state.facet(Di.atomicRanges).map(u=>u(a)))o.between(t,t,(u,p)=>{u<t&&p>t&&(t=n?p:u)});return t}const Yp=(a,t)=>Gd(a,n=>{let{state:o}=a,u=o.doc.lineAt(n),p,v;if(!t&&n>u.from&&n<u.from+200&&!/[^ \t]/.test(p=u.text.slice(0,n-u.from))){if(p[p.length-1]==" ")return n-1;let S=Ur(p,o.tabSize),A=S%Yi(o)||Yi(o);for(let H=0;H<A&&p[p.length-1-H]==" ";H++)n--;v=n}else v=ne(u.text,n-u.from,t,t)+u.from,v==n&&u.number!=(t?o.doc.lines:1)&&(v+=t?1:-1);return v}),Ih=a=>Yp(a,!1),Qp=a=>Yp(a,!0),Jp=(a,t)=>Gd(a,n=>{let o=n,{state:u}=a,p=u.doc.lineAt(o),v=u.charCategorizer(o);for(let S=null;;){if(o==(t?p.to:p.from)){o==n&&p.number!=(t?u.doc.lines:1)&&(o+=t?1:-1);break}let A=ne(p.text,o-p.from,t)+p.from,H=p.text.slice(Math.min(o,A)-p.from,Math.max(o,A)-p.from),X=v(H);if(S!=null&&X!=S)break;(H!=" "||o!=n)&&(S=X),o=A}return o}),Xp=a=>Jp(a,!1),Lg=a=>Jp(a,!0),qp=a=>Gd(a,t=>{let n=a.lineBlockAt(t).to;return t<n?n:Math.min(a.state.doc.length,t+1)}),$g=a=>Gd(a,t=>{let n=a.lineBlockAt(t).from;return t>n?n:Math.max(0,t-1)}),g1=({state:a,dispatch:t})=>{if(a.readOnly)return!1;let n=[];for(let o=0,u="",p=a.doc.iter();;){if(p.next(),p.lineBreak||p.done){let v=u.search(/\s+$/);if(v>-1&&n.push({from:o-(u.length-v),to:o}),p.done)break;u=""}else u=p.value;o+=p.value.length}return n.length?(t(a.update({changes:n,userEvent:"delete"})),!0):!1},Ng=({state:a,dispatch:t})=>{if(a.readOnly)return!1;let n=a.changeByRange(o=>({changes:{from:o.from,to:o.to,insert:Cn.of(["",""])},range:ue.cursor(o.from)}));return t(a.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Fg=({state:a,dispatch:t})=>{if(a.readOnly)return!1;let n=a.changeByRange(o=>{if(!o.empty||o.from==0||o.from==a.doc.length)return{range:o};let u=o.from,p=a.doc.lineAt(u),v=u==p.from?u-1:ne(p.text,u-p.from,!1)+p.from,S=u==p.to?u+1:ne(p.text,u-p.from,!0)+p.from;return{changes:{from:v,to:S,insert:a.doc.slice(u,S).append(a.doc.slice(v,u))},range:ue.cursor(S)}});return n.changes.empty?!1:(t(a.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Qd(a){let t=[],n=-1;for(let o of a.selection.ranges){let u=a.doc.lineAt(o.from),p=a.doc.lineAt(o.to);if(!o.empty&&o.to==p.from&&(p=a.doc.lineAt(o.to-1)),n>=u.number){let v=t[t.length-1];v.to=p.to,v.ranges.push(o)}else t.push({from:u.from,to:p.to,ranges:[o]});n=p.number+1}return t}function em(a,t,n){if(a.readOnly)return!1;let o=[],u=[];for(let p of Qd(a)){if(n?p.to==a.doc.length:p.from==0)continue;let v=a.doc.lineAt(n?p.to+1:p.from-1),S=v.length+1;if(n){o.push({from:p.to,to:v.to},{from:p.from,insert:v.text+a.lineBreak});for(let A of p.ranges)u.push(ue.range(Math.min(a.doc.length,A.anchor+S),Math.min(a.doc.length,A.head+S)))}else{o.push({from:v.from,to:p.from},{from:p.to,insert:a.lineBreak+v.text});for(let A of p.ranges)u.push(ue.range(A.anchor-S,A.head-S))}}return o.length?(t(a.update({changes:o,scrollIntoView:!0,selection:ue.create(u,a.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Bg=({state:a,dispatch:t})=>em(a,t,!1),kg=({state:a,dispatch:t})=>em(a,t,!0);function tm(a,t,n){if(a.readOnly)return!1;let o=[];for(let u of Qd(a))n?o.push({from:u.from,insert:a.doc.slice(u.from,u.to)+a.lineBreak}):o.push({from:u.to,insert:a.lineBreak+a.doc.slice(u.from,u.to)});return t(a.update({changes:o,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const jg=({state:a,dispatch:t})=>tm(a,t,!1),Ug=({state:a,dispatch:t})=>tm(a,t,!0),Wg=a=>{if(a.state.readOnly)return!1;let{state:t}=a,n=t.changes(Qd(t).map(({from:u,to:p})=>(u>0?u--:p<t.doc.length&&p++,{from:u,to:p}))),o=gd(t.selection,u=>a.moveVertically(u,!0)).map(n);return a.dispatch({changes:n,selection:o,scrollIntoView:!0,userEvent:"delete.line"}),!0},v1=({state:a,dispatch:t})=>(t(a.update(a.replaceSelection(a.lineBreak),{scrollIntoView:!0,userEvent:"input"})),!0);function zg(a,t){if(/\(\)|\[\]|\{\}/.test(a.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=Z(a).resolveInner(t),o=n.childBefore(t),u=n.childAfter(t),p;return o&&u&&o.to<=t&&u.from>=t&&(p=o.type.prop(m.closedBy))&&p.indexOf(u.name)>-1&&a.doc.lineAt(o.to).from==a.doc.lineAt(u.from).from?{from:o.to,to:u.from}:null}const Vg=nm(!1),Hg=nm(!0);function nm(a){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let o=t.changeByRange(u=>{let{from:p,to:v}=u,S=t.doc.lineAt(p),A=!a&&p==v&&zg(t,p);a&&(p=v=(v<=S.to?S:t.doc.lineAt(v)).to);let H=new Ri(t,{simulateBreak:p,simulateDoubleBreak:!!A}),X=Ji(H,p);for(X==null&&(X=/^\s*/.exec(t.doc.lineAt(p).text)[0].length);v<S.to&&/\s/.test(S.text[v-S.from]);)v++;A?{from:p,to:v}=A:p>S.from&&p<S.from+100&&!/\S/.test(S.text.slice(0,p))&&(p=S.from);let Me=["",yi(t,X)];return A&&Me.push(yi(t,H.lineIndent(S.from,-1))),{changes:{from:p,to:v,insert:Cn.of(Me)},range:ue.cursor(p+1+Me[1].length)}});return n(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0}}function _h(a,t){let n=-1;return a.changeByRange(o=>{let u=[];for(let v=o.from;v<=o.to;){let S=a.doc.lineAt(v);S.number>n&&(o.empty||o.to>S.from)&&(t(S,u,o),n=S.number),v=S.to+1}let p=a.changes(u);return{changes:u,range:ue.range(p.mapPos(o.anchor,1),p.mapPos(o.head,1))}})}const Zg=({state:a,dispatch:t})=>{if(a.readOnly)return!1;let n=Object.create(null),o=new Ri(a,{overrideIndentation:p=>{let v=n[p];return v??-1}}),u=_h(a,(p,v,S)=>{let A=Ji(o,p.from);if(A==null)return;/\S/.test(p.text)||(A=0);let H=/^\s*/.exec(p.text)[0],X=yi(a,A);(H!=X||S.from<p.from+H.length)&&(n[p.from]=A,v.push({from:p.from,to:p.from+H.length,insert:X}))});return u.changes.empty||t(a.update(u,{userEvent:"indent"})),!0},Lh=({state:a,dispatch:t})=>a.readOnly?!1:(t(a.update(_h(a,(n,o)=>{o.push({from:n.from,insert:a.facet(Ai)})}),{userEvent:"input.indent"})),!0),rm=({state:a,dispatch:t})=>a.readOnly?!1:(t(a.update(_h(a,(n,o)=>{let u=/^\s*/.exec(n.text)[0];if(!u)return;let p=Ur(u,a.tabSize),v=0,S=yi(a,Math.max(0,p-Yi(a)));for(;v<u.length&&v<S.length&&u.charCodeAt(v)==S.charCodeAt(v);)v++;o.push({from:n.from+v,to:n.from+u.length,insert:S.slice(v)})}),{userEvent:"delete.dedent"})),!0),y1=({state:a,dispatch:t})=>a.selection.ranges.some(n=>!n.empty)?Lh({state:a,dispatch:t}):(t(a.update(a.replaceSelection(" "),{scrollIntoView:!0,userEvent:"input"})),!0),Kg=[{key:"Ctrl-b",run:Op,shift:Np,preventDefault:!0},{key:"Ctrl-f",run:Tp,shift:Fp},{key:"Ctrl-p",run:Ap,shift:jp},{key:"Ctrl-n",run:Rp,shift:Up},{key:"Ctrl-a",run:vg,shift:Dg},{key:"Ctrl-e",run:yg,shift:Pg},{key:"Ctrl-d",run:Qp},{key:"Ctrl-h",run:Ih},{key:"Ctrl-k",run:qp},{key:"Ctrl-Alt-h",run:Xp},{key:"Ctrl-o",run:Ng},{key:"Ctrl-t",run:Fg},{key:"Ctrl-v",run:Rh}],Gg=[{key:"ArrowLeft",run:Op,shift:Np,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:lg,shift:bg,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:mg,shift:Tg,preventDefault:!0},{key:"ArrowRight",run:Tp,shift:Fp,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:ug,shift:xg,preventDefault:!0},{mac:"Cmd-ArrowRight",run:gg,shift:wg,preventDefault:!0},{key:"ArrowUp",run:Ap,shift:jp,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Hp,shift:Kp},{mac:"Ctrl-ArrowUp",run:Lp,shift:zp},{key:"ArrowDown",run:Rp,shift:Up,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Zp,shift:Gp},{mac:"Ctrl-ArrowDown",run:Rh,shift:Vp},{key:"PageUp",run:Lp,shift:zp},{key:"PageDown",run:Rh,shift:Vp},{key:"Home",run:pg,shift:Og,preventDefault:!0},{key:"Mod-Home",run:Hp,shift:Kp},{key:"End",run:hg,shift:Sg,preventDefault:!0},{key:"Mod-End",run:Zp,shift:Gp},{key:"Enter",run:Vg},{key:"Mod-a",run:Ag},{key:"Backspace",run:Ih,shift:Ih},{key:"Delete",run:Qp},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Xp},{key:"Mod-Delete",mac:"Alt-Delete",run:Lg},{mac:"Mod-Backspace",run:$g},{mac:"Mod-Delete",run:qp}].concat(Kg.map(a=>({mac:a.key,run:a.run,shift:a.shift}))),Yg=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:fg,shift:Cg},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:dg,shift:Mg},{key:"Alt-ArrowUp",run:Bg},{key:"Shift-Alt-ArrowUp",run:jg},{key:"Alt-ArrowDown",run:kg},{key:"Shift-Alt-ArrowDown",run:Ug},{key:"Escape",run:_g},{key:"Mod-Enter",run:Hg},{key:"Alt-l",mac:"Ctrl-l",run:Rg},{key:"Mod-i",run:Ig,preventDefault:!0},{key:"Mod-[",run:rm},{key:"Mod-]",run:Lh},{key:"Mod-Alt-\\",run:Zg},{key:"Shift-Mod-k",run:Wg},{key:"Shift-Mod-\\",run:Eg},{key:"Mod-/",run:W0},{key:"Alt-A",run:V0}].concat(Gg),Qg={key:"Tab",run:Lh,shift:rm};function js(){var a=arguments[0];typeof a=="string"&&(a=document.createElement(a));var t=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)){var u=n[o];typeof u=="string"?a.setAttribute(o,u):u!=null&&(a[o]=u)}t++}for(;t<arguments.length;t++)im(a,arguments[t]);return a}function im(a,t){if(typeof t=="string")a.appendChild(document.createTextNode(t));else if(t!=null)if(t.nodeType!=null)a.appendChild(t);else if(Array.isArray(t))for(var n=0;n<t.length;n++)im(a,t[n]);else throw new RangeError("Unsupported child node: "+t)}const om=typeof String.prototype.normalize=="function"?a=>a.normalize("NFKD"):a=>a;class vd{constructor(t,n,o=0,u=t.length,p,v){this.test=v,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(o,u),this.bufferStart=o,this.normalize=p?S=>p(om(S)):om,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Rt(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let n=fn(t),o=this.bufferStart+this.bufferPos;this.bufferPos+=qt(t);let u=this.normalize(n);for(let p=0,v=o;;p++){let S=u.charCodeAt(p),A=this.match(S,v);if(A)return this.value=A,this;if(p==u.length-1)break;v==o&&p<n.length&&n.charCodeAt(p)==S&&v++}}}match(t,n){let o=null;for(let u=0;u<this.matches.length;u+=2){let p=this.matches[u],v=!1;this.query.charCodeAt(p)==t&&(p==this.query.length-1?o={from:this.matches[u+1],to:n+1}:(this.matches[u]++,v=!0)),v||(this.matches.splice(u,2),u-=2)}return this.query.charCodeAt(0)==t&&(this.query.length==1?o={from:n,to:n+1}:this.matches.push(1,n)),o&&this.test&&!this.test(o.from,o.to,this.buffer,this.bufferPos)&&(o=null),o}}typeof Symbol<"u"&&(vd.prototype[Symbol.iterator]=function(){return this});const sm={from:-1,to:-1,match:/.*/.exec("")},$h="gm"+(/x/.unicode==null?"":"u");class am{constructor(t,n,o,u=0,p=t.length){if(this.text=t,this.to=p,this.curLine="",this.done=!1,this.value=sm,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new lm(t,n,o,u,p);this.re=new RegExp(n,$h+(o?.ignoreCase?"i":"")),this.test=o?.test,this.iter=t.iter();let v=t.lineAt(u);this.curLineStart=v.from,this.matchPos=Jd(t,u),this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let o=this.curLineStart+n.index,u=o+n[0].length;if(this.matchPos=Jd(this.text,u+(o==u?1:0)),o==this.curLineStart+this.curLine.length&&this.nextLine(),(o<u||o>this.value.to)&&(!this.test||this.test(o,u,n)))return this.value={from:o,to:u,match:n},this;t=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),t=0;else return this.done=!0,this}}}const Nh=new WeakMap;class yd{constructor(t,n){this.from=t,this.text=n}get to(){return this.from+this.text.length}static get(t,n,o){let u=Nh.get(t);if(!u||u.from>=o||u.to<=n){let S=new yd(n,t.sliceString(n,o));return Nh.set(t,S),S}if(u.from==n&&u.to==o)return u;let{text:p,from:v}=u;return v>n&&(p=t.sliceString(n,v)+p,v=n),u.to<o&&(p+=t.sliceString(u.to,o)),Nh.set(t,new yd(v,p)),new yd(n,p.slice(n-v,o-v))}}class lm{constructor(t,n,o,u,p){this.text=t,this.to=p,this.done=!1,this.value=sm,this.matchPos=Jd(t,u),this.re=new RegExp(n,$h+(o?.ignoreCase?"i":"")),this.test=o?.test,this.flat=yd.get(t,u,this.chunkEnd(u+5e3))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==t&&(this.re.lastIndex=t+1,n=this.re.exec(this.flat.text)),n){let o=this.flat.from+n.index,u=o+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(o,u,n)))return this.value={from:o,to:u,match:n},this.matchPos=Jd(this.text,u+(o==u?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=yd.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(am.prototype[Symbol.iterator]=lm.prototype[Symbol.iterator]=function(){return this});function Jg(a){try{return new RegExp(a,$h),!0}catch{return!1}}function Jd(a,t){if(t>=a.length)return t;let n=a.lineAt(t),o;for(;t<n.to&&(o=n.text.charCodeAt(t-n.from))>=56320&&o<57344;)t++;return t}function Fh(a){let t=js("input",{class:"cm-textfield",name:"line"}),n=js("form",{class:"cm-gotoLine",onkeydown:u=>{u.keyCode==27?(u.preventDefault(),a.dispatch({effects:Xd.of(!1)}),a.focus()):u.keyCode==13&&(u.preventDefault(),o())},onsubmit:u=>{u.preventDefault(),o()}},js("label",a.state.phrase("Go to line"),": ",t)," ",js("button",{class:"cm-button",type:"submit"},a.state.phrase("go")));function o(){let u=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!u)return;let{state:p}=a,v=p.doc.lineAt(p.selection.main.head),[,S,A,H,X]=u,Me=H?+H.slice(1):0,gt=A?+A:v.number;if(A&&X){let un=gt/100;S&&(un=un*(S=="-"?-1:1)+v.number/p.doc.lines),gt=Math.round(p.doc.lines*un)}else A&&S&&(gt=gt*(S=="-"?-1:1)+v.number);let It=p.doc.line(Math.max(1,Math.min(p.doc.lines,gt)));a.dispatch({effects:Xd.of(!1),selection:ue.cursor(It.from+Math.max(0,Math.min(Me,It.length))),scrollIntoView:!0}),a.focus()}return{dom:n}}const Xd=Et.define(),um=Ut.define({create(){return!0},update(a,t){for(let n of t.effects)n.is(Xd)&&(a=n.value);return a},provide:a=>pi.from(a,t=>t?Fh:null)}),Xg=a=>{let t=gl(a,Fh);if(!t){let n=[Xd.of(!0)];a.state.field(um,!1)==null&&n.push(Et.appendConfig.of([um,qg])),a.dispatch({effects:n}),t=gl(a,Fh)}return t&&t.dom.querySelector("input").focus(),!0},qg=Di.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),ev={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},cm=ft.define({combine(a){return Vi(a,ev,{highlightWordAroundCursor:(t,n)=>t||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function tv(a){let t=[sv,ov];return a&&t.push(cm.of(a)),t}const nv=Lr.mark({class:"cm-selectionMatch"}),rv=Lr.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function fm(a,t,n,o){return(n==0||a(t.sliceDoc(n-1,n))!=qr.Word)&&(o==t.doc.length||a(t.sliceDoc(o,o+1))!=qr.Word)}function iv(a,t,n,o){return a(t.sliceDoc(n,n+1))==qr.Word&&a(t.sliceDoc(o-1,o))==qr.Word}const ov=Wo.fromClass(class{constructor(a){this.decorations=this.getDeco(a)}update(a){(a.selectionSet||a.docChanged||a.viewportChanged)&&(this.decorations=this.getDeco(a.view))}getDeco(a){let t=a.state.facet(cm),{state:n}=a,o=n.selection;if(o.ranges.length>1)return Lr.none;let u=o.main,p,v=null;if(u.empty){if(!t.highlightWordAroundCursor)return Lr.none;let A=n.wordAt(u.head);if(!A)return Lr.none;v=n.charCategorizer(u.head),p=n.sliceDoc(A.from,A.to)}else{let A=u.to-u.from;if(A<t.minSelectionLength||A>200)return Lr.none;if(t.wholeWords){if(p=n.sliceDoc(u.from,u.to),v=n.charCategorizer(u.head),!(fm(v,n,u.from,u.to)&&iv(v,n,u.from,u.to)))return Lr.none}else if(p=n.sliceDoc(u.from,u.to).trim(),!p)return Lr.none}let S=[];for(let A of a.visibleRanges){let H=new vd(n.doc,p,A.from,A.to);for(;!H.next().done;){let{from:X,to:Me}=H.value;if((!v||fm(v,n,X,Me))&&(u.empty&&X<=u.from&&Me>=u.to?S.push(rv.range(X,Me)):(X>=u.to||Me<=u.from)&&S.push(nv.range(X,Me)),S.length>t.maxMatches))return Lr.none}}return Lr.set(S)}},{decorations:a=>a.decorations}),sv=Di.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),av=({state:a,dispatch:t})=>{let{selection:n}=a,o=ue.create(n.ranges.map(u=>a.wordAt(u.head)||ue.cursor(u.head)),n.mainIndex);return o.eq(n)?!1:(t(a.update({selection:o})),!0)};function lv(a,t){let{main:n,ranges:o}=a.selection,u=a.wordAt(n.head),p=u&&u.from==n.from&&u.to==n.to;for(let v=!1,S=new vd(a.doc,t,o[o.length-1].to);;)if(S.next(),S.done){if(v)return null;S=new vd(a.doc,t,0,Math.max(0,o[o.length-1].from-1)),v=!0}else{if(v&&o.some(A=>A.from==S.value.from))continue;if(p){let A=a.wordAt(S.value.from);if(!A||A.from!=S.value.from||A.to!=S.value.to)continue}return S.value}}const uv=({state:a,dispatch:t})=>{let{ranges:n}=a.selection;if(n.some(p=>p.from===p.to))return av({state:a,dispatch:t});let o=a.sliceDoc(n[0].from,n[0].to);if(a.selection.ranges.some(p=>a.sliceDoc(p.from,p.to)!=o))return!1;let u=lv(a,o);return u?(t(a.update({selection:a.selection.addRange(ue.range(u.from,u.to),!1),effects:Di.scrollIntoView(u.to)})),!0):!1},qd=ft.define({combine(a){return Vi(a,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:t=>new xv(t)})}});function E1(a){return a?[qd.of(a),Wh]:Wh}class dm{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||Jg(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,(n,o)=>o=="n"?`
2199
- `:o=="r"?"\r":o=="t"?" ":"\\")}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new hv(this):new fv(this)}getCursor(t,n=0,o){let u=t.doc?t:ui.create({doc:t});return o==null&&(o=u.doc.length),this.regexp?bd(this,u,n,o):Ed(this,u,n,o)}}class hm{constructor(t){this.spec=t}}function Ed(a,t,n,o){return new vd(t.doc,a.unquoted,n,o,a.caseSensitive?void 0:u=>u.toLowerCase(),a.wholeWord?cv(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}function cv(a,t){return(n,o,u,p)=>((p>n||p+u.length<o)&&(p=Math.max(0,n-2),u=a.sliceString(p,Math.min(a.length,o+2))),(t(eh(u,n-p))!=qr.Word||t(th(u,n-p))!=qr.Word)&&(t(th(u,o-p))!=qr.Word||t(eh(u,o-p))!=qr.Word))}class fv extends hm{constructor(t){super(t)}nextMatch(t,n,o){let u=Ed(this.spec,t,o,t.doc.length).nextOverlapping();return u.done&&(u=Ed(this.spec,t,0,n).nextOverlapping()),u.done?null:u.value}prevMatchInRange(t,n,o){for(let u=o;;){let p=Math.max(n,u-1e4-this.spec.unquoted.length),v=Ed(this.spec,t,p,u),S=null;for(;!v.nextOverlapping().done;)S=v.value;if(S)return S;if(p==n)return null;u-=1e4}}prevMatch(t,n,o){return this.prevMatchInRange(t,0,n)||this.prevMatchInRange(t,o,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace)}matchAll(t,n){let o=Ed(this.spec,t,0,t.doc.length),u=[];for(;!o.next().done;){if(u.length>=n)return null;u.push(o.value)}return u}highlight(t,n,o,u){let p=Ed(this.spec,t,Math.max(0,n-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,t.doc.length));for(;!p.next().done;)u(p.value.from,p.value.to)}}function bd(a,t,n,o){return new am(t.doc,a.search,{ignoreCase:!a.caseSensitive,test:a.wholeWord?dv(t.charCategorizer(t.selection.main.head)):void 0},n,o)}function eh(a,t){return a.slice(ne(a,t,!1),t)}function th(a,t){return a.slice(t,ne(a,t))}function dv(a){return(t,n,o)=>!o[0].length||(a(eh(o.input,o.index))!=qr.Word||a(th(o.input,o.index))!=qr.Word)&&(a(th(o.input,o.index+o[0].length))!=qr.Word||a(eh(o.input,o.index+o[0].length))!=qr.Word)}class hv extends hm{nextMatch(t,n,o){let u=bd(this.spec,t,o,t.doc.length).next();return u.done&&(u=bd(this.spec,t,0,n).next()),u.done?null:u.value}prevMatchInRange(t,n,o){for(let u=1;;u++){let p=Math.max(n,o-u*1e4),v=bd(this.spec,t,p,o),S=null;for(;!v.next().done;)S=v.value;if(S&&(p==n||S.from>p+10))return S;if(p==n)return null}}prevMatch(t,n,o){return this.prevMatchInRange(t,0,n)||this.prevMatchInRange(t,o,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(n,o)=>o=="$"?"$":o=="&"?t.match[0]:o!="0"&&+o<t.match.length?t.match[o]:n))}matchAll(t,n){let o=bd(this.spec,t,0,t.doc.length),u=[];for(;!o.next().done;){if(u.length>=n)return null;u.push(o.value)}return u}highlight(t,n,o,u){let p=bd(this.spec,t,Math.max(0,n-250),Math.min(o+250,t.doc.length));for(;!p.next().done;)u(p.value.from,p.value.to)}}const Id=Et.define(),Bh=Et.define(),rf=Ut.define({create(a){return new kh(ih(a).create(),null)},update(a,t){for(let n of t.effects)n.is(Id)?a=new kh(n.value.create(),a.panel):n.is(Bh)&&(a=new kh(a.query,n.value?jh:null));return a},provide:a=>pi.from(a,t=>t.panel)});function b1(a){let t=a.field(rf,!1);return t?t.query.spec:ih(a)}function x1(a){var t;return((t=a.field(rf,!1))===null||t===void 0?void 0:t.panel)!=null}class kh{constructor(t,n){this.query=t,this.panel=n}}const pv=Lr.mark({class:"cm-searchMatch"}),mv=Lr.mark({class:"cm-searchMatch cm-searchMatch-selected"}),gv=Wo.fromClass(class{constructor(a){this.view=a,this.decorations=this.highlight(a.state.field(rf))}update(a){let t=a.state.field(rf);(t!=a.startState.field(rf)||a.docChanged||a.selectionSet||a.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:a,panel:t}){if(!t||!a.spec.valid)return Lr.none;let{view:n}=this,o=new Uo;for(let u=0,p=n.visibleRanges,v=p.length;u<v;u++){let{from:S,to:A}=p[u];for(;u<v-1&&A>p[u+1].from-2*250;)A=p[++u].to;a.highlight(n.state,S,A,(H,X)=>{let Me=n.state.selection.ranges.some(gt=>gt.from==H&&gt.to==X);o.add(H,X,Me?mv:pv)})}return o.finish()}},{decorations:a=>a.decorations});function _d(a){return t=>{let n=t.state.field(rf,!1);return n&&n.query.spec.valid?a(t,n):mm(t)}}const nh=_d((a,{query:t})=>{let{to:n}=a.state.selection.main,o=t.nextMatch(a.state,n,n);return o?(a.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0,effects:Uh(a,o),userEvent:"select.search"}),!0):!1}),rh=_d((a,{query:t})=>{let{state:n}=a,{from:o}=n.selection.main,u=t.prevMatch(n,o,o);return u?(a.dispatch({selection:{anchor:u.from,head:u.to},scrollIntoView:!0,effects:Uh(a,u),userEvent:"select.search"}),!0):!1}),vv=_d((a,{query:t})=>{let n=t.matchAll(a.state,1e3);return!n||!n.length?!1:(a.dispatch({selection:ue.create(n.map(o=>ue.range(o.from,o.to))),userEvent:"select.search.matches"}),!0)}),yv=({state:a,dispatch:t})=>{let n=a.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:o,to:u}=n.main,p=[],v=0;for(let S=new vd(a.doc,a.sliceDoc(o,u));!S.next().done;){if(p.length>1e3)return!1;S.value.from==o&&(v=p.length),p.push(ue.range(S.value.from,S.value.to))}return t(a.update({selection:ue.create(p,v),userEvent:"select.search.matches"})),!0},pm=_d((a,{query:t})=>{let{state:n}=a,{from:o,to:u}=n.selection.main;if(n.readOnly)return!1;let p=t.nextMatch(n,o,o);if(!p)return!1;let v=[],S,A,H=[];if(p.from==o&&p.to==u&&(A=n.toText(t.getReplacement(p)),v.push({from:p.from,to:p.to,insert:A}),p=t.nextMatch(n,p.from,p.to),H.push(Di.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(o).number)+"."))),p){let X=v.length==0||v[0].from>=p.to?0:p.to-p.from-A.length;S={anchor:p.from-X,head:p.to-X},H.push(Uh(a,p))}return a.dispatch({changes:v,selection:S,scrollIntoView:!!S,effects:H,userEvent:"input.replace"}),!0}),Ev=_d((a,{query:t})=>{if(a.state.readOnly)return!1;let n=t.matchAll(a.state,1e9).map(u=>{let{from:p,to:v}=u;return{from:p,to:v,insert:t.getReplacement(u)}});if(!n.length)return!1;let o=a.state.phrase("replaced $ matches",n.length)+".";return a.dispatch({changes:n,effects:Di.announce.of(o),userEvent:"input.replace.all"}),!0});function jh(a){return a.state.facet(qd).createPanel(a)}function ih(a,t){var n,o,u,p;let v=a.selection.main,S=v.empty||v.to>v.from+100?"":a.sliceDoc(v.from,v.to);if(t&&!S)return t;let A=a.facet(qd);return new dm({search:((n=t?.literal)!==null&&n!==void 0?n:A.literal)?S:S.replace(/\n/g,"\\n"),caseSensitive:(o=t?.caseSensitive)!==null&&o!==void 0?o:A.caseSensitive,literal:(u=t?.literal)!==null&&u!==void 0?u:A.literal,wholeWord:(p=t?.wholeWord)!==null&&p!==void 0?p:A.wholeWord})}const mm=a=>{let t=a.state.field(rf,!1);if(t&&t.panel){let n=gl(a,jh);if(!n)return!1;let o=n.dom.querySelector("[main-field]");if(o&&o!=a.root.activeElement){let u=ih(a.state,t.query.spec);u.valid&&a.dispatch({effects:Id.of(u)}),o.focus(),o.select()}}else a.dispatch({effects:[Bh.of(!0),t?Id.of(ih(a.state,t.query.spec)):Et.appendConfig.of(Wh)]});return!0},gm=a=>{let t=a.state.field(rf,!1);if(!t||!t.panel)return!1;let n=gl(a,jh);return n&&n.dom.contains(a.root.activeElement)&&a.focus(),a.dispatch({effects:Bh.of(!1)}),!0},bv=[{key:"Mod-f",run:mm,scope:"editor search-panel"},{key:"F3",run:nh,shift:rh,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:nh,shift:rh,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:gm,scope:"editor search-panel"},{key:"Mod-Shift-l",run:yv},{key:"Alt-g",run:Xg},{key:"Mod-d",run:uv,preventDefault:!0}];class xv{constructor(t){this.view=t;let n=this.query=t.state.field(rf).query.spec;this.commit=this.commit.bind(this),this.searchField=js("input",{value:n.search,placeholder:Ou(t,"Find"),"aria-label":Ou(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=js("input",{value:n.replace,placeholder:Ou(t,"Replace"),"aria-label":Ou(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=js("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=js("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=js("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function o(u,p,v){return js("button",{class:"cm-button",name:u,onclick:p,type:"button"},v)}this.dom=js("div",{onkeydown:u=>this.keydown(u),class:"cm-search"},[this.searchField,o("next",()=>nh(t),[Ou(t,"next")]),o("prev",()=>rh(t),[Ou(t,"previous")]),o("select",()=>vv(t),[Ou(t,"all")]),js("label",null,[this.caseField,Ou(t,"match case")]),js("label",null,[this.reField,Ou(t,"regexp")]),js("label",null,[this.wordField,Ou(t,"by word")]),...t.state.readOnly?[]:[js("br"),this.replaceField,o("replace",()=>pm(t),[Ou(t,"replace")]),o("replaceAll",()=>Ev(t),[Ou(t,"replace all")])],js("button",{name:"close",onclick:()=>gm(t),"aria-label":Ou(t,"close"),type:"button"},["\xD7"])])}commit(){let t=new dm({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:Id.of(t)}))}keydown(t){Cf(this.view,t,"search-panel")?t.preventDefault():t.keyCode==13&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?rh:nh)(this.view)):t.keyCode==13&&t.target==this.replaceField&&(t.preventDefault(),pm(this.view))}update(t){for(let n of t.transactions)for(let o of n.effects)o.is(Id)&&!o.value.eq(this.query)&&this.setQuery(o.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(qd).top}}function Ou(a,t){return a.state.phrase(t)}const oh=30,sh=/[\s\.,:;?!]/;function Uh(a,{from:t,to:n}){let o=a.state.doc.lineAt(t),u=a.state.doc.lineAt(n).to,p=Math.max(o.from,t-oh),v=Math.min(u,n+oh),S=a.state.sliceDoc(p,v);if(p!=o.from){for(let A=0;A<oh;A++)if(!sh.test(S[A+1])&&sh.test(S[A])){S=S.slice(A);break}}if(v!=u){for(let A=S.length-1;A>S.length-oh;A--)if(!sh.test(S[A-1])&&sh.test(S[A])){S=S.slice(0,A);break}}return Di.announce.of(`${a.state.phrase("current match")}. ${S} ${a.state.phrase("on line")} ${o.number}.`)}const Cv=Di.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Wh=[rf,xn.lowest(gv),Cv];class vm{constructor(t,n,o){this.state=t,this.pos=n,this.explicit=o,this.abortListeners=[]}tokenBefore(t){let n=Z(this.state).resolveInner(this.pos,-1);for(;n&&t.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(t){let n=this.state.doc.lineAt(this.pos),o=Math.max(n.from,this.pos-250),u=n.text.slice(o-n.from,this.pos-n.from),p=u.search(bm(t,!1));return p<0?null:{from:o+p,to:this.pos,text:u.slice(p)}}get aborted(){return this.abortListeners==null}addEventListener(t,n){t=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function ym(a){let t=Object.keys(a).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function Mv(a){let t=Object.create(null),n=Object.create(null);for(let{label:u}of a){t[u[0]]=!0;for(let p=1;p<u.length;p++)n[u[p]]=!0}let o=ym(t)+ym(n)+"*$";return[new RegExp("^"+o),new RegExp(o)]}function Sv(a){let t=a.map(u=>typeof u=="string"?{label:u}:u),[n,o]=t.every(u=>/^\w+$/.test(u.label))?[/\w*$/,/\w+$/]:Mv(t);return u=>{let p=u.matchBefore(o);return p||u.explicit?{from:p?p.from:u.pos,options:t,validFor:n}:null}}function C1(a,t){return n=>{for(let o=syntaxTree(n.state).resolveInner(n.pos,-1);o;o=o.parent)if(a.indexOf(o.name)>-1)return t(n);return null}}function M1(a,t){return n=>{for(let o=syntaxTree(n.state).resolveInner(n.pos,-1);o;o=o.parent)if(a.indexOf(o.name)>-1)return null;return t(n)}}class Em{constructor(t,n,o){this.completion=t,this.source=n,this.match=o}}function Yf(a){return a.selection.main.head}function bm(a,t){var n;let{source:o}=a,u=t&&o[0]!="^",p=o[o.length-1]!="$";return!u&&!p?a:new RegExp(`${u?"^":""}(?:${o})${p?"$":""}`,(n=a.flags)!==null&&n!==void 0?n:a.ignoreCase?"i":"")}const Ov=Xe.define();function Tv(a,t,n,o){return Object.assign(Object.assign({},a.changeByRange(u=>{if(u==a.selection.main)return{changes:{from:n,to:o,insert:t},range:ue.cursor(n+t.length)};let p=o-n;return!u.empty||p&&a.sliceDoc(u.from-p,u.from)!=a.sliceDoc(n,o)?{range:u}:{changes:{from:u.from-p,to:u.from,insert:t},range:ue.cursor(u.from-p+t.length)}})),{userEvent:"input.complete"})}function xm(a,t){const n=t.completion.apply||t.completion.label;let o=t.source;typeof n=="string"?a.dispatch(Object.assign(Object.assign({},Tv(a.state,n,o.from,o.to)),{annotations:Ov.of(t.completion)})):n(a,t.completion,o.from,o.to)}const Cm=new WeakMap;function wv(a){if(!Array.isArray(a))return a;let t=Cm.get(a);return t||Cm.set(a,t=Sv(a)),t}class Dv{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let n=0;n<t.length;){let o=Rt(t,n),u=qt(o);this.chars.push(o);let p=t.slice(n,n+u),v=p.toUpperCase();this.folded.push(Rt(v==p?p.toLowerCase():v,0)),n+=u}this.astral=t.length!=this.chars.length}match(t){if(this.pattern.length==0)return[0];if(t.length<this.pattern.length)return null;let{chars:n,folded:o,any:u,precise:p,byWord:v}=this;if(n.length==1){let Si=Rt(t,0);return Si==n[0]?[0,0,qt(Si)]:Si==o[0]?[-200,0,qt(Si)]:null}let S=t.indexOf(this.pattern);if(S==0)return[0,0,this.pattern.length];let A=n.length,H=0;if(S<0){for(let Si=0,ki=Math.min(t.length,200);Si<ki&&H<A;){let mi=Rt(t,Si);(mi==n[H]||mi==o[H])&&(u[H++]=Si),Si+=qt(mi)}if(H<A)return null}let X=0,Me=0,gt=!1,It=0,un=-1,or=-1,ar=/[a-z]/.test(t),wr=!0;for(let Si=0,ki=Math.min(t.length,200),mi=0;Si<ki&&Me<A;){let Ci=Rt(t,Si);S<0&&(X<A&&Ci==n[X]&&(p[X++]=Si),It<A&&(Ci==n[It]||Ci==o[It]?(It==0&&(un=Si),or=Si+1,It++):It=0));let Pi,Fi=Ci<255?Ci>=48&&Ci<=57||Ci>=97&&Ci<=122?2:Ci>=65&&Ci<=90?1:0:(Pi=fn(Ci))!=Pi.toLowerCase()?1:Pi!=Pi.toUpperCase()?2:0;(!Si||Fi==1&&ar||mi==0&&Fi!=0)&&(n[Me]==Ci||o[Me]==Ci&&(gt=!0)?v[Me++]=Si:v.length&&(wr=!1)),mi=Fi,Si+=qt(Ci)}return Me==A&&v[0]==0&&wr?this.result(-100+(gt?-200:0),v,t):It==A&&un==0?[-200-t.length,0,or]:S>-1?[-700-t.length,S,S+this.pattern.length]:It==A?[-200+-700-t.length,un,or]:Me==A?this.result(-100+(gt?-200:0)+-700+(wr?0:-1100),v,t):n.length==2?null:this.result((u[0]?-700:0)+-200+-1100,u,t)}result(t,n,o){let u=[t-o.length],p=1;for(let v of n){let S=v+(this.astral?qt(Rt(o,v)):1);p>1&&u[p-1]==v?u[p-1]=S:(u[p++]=v,u[p++]=S)}return u}}const Ju=ft.define({combine(a){return Vi(a,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:(t,n)=>t.label.localeCompare(n.label),interactionDelay:75},{defaultKeymap:(t,n)=>t&&n,closeOnBlur:(t,n)=>t&&n,icons:(t,n)=>t&&n,tooltipClass:(t,n)=>o=>Mm(t(o),n(o)),optionClass:(t,n)=>o=>Mm(t(o),n(o)),addToOptions:(t,n)=>t.concat(n)})}});function Mm(a,t){return a?t?a+" "+t:a:t}function Pv(a){let t=a.addToOptions.slice();return a.icons&&t.push({render(n){let o=document.createElement("div");return o.classList.add("cm-completionIcon"),n.type&&o.classList.add(...n.type.split(/\s+/g).map(u=>"cm-completionIcon-"+u)),o.setAttribute("aria-hidden","true"),o},position:20}),t.push({render(n,o,u){let p=document.createElement("span");p.className="cm-completionLabel";let{label:v}=n,S=0;for(let A=1;A<u.length;){let H=u[A++],X=u[A++];H>S&&p.appendChild(document.createTextNode(v.slice(S,H)));let Me=p.appendChild(document.createElement("span"));Me.appendChild(document.createTextNode(v.slice(H,X))),Me.className="cm-completionMatchedText",S=X}return S<v.length&&p.appendChild(document.createTextNode(v.slice(S))),p},position:50},{render(n){if(!n.detail)return null;let o=document.createElement("span");return o.className="cm-completionDetail",o.textContent=n.detail,o},position:80}),t.sort((n,o)=>n.position-o.position).map(n=>n.render)}function Sm(a,t,n){if(a<=n)return{from:0,to:a};if(t<0&&(t=0),t<=a>>1){let u=Math.floor(t/n);return{from:u*n,to:(u+1)*n}}let o=Math.floor((a-t)/n);return{from:a-(o+1)*n,to:a-o*n}}class Av{constructor(t,n){this.view=t,this.stateField=n,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:S=>this.positionInfo(S),key:this},this.space=null,this.currentClass="";let o=t.state.field(n),{options:u,selected:p}=o.open,v=t.state.facet(Ju);this.optionContent=Pv(v),this.optionClass=v.optionClass,this.tooltipClass=v.tooltipClass,this.range=Sm(u.length,p,v.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",S=>{for(let A=S.target,H;A&&A!=this.dom;A=A.parentNode)if(A.nodeName=="LI"&&(H=/-(\d+)$/.exec(A.id))&&+H[1]<u.length){xm(t,u[+H[1]]),S.preventDefault();return}}),this.list=this.dom.appendChild(this.createListBox(u,o.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})}mount(){this.updateSel()}update(t){var n,o,u;let p=t.state.field(this.stateField),v=t.startState.field(this.stateField);this.updateTooltipClass(t.state),p!=v&&(this.updateSel(),((n=p.open)===null||n===void 0?void 0:n.disabled)!=((o=v.open)===null||o===void 0?void 0:o.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((u=p.open)===null||u===void 0)&&u.disabled)))}updateTooltipClass(t){let n=this.tooltipClass(t);if(n!=this.currentClass){for(let o of this.currentClass.split(" "))o&&this.dom.classList.remove(o);for(let o of n.split(" "))o&&this.dom.classList.add(o);this.currentClass=n}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let t=this.view.state.field(this.stateField),n=t.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=Sm(n.options.length,n.selected,this.view.state.facet(Ju).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(n.options,t.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})),this.updateSelectedOption(n.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:o}=n.options[n.selected],{info:u}=o;if(!u)return;let p=typeof u=="string"?document.createTextNode(u):u(o);if(!p)return;"then"in p?p.then(v=>{v&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(v)}).catch(v=>Ls(this.view.state,v,"completion info")):this.addInfoPane(p)}}addInfoPane(t){let n=this.info=document.createElement("div");n.className="cm-tooltip cm-completionInfo",n.appendChild(t),this.dom.appendChild(n),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(t){let n=null;for(let o=this.list.firstChild,u=this.range.from;o;o=o.nextSibling,u++)u==t?o.hasAttribute("aria-selected")||(o.setAttribute("aria-selected","true"),n=o):o.hasAttribute("aria-selected")&&o.removeAttribute("aria-selected");return n&&Iv(this.list,n),n}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let n=this.dom.getBoundingClientRect(),o=this.info.getBoundingClientRect(),u=t.getBoundingClientRect(),p=this.space;if(!p){let un=this.dom.ownerDocument.defaultView||window;p={left:0,top:0,right:un.innerWidth,bottom:un.innerHeight}}if(u.top>Math.min(p.bottom,n.bottom)-10||u.bottom<Math.max(p.top,n.top)+10)return null;let v=this.view.textDirection==ts.RTL,S=v,A=!1,H,X="",Me="",gt=n.left-p.left,It=p.right-n.right;if(S&&gt<Math.min(o.width,It)?S=!1:!S&&It<Math.min(o.width,gt)&&(S=!0),o.width<=(S?gt:It))X=Math.max(p.top,Math.min(u.top,p.bottom-o.height))-n.top+"px",H=Math.min(400,S?gt:It)+"px";else{A=!0,H=Math.min(400,(v?n.right:p.right-n.left)-30)+"px";let un=p.bottom-n.bottom;un>=o.height||un>n.top?X=u.bottom-n.top+"px":Me=n.bottom-u.top+"px"}return{top:X,bottom:Me,maxWidth:H,class:A?v?"left-narrow":"right-narrow":S?"left":"right"}}positionInfo(t){this.info&&(t?(this.info.style.top=t.top,this.info.style.bottom=t.bottom,this.info.style.maxWidth=t.maxWidth,this.info.className="cm-tooltip cm-completionInfo cm-completionInfo-"+t.class):this.info.style.top="-1e6px")}createListBox(t,n,o){const u=document.createElement("ul");u.id=n,u.setAttribute("role","listbox"),u.setAttribute("aria-expanded","true"),u.setAttribute("aria-label",this.view.state.phrase("Completions"));for(let p=o.from;p<o.to;p++){let{completion:v,match:S}=t[p];const A=u.appendChild(document.createElement("li"));A.id=n+"-"+p,A.setAttribute("role","option");let H=this.optionClass(v);H&&(A.className=H);for(let X of this.optionContent){let Me=X(v,this.view.state,S);Me&&A.appendChild(Me)}}return o.from&&u.classList.add("cm-completionListIncompleteTop"),o.to<t.length&&u.classList.add("cm-completionListIncompleteBottom"),u}}function Rv(a){return t=>new Av(t,a)}function Iv(a,t){let n=a.getBoundingClientRect(),o=t.getBoundingClientRect();o.top<n.top?a.scrollTop-=n.top-o.top:o.bottom>n.bottom&&(a.scrollTop+=o.bottom-n.bottom)}function Om(a){return(a.boost||0)*100+(a.apply?10:0)+(a.info?5:0)+(a.type?1:0)}function _v(a,t){let n=[],o=0;for(let S of a)if(S.hasResult())if(S.result.filter===!1){let A=S.result.getMatch;for(let H of S.result.options){let X=[1e9-o++];if(A)for(let Me of A(H))X.push(Me);n.push(new Em(H,S,X))}}else{let A=new Dv(t.sliceDoc(S.from,S.to)),H;for(let X of S.result.options)(H=A.match(X.label))&&(X.boost!=null&&(H[0]+=X.boost),n.push(new Em(X,S,H)))}let u=[],p=null,v=t.facet(Ju).compareCompletions;for(let S of n.sort((A,H)=>H.match[0]-A.match[0]||v(A.completion,H.completion)))!p||p.label!=S.completion.label||p.detail!=S.completion.detail||p.type!=null&&S.completion.type!=null&&p.type!=S.completion.type||p.apply!=S.completion.apply?u.push(S):Om(S.completion)>Om(p)&&(u[u.length-1]=S),p=S.completion;return u}class xd{constructor(t,n,o,u,p,v){this.options=t,this.attrs=n,this.tooltip=o,this.timestamp=u,this.selected=p,this.disabled=v}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new xd(this.options,Tm(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,o,u,p){let v=_v(t,n);if(!v.length)return u&&t.some(A=>A.state==1)?new xd(u.options,u.attrs,u.tooltip,u.timestamp,u.selected,!0):null;let S=n.facet(Ju).selectOnOpen?0:-1;if(u&&u.selected!=S&&u.selected!=-1){let A=u.options[u.selected].completion;for(let H=0;H<v.length;H++)if(v[H].completion==A){S=H;break}}return new xd(v,Tm(o,S),{pos:t.reduce((A,H)=>H.hasResult()?Math.min(A,H.from):A,1e8),create:Rv(Nl),above:p.aboveCursor},u?u.timestamp:Date.now(),S,!1)}map(t){return new xd(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class ah{constructor(t,n,o){this.active=t,this.id=n,this.open=o}static start(){return new ah(Nv,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,o=n.facet(Ju),p=(o.override||n.languageDataAt("autocomplete",Yf(n)).map(wv)).map(S=>(this.active.find(H=>H.source==S)||new iu(S,this.active.some(H=>H.state!=0)?1:0)).update(t,o));p.length==this.active.length&&p.every((S,A)=>S==this.active[A])&&(p=this.active);let v=this.open;v&&t.docChanged&&(v=v.map(t.changes)),t.selection||p.some(S=>S.hasResult()&&t.changes.touchesRange(S.from,S.to))||!Lv(p,this.active)?v=xd.build(p,n,this.id,v,o):v&&v.disabled&&!p.some(S=>S.state==1)&&(v=null),!v&&p.every(S=>S.state!=1)&&p.some(S=>S.hasResult())&&(p=p.map(S=>S.hasResult()?new iu(S.source,0):S));for(let S of t.effects)S.is(Hh)&&(v=v&&v.setSelected(S.value,this.id));return p==this.active&&v==this.open?this:new ah(p,this.id,v)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:$v}}function Lv(a,t){if(a==t)return!0;for(let n=0,o=0;;){for(;n<a.length&&!a[n].hasResult;)n++;for(;o<t.length&&!t[o].hasResult;)o++;let u=n==a.length,p=o==t.length;if(u||p)return u==p;if(a[n++].result!=t[o++].result)return!1}}const $v={"aria-autocomplete":"list"};function Tm(a,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":a};return t>-1&&(n["aria-activedescendant"]=a+"-"+t),n}const Nv=[];function zh(a){return a.isUserEvent("input.type")?"input":a.isUserEvent("delete.backward")?"delete":null}class iu{constructor(t,n,o=-1){this.source=t,this.state=n,this.explicitPos=o}hasResult(){return!1}update(t,n){let o=zh(t),u=this;o?u=u.handleUserEvent(t,o,n):t.docChanged?u=u.handleChange(t):t.selection&&u.state!=0&&(u=new iu(u.source,0));for(let p of t.effects)if(p.is(Vh))u=new iu(u.source,1,p.value?Yf(t.state):-1);else if(p.is(lh))u=new iu(u.source,0);else if(p.is(wm))for(let v of p.value)v.source==u.source&&(u=v);return u}handleUserEvent(t,n,o){return n=="delete"||!o.activateOnTyping?this.map(t.changes):new iu(this.source,1)}handleChange(t){return t.changes.touchesRange(Yf(t.startState))?new iu(this.source,0):this.map(t.changes)}map(t){return t.empty||this.explicitPos<0?this:new iu(this.source,this.state,t.mapPos(this.explicitPos))}}class Ld extends iu{constructor(t,n,o,u,p){super(t,2,n),this.result=o,this.from=u,this.to=p}hasResult(){return!0}handleUserEvent(t,n,o){var u;let p=t.changes.mapPos(this.from),v=t.changes.mapPos(this.to,1),S=Yf(t.state);if((this.explicitPos<0?S<=p:S<this.from)||S>v||n=="delete"&&Yf(t.startState)==this.from)return new iu(this.source,n=="input"&&o.activateOnTyping?1:0);let A=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos),H;return Fv(this.result.validFor,t.state,p,v)?new Ld(this.source,A,this.result,p,v):this.result.update&&(H=this.result.update(this.result,p,v,new vm(t.state,S,A>=0)))?new Ld(this.source,A,H,H.from,(u=H.to)!==null&&u!==void 0?u:Yf(t.state)):new iu(this.source,1,A)}handleChange(t){return t.changes.touchesRange(this.from,this.to)?new iu(this.source,0):this.map(t.changes)}map(t){return t.empty?this:new Ld(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1))}}function Fv(a,t,n,o){if(!a)return!1;let u=t.sliceDoc(n,o);return typeof a=="function"?a(u,n,o,t):bm(a,!0).test(u)}const Vh=Et.define(),lh=Et.define(),wm=Et.define({map(a,t){return a.map(n=>n.map(t))}}),Hh=Et.define(),Nl=Ut.define({create(){return ah.start()},update(a,t){return a.update(t)},provide:a=>[Uu.from(a,t=>t.tooltip),Di.contentAttributes.from(a,t=>t.attrs)]});function uh(a,t="option"){return n=>{let o=n.state.field(Nl,!1);if(!o||!o.open||o.open.disabled||Date.now()-o.open.timestamp<n.state.facet(Ju).interactionDelay)return!1;let u=1,p;t=="page"&&(p=Ga(n,o.open.tooltip))&&(u=Math.max(2,Math.floor(p.dom.offsetHeight/p.dom.querySelector("li").offsetHeight)-1));let{length:v}=o.open.options,S=o.open.selected>-1?o.open.selected+u*(a?1:-1):a?0:v-1;return S<0?S=t=="page"?0:v-1:S>=v&&(S=t=="page"?v-1:0),n.dispatch({effects:Hh.of(S)}),!0}}const Bv=a=>{let t=a.state.field(Nl,!1);return a.state.readOnly||!t||!t.open||t.open.selected<0||Date.now()-t.open.timestamp<a.state.facet(Ju).interactionDelay?!1:(t.open.disabled||xm(a,t.open.options[t.open.selected]),!0)},kv=a=>a.state.field(Nl,!1)?(a.dispatch({effects:Vh.of(!0)}),!0):!1,jv=a=>{let t=a.state.field(Nl,!1);return!t||!t.active.some(n=>n.state!=0)?!1:(a.dispatch({effects:lh.of(null)}),!0)};class Uv{constructor(t,n){this.active=t,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Dm=50,Wv=50,zv=1e3,Vv=Wo.fromClass(class{constructor(a){this.view=a,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let t of a.state.field(Nl).active)t.state==1&&this.startQuery(t)}update(a){let t=a.state.field(Nl);if(!a.selectionSet&&!a.docChanged&&a.startState.field(Nl)==t)return;let n=a.transactions.some(o=>(o.selection||o.docChanged)&&!zh(o));for(let o=0;o<this.running.length;o++){let u=this.running[o];if(n||u.updates.length+a.transactions.length>Wv&&Date.now()-u.time>zv){for(let p of u.context.abortListeners)try{p()}catch(v){Ls(this.view.state,v)}u.context.abortListeners=null,this.running.splice(o--,1)}else u.updates.push(...a.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=t.active.some(o=>o.state==1&&!this.running.some(u=>u.active.source==o.source))?setTimeout(()=>this.startUpdate(),Dm):-1,this.composing!=0)for(let o of a.transactions)zh(o)=="input"?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:a}=this.view,t=a.field(Nl);for(let n of t.active)n.state==1&&!this.running.some(o=>o.active.source==n.source)&&this.startQuery(n)}startQuery(a){let{state:t}=this.view,n=Yf(t),o=new vm(t,n,a.explicitPos==n),u=new Uv(a,o);this.running.push(u),Promise.resolve(a.source(o)).then(p=>{u.context.aborted||(u.done=p||null,this.scheduleAccept())},p=>{this.view.dispatch({effects:lh.of(null)}),Ls(this.view.state,p)})}scheduleAccept(){this.running.every(a=>a.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),Dm))}accept(){var a;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(Ju);for(let o=0;o<this.running.length;o++){let u=this.running[o];if(u.done===void 0)continue;if(this.running.splice(o--,1),u.done){let v=new Ld(u.active.source,u.active.explicitPos,u.done,u.done.from,(a=u.done.to)!==null&&a!==void 0?a:Yf(u.updates.length?u.updates[0].startState:this.view.state));for(let S of u.updates)v=v.update(S,n);if(v.hasResult()){t.push(v);continue}}let p=this.view.state.field(Nl).active.find(v=>v.source==u.active.source);if(p&&p.state==1)if(u.done==null){let v=new iu(u.active.source,0);for(let S of u.updates)v=v.update(S,n);v.state!=1&&t.push(v)}else this.startQuery(p)}t.length&&this.view.dispatch({effects:wm.of(t)})}},{eventHandlers:{blur(){let a=this.view.state.field(Nl,!1);a&&a.tooltip&&this.view.state.facet(Ju).closeOnBlur&&this.view.dispatch({effects:lh.of(null)})},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Vh.of(!1)}),20),this.composing=0}}}),Pm=Di.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xB7\xB7\xB7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:`${400}px`,boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`${30}px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`${30}px`},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Hv{constructor(t,n,o,u){this.field=t,this.line=n,this.from=o,this.to=u}}class Zh{constructor(t,n,o){this.field=t,this.from=n,this.to=o}map(t){let n=t.mapPos(this.from,-1,MapMode.TrackDel),o=t.mapPos(this.to,1,MapMode.TrackDel);return n==null||o==null?null:new Zh(this.field,n,o)}}class Kh{constructor(t,n){this.lines=t,this.fieldPositions=n}instantiate(t,n){let o=[],u=[n],p=t.doc.lineAt(n),v=/^\s*/.exec(p.text)[0];for(let A of this.lines){if(o.length){let H=v,X=/^\t*/.exec(A)[0].length;for(let Me=0;Me<X;Me++)H+=t.facet(indentUnit);u.push(n+H.length-X),A=H+A.slice(X)}o.push(A),n+=A.length+1}let S=this.fieldPositions.map(A=>new Zh(A.field,u[A.line]+A.from,u[A.line]+A.to));return{text:o,ranges:S}}static parse(t){let n=[],o=[],u=[],p;for(let v of t.split(/\r\n?|\n/)){for(;p=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(v);){let S=p[1]?+p[1]:null,A=p[2]||p[3]||"",H=-1;for(let X=0;X<n.length;X++)(S!=null?n[X].seq==S:A&&n[X].name==A)&&(H=X);if(H<0){let X=0;for(;X<n.length&&(S==null||n[X].seq!=null&&n[X].seq<S);)X++;n.splice(X,0,{seq:S,name:A}),H=X;for(let Me of u)Me.field>=H&&Me.field++}u.push(new Hv(H,o.length,p.index,p.index+A.length)),v=v.slice(0,p.index)+A+v.slice(p.index+p[0].length)}for(let S;S=/\\([{}])/.exec(v);){v=v.slice(0,S.index)+S[1]+v.slice(S.index+S[0].length);for(let A of u)A.line==o.length&&A.from>S.index&&(A.from--,A.to--)}o.push(v)}return new Kh(o,u)}}let Zv=Lr.widget({widget:new class extends ba{toDOM(){let a=document.createElement("span");return a.className="cm-snippetFieldPosition",a}ignoreEvent(){return!1}}}),Kv=Lr.mark({class:"cm-snippetField"});class Cd{constructor(t,n){this.ranges=t,this.active=n,this.deco=Lr.set(t.map(o=>(o.from==o.to?Zv:Kv).range(o.from,o.to)))}map(t){let n=[];for(let o of this.ranges){let u=o.map(t);if(!u)return null;n.push(u)}return new Cd(n,this.active)}selectionInsideField(t){return t.ranges.every(n=>this.ranges.some(o=>o.field==this.active&&o.from<=n.from&&o.to>=n.to))}}const $d=Et.define({map(a,t){return a&&a.map(t)}}),Gv=Et.define(),Nd=Ut.define({create(){return null},update(a,t){for(let n of t.effects){if(n.is($d))return n.value;if(n.is(Gv)&&a)return new Cd(a.ranges,n.value)}return a&&t.docChanged&&(a=a.map(t.changes)),a&&t.selection&&!a.selectionInsideField(t.selection)&&(a=null),a},provide:a=>Di.decorations.from(a,t=>t?t.deco:Lr.none)});function Gh(a,t){return ue.create(a.filter(n=>n.field==t).map(n=>ue.range(n.from,n.to)))}function Yv(a){let t=Kh.parse(a);return(n,o,u,p)=>{let{text:v,ranges:S}=t.instantiate(n.state,u),A={changes:{from:u,to:p,insert:Text.of(v)},scrollIntoView:!0};if(S.length&&(A.selection=Gh(S,0)),S.length>1){let H=new Cd(S,0),X=A.effects=[$d.of(H)];n.state.field(Nd,!1)===void 0&&X.push(StateEffect.appendConfig.of([Nd,Jv,Xv,Pm]))}n.dispatch(n.state.update(A))}}function Am(a){return({state:t,dispatch:n})=>{let o=t.field(Nd,!1);if(!o||a<0&&o.active==0)return!1;let u=o.active+a,p=a>0&&!o.ranges.some(v=>v.field==u+a);return n(t.update({selection:Gh(o.ranges,u),effects:$d.of(p?null:new Cd(o.ranges,u))})),!0}}const Qv=[{key:"Tab",run:Am(1),shift:Am(-1)},{key:"Escape",run:({state:a,dispatch:t})=>a.field(Nd,!1)?(t(a.update({effects:$d.of(null)})),!0):!1}],Rm=ft.define({combine(a){return a.length?a[0]:Qv}}),Jv=xn.highest(Eu.compute([Rm],a=>a.facet(Rm)));function w1(a,t){return Object.assign(Object.assign({},t),{apply:Yv(a)})}const Xv=Di.domEventHandlers({mousedown(a,t){let n=t.state.field(Nd,!1),o;if(!n||(o=t.posAtCoords({x:a.clientX,y:a.clientY}))==null)return!1;let u=n.ranges.find(p=>p.from<=o&&p.to>=o);return!u||u.field==n.active?!1:(t.dispatch({selection:Gh(n.ranges,u.field),effects:$d.of(n.ranges.some(p=>p.field>u.field)?new Cd(n.ranges,u.field):null)}),!0)}});function qv(a){let t=a.replace(/[\\[.+*?(){|^$]/g,"\\$&");try{return new RegExp(`[\\p{Alphabetic}\\p{Number}_${t}]+`,"ug")}catch{return new RegExp(`[w${t}]`,"g")}}function Im(a,t){return new RegExp(t(a.source),a.unicode?"u":"")}const _m=null;function ey(a){return _m[a]||(_m[a]=new WeakMap)}function Lm(a,t,n,o,u){for(let p=a.iterLines(),v=0;!p.next().done;){let{value:S}=p,A;for(t.lastIndex=0;A=t.exec(S);)if(!o[A[0]]&&v+A.index!=u&&(n.push({type:"text",label:A[0]}),o[A[0]]=!0,n.length>=2e3))return;v+=S.length+1}}function $m(a,t,n,o,u){let p=a.length>=1e3,v=p&&t.get(a);if(v)return v;let S=[],A=Object.create(null);if(a.children){let H=0;for(let X of a.children){if(X.length>=1e3)for(let Me of $m(X,t,n,o-H,u-H))A[Me.label]||(A[Me.label]=!0,S.push(Me));else Lm(X,n,S,A,u-H);H+=X.length+1}}else Lm(a,n,S,A,u);return p&&S.length<2e3&&t.set(a,S),S}const D1=a=>{let t=a.state.languageDataAt("wordChars",a.pos).join(""),n=qv(t),o=a.matchBefore(Im(n,v=>v+"$"));if(!o&&!a.explicit)return null;let u=o?o.from:a.pos,p=$m(a.state.doc,ey(t),n,5e4,u);return{from:u,options:p,validFor:Im(n,v=>"^"+v)}},Fd={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ad=Et.define({map(a,t){let n=t.mapPos(a,-1,Jt.TrackAfter);return n??void 0}}),Yh=Et.define({map(a,t){return t.mapPos(a)}}),Qh=new class extends Bi{};Qh.startSide=1,Qh.endSide=-1;const Nm=Ut.define({create(){return hi.empty},update(a,t){if(t.selection){let n=t.state.doc.lineAt(t.selection.main.head).from,o=t.startState.doc.lineAt(t.startState.selection.main.head).from;n!=t.changes.mapPos(o,-1)&&(a=hi.empty)}a=a.map(t.changes);for(let n of t.effects)n.is(ad)?a=a.update({add:[Qh.range(n.value,n.value+1)]}):n.is(Yh)&&(a=a.update({filter:o=>o!=n.value}));return a}});function ty(){return[ry,Nm]}const Jh="()[]{}<>";function Fm(a){for(let t=0;t<Jh.length;t+=2)if(Jh.charCodeAt(t)==a)return Jh.charAt(t+1);return fn(a<128?a:a+1)}function Bm(a,t){return a.languageDataAt("closeBrackets",t)[0]||Fd}const ny=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),ry=Di.inputHandler.of((a,t,n,o)=>{if((ny?a.composing:a.compositionStarted)||a.state.readOnly)return!1;let u=a.state.selection.main;if(o.length>2||o.length==2&&qt(Rt(o,0))==1||t!=u.from||n!=u.to)return!1;let p=oy(a.state,o);return p?(a.dispatch(p),!0):!1}),iy=[{key:"Backspace",run:({state:a,dispatch:t})=>{if(a.readOnly)return!1;let o=Bm(a,a.selection.main.head).brackets||Fd.brackets,u=null,p=a.changeByRange(v=>{if(v.empty){let S=sy(a.doc,v.head);for(let A of o)if(A==S&&ch(a.doc,v.head)==Fm(Rt(A,0)))return{changes:{from:v.head-A.length,to:v.head+A.length},range:ue.cursor(v.head-A.length)}}return{range:u=v}});return u||t(a.update(p,{scrollIntoView:!0,userEvent:"delete.backward"})),!u}}];function oy(a,t){let n=Bm(a,a.selection.main.head),o=n.brackets||Fd.brackets;for(let u of o){let p=Fm(Rt(u,0));if(t==u)return p==u?uy(a,u,o.indexOf(u+u+u)>-1,n):ay(a,u,p,n.before||Fd.before);if(t==p&&km(a,a.selection.main.from))return ly(a,u,p)}return null}function km(a,t){let n=!1;return a.field(Nm).between(0,a.doc.length,o=>{o==t&&(n=!0)}),n}function ch(a,t){let n=a.sliceString(t,t+2);return n.slice(0,qt(Rt(n,0)))}function sy(a,t){let n=a.sliceString(t-2,t);return qt(Rt(n,0))==n.length?n:n.slice(1)}function ay(a,t,n,o){let u=null,p=a.changeByRange(v=>{if(!v.empty)return{changes:[{insert:t,from:v.from},{insert:n,from:v.to}],effects:ad.of(v.to+t.length),range:ue.range(v.anchor+t.length,v.head+t.length)};let S=ch(a.doc,v.head);return!S||/\s/.test(S)||o.indexOf(S)>-1?{changes:{insert:t+n,from:v.head},effects:ad.of(v.head+t.length),range:ue.cursor(v.head+t.length)}:{range:u=v}});return u?null:a.update(p,{scrollIntoView:!0,userEvent:"input.type"})}function ly(a,t,n){let o=null,u=a.selection.ranges.map(p=>p.empty&&ch(a.doc,p.head)==n?ue.cursor(p.head+n.length):o=p);return o?null:a.update({selection:ue.create(u,a.selection.mainIndex),scrollIntoView:!0,effects:a.selection.ranges.map(({from:p})=>Yh.of(p))})}function uy(a,t,n,o){let u=o.stringPrefixes||Fd.stringPrefixes,p=null,v=a.changeByRange(S=>{if(!S.empty)return{changes:[{insert:t,from:S.from},{insert:t,from:S.to}],effects:ad.of(S.to+t.length),range:ue.range(S.anchor+t.length,S.head+t.length)};let A=S.head,H=ch(a.doc,A),X;if(H==t){if(jm(a,A))return{changes:{insert:t+t,from:A},effects:ad.of(A+t.length),range:ue.cursor(A+t.length)};if(km(a,A)){let Me=n&&a.sliceDoc(A,A+t.length*3)==t+t+t;return{range:ue.cursor(A+t.length*(Me?3:1)),effects:Yh.of(A)}}}else{if(n&&a.sliceDoc(A-2*t.length,A)==t+t&&(X=Um(a,A-2*t.length,u))>-1&&jm(a,X))return{changes:{insert:t+t+t+t,from:A},effects:ad.of(A+t.length),range:ue.cursor(A+t.length)};if(a.charCategorizer(A)(H)!=qr.Word&&Um(a,A,u)>-1&&!cy(a,A,t,u))return{changes:{insert:t+t,from:A},effects:ad.of(A+t.length),range:ue.cursor(A+t.length)}}return{range:p=S}});return p?null:a.update(v,{scrollIntoView:!0,userEvent:"input.type"})}function jm(a,t){let n=Z(a).resolveInner(t+1);return n.parent&&n.from==t}function cy(a,t,n,o){let u=Z(a).resolveInner(t,-1),p=o.reduce((v,S)=>Math.max(v,S.length),0);for(let v=0;v<5;v++){let S=a.sliceDoc(u.from,Math.min(u.to,u.from+n.length+p)),A=S.indexOf(n);if(!A||A>-1&&o.indexOf(S.slice(0,A))>-1){let X=u.firstChild;for(;X&&X.from==u.from&&X.to-X.from>n.length+A;){if(a.sliceDoc(X.to-n.length,X.to)==n)return!1;X=X.firstChild}return!0}let H=u.to==t&&u.parent;if(!H)break;u=H}return!1}function Um(a,t,n){let o=a.charCategorizer(t);if(o(a.sliceDoc(t-1,t))!=qr.Word)return t;for(let u of n){let p=t-u.length;if(a.sliceDoc(p,t)==u&&o(a.sliceDoc(p-1,p))!=qr.Word)return p}return-1}function fy(a={}){return[Nl,Ju.of(a),Vv,dy,Pm]}const Wm=[{key:"Ctrl-Space",run:kv},{key:"Escape",run:jv},{key:"ArrowDown",run:uh(!0)},{key:"ArrowUp",run:uh(!1)},{key:"PageDown",run:uh(!0,"page")},{key:"PageUp",run:uh(!1,"page")},{key:"Enter",run:Bv}],dy=xn.highest(Eu.computeN([Ju],a=>a.facet(Ju).defaultKeymap?[Wm]:[]));function A1(a){let t=a.field(Nl,!1);return t&&t.active.some(n=>n.state==1)?"pending":t&&t.active.some(n=>n.state!=0)?"active":null}const zm=new WeakMap;function R1(a){var t;let n=(t=a.field(Nl,!1))===null||t===void 0?void 0:t.open;if(!n||n.disabled)return[];let o=zm.get(n.options);return o||zm.set(n.options,o=n.options.map(u=>u.completion)),o}function I1(a){var t;let n=(t=a.field(Nl,!1))===null||t===void 0?void 0:t.open;return n&&!n.disabled&&n.selected>=0?n.options[n.selected].completion:null}function _1(a){var t;let n=(t=a.field(Nl,!1))===null||t===void 0?void 0:t.open;return n&&!n.disabled&&n.selected>=0?n.selected:null}function L1(a){return Hh.of(a)}class hy{constructor(t,n,o){this.from=t,this.to=n,this.diagnostic=o}}class ld{constructor(t,n,o){this.diagnostics=t,this.panel=n,this.selected=o}static init(t,n,o){let u=t,p=o.facet(ud).markerFilter;p&&(u=p(u));let v=Lr.set(u.map(S=>S.from==S.to||S.from==S.to-1&&o.doc.lineAt(S.from).to==S.from?Lr.widget({widget:new Ey(S),diagnostic:S}).range(S.from):Lr.mark({attributes:{class:"cm-lintRange cm-lintRange-"+S.severity},diagnostic:S}).range(S.from,S.to)),!0);return new ld(v,n,Md(v))}}function Md(a,t=null,n=0){let o=null;return a.between(n,1e9,(u,p,{spec:v})=>{if(!(t&&v.diagnostic!=t))return o=new hy(u,p,v.diagnostic),!1}),o}function Vm(a,t){return!!(a.effects.some(n=>n.is(fh))||a.changes.touchesRange(t.pos))}function Hm(a,t){return a.field(Kl,!1)?t:t.concat(Et.appendConfig.of([Kl,Di.decorations.compute([Kl],n=>{let{selected:o,panel:u}=n.field(Kl);return!o||!u||o.from==o.to?Lr.none:Lr.set([my.range(o.from,o.to)])}),zs(gy,{hideOn:Vm}),by]))}function py(a,t){return{effects:Hm(a,[fh.of(t)])}}const fh=Et.define(),Xh=Et.define(),Zm=Et.define(),Kl=Ut.define({create(){return new ld(Lr.none,null,null)},update(a,t){if(t.docChanged){let n=a.diagnostics.map(t.changes),o=null;if(a.selected){let u=t.changes.mapPos(a.selected.from,1);o=Md(n,a.selected.diagnostic,u)||Md(n,null,u)}a=new ld(n,a.panel,o)}for(let n of t.effects)n.is(fh)?a=ld.init(n.value,a.panel,t.state):n.is(Xh)?a=new ld(a.diagnostics,n.value?dh.open:null,a.selected):n.is(Zm)&&(a=new ld(a.diagnostics,a.panel,n.value));return a},provide:a=>[pi.from(a,t=>t.panel),Di.decorations.from(a,t=>t.diagnostics)]});function $1(a){let t=a.field(Kl,!1);return t?t.diagnostics.size:0}const my=Lr.mark({class:"cm-lintRange cm-lintRange-active"});function gy(a,t,n){let{diagnostics:o}=a.state.field(Kl),u=[],p=2e8,v=0;o.between(t-(n<0?1:0),t+(n>0?1:0),(A,H,{spec:X})=>{t>=A&&t<=H&&(A==H||(t>A||n>0)&&(t<H||n<0))&&(u.push(X.diagnostic),p=Math.min(A,p),v=Math.max(H,v))});let S=a.state.facet(ud).tooltipFilter;return S&&(u=S(u)),u.length?{pos:p,end:v,above:a.state.doc.lineAt(p).to<v,create(){return{dom:Km(a,u)}}}:null}function Km(a,t){return js("ul",{class:"cm-tooltip-lint"},t.map(n=>Jm(a,n,!1)))}const vy=a=>{let t=a.state.field(Kl,!1);(!t||!t.panel)&&a.dispatch({effects:Hm(a.state,[Xh.of(!0)])});let n=gl(a,dh.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},Gm=a=>{let t=a.state.field(Kl,!1);return!t||!t.panel?!1:(a.dispatch({effects:Xh.of(!1)}),!0)},yy=[{key:"Mod-Shift-m",run:vy,preventDefault:!0},{key:"F8",run:a=>{let t=a.state.field(Kl,!1);if(!t)return!1;let n=a.state.selection.main,o=t.diagnostics.iter(n.to+1);return!o.value&&(o=t.diagnostics.iter(0),!o.value||o.from==n.from&&o.to==n.to)?!1:(a.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0}),!0)}}],Ym=Wo.fromClass(class{constructor(a){this.view=a,this.timeout=-1,this.set=!0;let{delay:t}=a.state.facet(ud);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){let a=Date.now();if(a<this.lintTime-10)setTimeout(this.run,this.lintTime-a);else{this.set=!1;let{state:t}=this.view,{sources:n}=t.facet(ud);Promise.all(n.map(o=>Promise.resolve(o(this.view)))).then(o=>{let u=o.reduce((p,v)=>p.concat(v));this.view.state.doc==t.doc&&this.view.dispatch(py(this.view.state,u))},o=>{Ls(this.view.state,o)})}}update(a){let t=a.state.facet(ud);(a.docChanged||t!=a.startState.facet(ud))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),ud=ft.define({combine(a){return Object.assign({sources:a.map(t=>t.source)},Vi(a.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null}))},enables:Ym});function F1(a,t={}){return ud.of({source:a,config:t})}function B1(a){let t=a.plugin(Ym);t&&t.force()}function Qm(a){let t=[];if(a)e:for(let{name:n}of a){for(let o=0;o<n.length;o++){let u=n[o];if(/[a-zA-Z]/.test(u)&&!t.some(p=>p.toLowerCase()==u.toLowerCase())){t.push(u);continue e}}t.push("")}return t}function Jm(a,t,n){var o;let u=n?Qm(t.actions):[];return js("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},js("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),(o=t.actions)===null||o===void 0?void 0:o.map((p,v)=>{let S=Me=>{Me.preventDefault();let gt=Md(a.state.field(Kl).diagnostics,t);gt&&p.apply(a,gt.from,gt.to)},{name:A}=p,H=u[v]?A.indexOf(u[v]):-1,X=H<0?A:[A.slice(0,H),js("u",A.slice(H,H+1)),A.slice(H+1)];return js("button",{type:"button",class:"cm-diagnosticAction",onclick:S,onmousedown:S,"aria-label":` Action: ${A}${H<0?"":` (access key "${u[v]})"`}.`},X)}),t.source&&js("div",{class:"cm-diagnosticSource"},t.source))}class Ey extends ba{constructor(t){super(),this.diagnostic=t}eq(t){return t.diagnostic==this.diagnostic}toDOM(){return js("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Xm{constructor(t,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Jm(t,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class dh{constructor(t){this.view=t,this.items=[];let n=u=>{if(u.keyCode==27)Gm(this.view),this.view.focus();else if(u.keyCode==38||u.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(u.keyCode==40||u.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(u.keyCode==36)this.moveSelection(0);else if(u.keyCode==35)this.moveSelection(this.items.length-1);else if(u.keyCode==13)this.view.focus();else if(u.keyCode>=65&&u.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:p}=this.items[this.selectedIndex],v=Qm(p.actions);for(let S=0;S<v.length;S++)if(v[S].toUpperCase().charCodeAt(0)==u.keyCode){let A=Md(this.view.state.field(Kl).diagnostics,p);A&&p.actions[S].apply(t,A.from,A.to)}}else return;u.preventDefault()},o=u=>{for(let p=0;p<this.items.length;p++)this.items[p].dom.contains(u.target)&&this.moveSelection(p)};this.list=js("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:o}),this.dom=js("div",{class:"cm-panel-lint"},this.list,js("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Gm(this.view)},"\xD7")),this.update()}get selectedIndex(){let t=this.view.state.field(Kl).selected;if(!t)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==t.diagnostic)return n;return-1}update(){let{diagnostics:t,selected:n}=this.view.state.field(Kl),o=0,u=!1,p=null;for(t.between(0,this.view.state.doc.length,(v,S,{spec:A})=>{let H=-1,X;for(let Me=o;Me<this.items.length;Me++)if(this.items[Me].diagnostic==A.diagnostic){H=Me;break}H<0?(X=new Xm(this.view,A.diagnostic),this.items.splice(o,0,X),u=!0):(X=this.items[H],H>o&&(this.items.splice(o,H-o),u=!0)),n&&X.diagnostic==n.diagnostic?X.dom.hasAttribute("aria-selected")||(X.dom.setAttribute("aria-selected","true"),p=X):X.dom.hasAttribute("aria-selected")&&X.dom.removeAttribute("aria-selected"),o++});o<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)u=!0,this.items.pop();this.items.length==0&&(this.items.push(new Xm(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),u=!0),p?(this.list.setAttribute("aria-activedescendant",p.id),this.view.requestMeasure({key:this,read:()=>({sel:p.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:v,panel:S})=>{v.top<S.top?this.list.scrollTop-=S.top-v.top:v.bottom>S.bottom&&(this.list.scrollTop+=v.bottom-S.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),u&&this.sync()}sync(){let t=this.list.firstChild;function n(){let o=t;t=o.nextSibling,o.remove()}for(let o of this.items)if(o.dom.parentNode==this.list){for(;t!=o.dom;)n();t=o.dom.nextSibling}else this.list.insertBefore(o.dom,t);for(;t;)n()}moveSelection(t){if(this.selectedIndex<0)return;let n=this.view.state.field(Kl),o=Md(n.diagnostics,this.items[t].diagnostic);o&&this.view.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0,effects:Zm.of(o)})}static open(t){return new dh(t)}}function hh(a,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(a)}</svg>')`}function qh(a){return hh(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${a}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const by=Di.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:qh("#d11")},".cm-lintRange-warning":{backgroundImage:qh("orange")},".cm-lintRange-info":{backgroundImage:qh("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});class xy extends Mi{constructor(t){super(),this.diagnostics=t,this.severity=t.reduce((n,o)=>{let u=o.severity;return u=="error"||u=="warning"&&n=="info"?u:n},"info")}toDOM(t){let n=document.createElement("div");n.className="cm-lint-marker cm-lint-marker-"+this.severity;let o=this.diagnostics,u=t.state.facet(ph).tooltipFilter;return u&&(o=u(o)),o.length&&(n.onmouseover=()=>My(t,n,o)),n}}function Cy(a,t){let n=o=>{let u=t.getBoundingClientRect();if(!(o.clientX>u.left-10&&o.clientX<u.right+10&&o.clientY>u.top-10&&o.clientY<u.bottom+10)){for(let p=o.target;p;p=p.parentNode)if(p.nodeType==1&&p.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",n),a.state.field(e0)&&a.dispatch({effects:ep.of(null)})}};window.addEventListener("mousemove",n)}function My(a,t,n){function o(){let v=a.elementAtHeight(t.getBoundingClientRect().top+5-a.documentTop);a.coordsAtPos(v.from)&&a.dispatch({effects:ep.of({pos:v.from,above:!1,create(){return{dom:Km(a,n),getCoords:()=>t.getBoundingClientRect()}}})}),t.onmouseout=t.onmousemove=null,Cy(a,t)}let{hoverTime:u}=a.state.facet(ph),p=setTimeout(o,u);t.onmouseout=()=>{clearTimeout(p),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(p),p=setTimeout(o,u)}}function Sy(a,t){let n=Object.create(null);for(let u of t){let p=a.lineAt(u.from);(n[p.from]||(n[p.from]=[])).push(u)}let o=[];for(let u in n)o.push(new xy(n[u]).range(+u));return hi.of(o,!0)}const Oy=os({class:"cm-gutter-lint",markers:a=>a.state.field(qm)}),qm=Ut.define({create(){return hi.empty},update(a,t){a=a.map(t.changes);let n=t.state.facet(ph).markerFilter;for(let o of t.effects)if(o.is(fh)){let u=o.value;n&&(u=n(u||[])),a=Sy(t.state.doc,u.slice(0))}return a}}),ep=Et.define(),e0=Ut.define({create(){return null},update(a,t){return a&&t.docChanged&&(a=Vm(t,a)?null:Object.assign(Object.assign({},a),{pos:t.changes.mapPos(a.pos)})),t.effects.reduce((n,o)=>o.is(ep)?o.value:n,a)},provide:a=>Uu.from(a)}),Ty=Di.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:hh('<path fill="#aaf" stroke="#77e" stroke-width="6" stroke-linejoin="round" d="M5 5L35 5L35 35L5 35Z"/>')},".cm-lint-marker-warning":{content:hh('<path fill="#fe8" stroke="#fd7" stroke-width="6" stroke-linejoin="round" d="M20 6L37 35L3 35Z"/>')},".cm-lint-marker-error":{content:hh('<circle cx="20" cy="20" r="15" fill="#f87" stroke="#f43" stroke-width="6"/>')}}),ph=ft.define({combine(a){return Vi(a,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function k1(a={}){return[ph.of(a),qm,Oy,Ty,e0]}function j1(a,t){let n=a.field(Kl,!1);if(n&&n.diagnostics.size)for(let o=RangeSet.iter([n.diagnostics]);o.value;o.next())t(o.value.spec.diagnostic,o.from,o.to)}var t0=function(t){t===void 0&&(t={});var n=[];t.closeBracketsKeymap!==!1&&(n=n.concat(iy)),t.defaultKeymap!==!1&&(n=n.concat(Yg)),t.searchKeymap!==!1&&(n=n.concat(bv)),t.historyKeymap!==!1&&(n=n.concat(ag)),t.foldKeymap!==!1&&(n=n.concat(Ui)),t.completionKeymap!==!1&&(n=n.concat(Wm)),t.lintKeymap!==!1&&(n=n.concat(yy));var o=[];return t.lineNumbers!==!1&&o.push(pd()),t.highlightActiveLineGutter!==!1&&o.push(Sc()),t.highlightSpecialChars!==!1&&o.push(ri()),t.history!==!1&&o.push(X0()),t.foldGutter!==!1&&o.push(yh()),t.drawSelection!==!1&&o.push(jf()),t.dropCursor!==!1&&o.push(nd()),t.allowMultipleSelections!==!1&&o.push(ui.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&o.push(c()),t.syntaxHighlighting!==!1&&o.push(ap(E0,{fallback:!0})),t.bracketMatching!==!1&&o.push(O0()),t.closeBrackets!==!1&&o.push(ty()),t.autocompletion!==!1&&o.push(fy()),t.rectangularSelection!==!1&&o.push(_l()),t.crosshairCursor!==!1&&o.push(Pf()),t.highlightActiveLine!==!1&&o.push(ws()),t.highlightSelectionMatches!==!1&&o.push(tv()),t.tabSize&&typeof t.tabSize=="number"&&o.push(Ai.of(" ".repeat(t.tabSize))),o.concat([Eu.of(n.flat())]).filter(Boolean)},U1=function(t){t===void 0&&(t={});var n=[];t.defaultKeymap!==!1&&(n=n.concat(defaultKeymap)),t.historyKeymap!==!1&&(n=n.concat(historyKeymap));var o=[];return t.highlightSpecialChars!==!1&&o.push(highlightSpecialChars()),t.history!==!1&&o.push(history()),t.drawSelection!==!1&&o.push(drawSelection()),t.syntaxHighlighting!==!1&&o.push(syntaxHighlighting(defaultHighlightStyle,{fallback:!0})),o.concat([keymap.of(n.flat())]).filter(Boolean)};const n0="#e5c07b",tp="#e06c75",r0="#56b6c2",i0="#ffffff",Bd="#abb2bf",mh="#7d8799",o0="#61afef",s0="#98c379",np="#d19a66",a0="#c678dd",l0="#21252b",rp="#2c313a",ip="#282c34",gh="#353a42",u0="#3E4451",op="#528bff",W1={chalky:n0,coral:tp,cyan:r0,invalid:i0,ivory:Bd,stone:mh,malibu:o0,sage:s0,whiskey:np,violet:a0,darkBackground:l0,highlightBackground:rp,background:ip,tooltipBackground:gh,selection:u0,cursor:op},wy=Di.theme({"&":{color:Bd,backgroundColor:ip},".cm-content":{caretColor:op},".cm-cursor, .cm-dropCursor":{borderLeftColor:op},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:u0},".cm-panels":{backgroundColor:l0,color:Bd},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847",outline:"1px solid #515a6b"},".cm-gutters":{backgroundColor:ip,color:mh,border:"none"},".cm-activeLineGutter":{backgroundColor:rp},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:gh},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:gh,borderBottomColor:gh},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:rp,color:Bd}}},{dark:!0}),Dy=Dd.define([{tag:Ke.keyword,color:a0},{tag:[Ke.name,Ke.deleted,Ke.character,Ke.propertyName,Ke.macroName],color:tp},{tag:[Ke.function(Ke.variableName),Ke.labelName],color:o0},{tag:[Ke.color,Ke.constant(Ke.name),Ke.standard(Ke.name)],color:np},{tag:[Ke.definition(Ke.name),Ke.separator],color:Bd},{tag:[Ke.typeName,Ke.className,Ke.number,Ke.changed,Ke.annotation,Ke.modifier,Ke.self,Ke.namespace],color:n0},{tag:[Ke.operator,Ke.operatorKeyword,Ke.url,Ke.escape,Ke.regexp,Ke.link,Ke.special(Ke.string)],color:r0},{tag:[Ke.meta,Ke.comment],color:mh},{tag:Ke.strong,fontWeight:"bold"},{tag:Ke.emphasis,fontStyle:"italic"},{tag:Ke.strikethrough,textDecoration:"line-through"},{tag:Ke.link,color:mh,textDecoration:"underline"},{tag:Ke.heading,fontWeight:"bold",color:tp},{tag:[Ke.atom,Ke.bool,Ke.special(Ke.variableName)],color:np},{tag:[Ke.processingInstruction,Ke.string,Ke.inserted],color:s0},{tag:Ke.invalid,color:i0}]),Py=[wy,ap(Dy)];var Ay=Di.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Ry=function(t){t===void 0&&(t={});var{indentWithTab:n=!0,editable:o=!0,readOnly:u=!1,theme:p="light",placeholder:v="",basicSetup:S=!0}=t,A=[];switch(n&&A.unshift(Eu.of([Qg])),S&&(typeof S=="boolean"?A.unshift(t0()):A.unshift(t0(S))),v&&A.unshift(Qo(v)),p){case"light":A.push(Ay);break;case"dark":A.push(Py);break;case"none":break;default:A.push(p);break}return o===!1&&A.push(Di.editable.of(!1)),u&&A.push(ui.readOnly.of(!0)),[...A]},Iy=a=>({line:a.state.doc.lineAt(a.state.selection.main.from),lineCount:a.state.doc.lines,lineBreak:a.state.lineBreak,length:a.state.doc.length,readOnly:a.state.readOnly,tabSize:a.state.tabSize,selection:a.state.selection,selectionAsSingle:a.state.selection.asSingle().main,ranges:a.state.selection.ranges,selectionCode:a.state.sliceDoc(a.state.selection.main.from,a.state.selection.main.to),selections:a.state.selection.ranges.map(t=>a.state.sliceDoc(t.from,t.to)),selectedText:a.state.selection.ranges.some(t=>!t.empty)}),c0=Xe.define(),_y=[];function f0(a){var{value:t,selection:n,onChange:o,onStatistics:u,onCreateEditor:p,onUpdate:v,extensions:S=_y,autoFocus:A,theme:H="light",height:X=null,minHeight:Me=null,maxHeight:gt=null,width:It=null,minWidth:un=null,maxWidth:or=null,placeholder:ar="",editable:wr=!0,readOnly:Si=!1,indentWithTab:ki=!0,basicSetup:mi=!0,root:Ci,initialState:Pi}=a,[Fi,To]=(0,f.useState)(),[eo,oo]=(0,f.useState)(),[Zo,Us]=(0,f.useState)(),oa=Di.theme({"&":{height:X,minHeight:Me,maxHeight:gt,width:It,minWidth:un,maxWidth:or},"& .cm-scroller":{height:"100% !important"}}),Qa=Di.updateListener.of(La=>{if(La.docChanged&&typeof o=="function"&&!La.transactions.some(Tc=>Tc.annotation(c0))){var aa=La.state.doc,Hs=aa.toString();o(Hs,La)}u&&u(Iy(La))}),yl=Ry({theme:H,editable:wr,readOnly:Si,placeholder:ar,indentWithTab:ki,basicSetup:mi}),sa=[Qa,oa,...yl];return v&&typeof v=="function"&&sa.push(Di.updateListener.of(v)),sa=sa.concat(S),(0,f.useEffect)(()=>{if(Fi&&!Zo){var La={doc:t,selection:n,extensions:sa},aa=Pi?ui.fromJSON(Pi.json,La,Pi.fields):ui.create(La);if(Us(aa),!eo){var Hs=new Di({state:aa,parent:Fi,root:Ci});oo(Hs),p&&p(Hs,aa)}}return()=>{eo&&(Us(void 0),oo(void 0))}},[Fi,Zo]),(0,f.useEffect)(()=>To(a.container),[a.container]),(0,f.useEffect)(()=>()=>{eo&&(eo.destroy(),oo(void 0))},[eo]),(0,f.useEffect)(()=>{A&&eo&&eo.focus()},[A,eo]),(0,f.useEffect)(()=>{eo&&eo.dispatch({effects:Et.reconfigure.of(sa)})},[H,S,X,Me,gt,It,un,or,ar,wr,Si,ki,mi,o,v]),(0,f.useEffect)(()=>{if(t!==void 0){var La=eo?eo.state.doc.toString():"";eo&&t!==La&&eo.dispatch({changes:{from:0,to:La.length,insert:t||""},annotations:[c0.of(!0)]})}},[t,eo]),{state:Zo,setState:Us,view:eo,setView:oo,container:Fi,setContainer:To}}var Ly=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],$y=(0,f.forwardRef)((a,t)=>{var{className:n,value:o="",selection:u,extensions:p=[],onChange:v,onStatistics:S,onCreateEditor:A,onUpdate:H,autoFocus:X,theme:Me="light",height:gt,minHeight:It,maxHeight:un,width:or,minWidth:ar,maxWidth:wr,basicSetup:Si,placeholder:ki,indentWithTab:mi,editable:Ci,readOnly:Pi,root:Fi,initialState:To}=a,eo=(0,U0.Z)(a,Ly),oo=(0,f.useRef)(null),{state:Zo,view:Us,container:oa}=f0({container:oo.current,root:Fi,value:o,autoFocus:X,theme:Me,height:gt,minHeight:It,maxHeight:un,width:or,minWidth:ar,maxWidth:wr,basicSetup:Si,placeholder:ki,indentWithTab:mi,editable:Ci,readOnly:Pi,selection:u,onChange:v,onStatistics:S,onCreateEditor:A,onUpdate:H,extensions:p,initialState:To});if((0,f.useImperativeHandle)(t,()=>({editor:oo.current,state:Zo,view:Us}),[oo,oa,Zo,Us]),typeof o!="string")throw new Error("value must be typeof string but got "+typeof o);var Qa=typeof Me=="string"?"cm-theme-"+Me:"cm-theme";return(0,l.jsx)("div",(0,j0.Z)({ref:oo,className:""+Qa+(n?" "+n:"")},eo))});$y.displayName="CodeMirror";var z1=null,Ny=i(8471);const d0=Et.define(),h0=Et.define(),Fy=Lr.mark({attributes:{style:"background-color: yellow; color: black"}}),By=Ut.define({create(){return Lr.none},update(a,t){return a=a.map(t.changes),t.effects.forEach(n=>{n.is(d0)?a=a.update({add:n.value,sort:!0}):n.is(h0)&&(a=a.update({filter:n.value}))}),a},provide:a=>Di.decorations.from(a)});var ky=i(78584),jy=i(750),p0=i(84642),Uy=i(99391),Wy=i(15667),zy=i(74925),Vy=i(59619);const Hy=(0,f.forwardRef)(({label:a,error:t,hint:n,labelAction:o,value:u="",required:p=!1,disabled:v=!1,onChange:S=()=>null,...A},H)=>{const X=(0,f.useRef)(),Me=(0,f.useRef)(),gt=(0,f.useRef)(),It=Boolean(t),un=Fi=>{const To=Me.current?.doc;if(To){const{text:eo,to:oo}=To.line(Fi),Zo=oo-eo.trimStart().length;oo>Zo&&gt.current?.dispatch({effects:d0.of([Fy.range(Zo,oo)])})}},or=()=>{const Fi=Me.current?.doc;if(Fi){const To=Fi.length||0;gt.current?.dispatch({effects:h0.of((eo,oo)=>oo<=0||eo>=To)})}},ar=({state:Fi,view:To})=>{gt.current=To,Me.current=Fi,or();const oo=N0()(To);oo.length&&un(Fi.doc.lineAt(oo[0].from).number)},wr=(Fi,To)=>{ar(To),S(Fi)},Si=(Fi,To)=>{gt.current=Fi,Me.current=To,ar({view:Fi,state:To})},{setContainer:ki,view:mi}=f0({value:u,onCreateEditor:Si,container:X.current,editable:!v,extensions:[k0(),By],onChange:wr,theme:"dark",basicSetup:{lineNumbers:!0,bracketMatching:!0,closeBrackets:!0,indentOnInput:!0,syntaxHighlighting:!0,highlightSelectionMatches:!0,tabSize:2}}),Ci=()=>{!v&&mi&&mi.focus()},Pi=(0,ky.e)(X,ki);return(0,f.useImperativeHandle)(H,()=>({...mi?.dom,focus(){mi&&mi.focus()},scrollIntoView(Fi){mi&&mi.dom.scrollIntoView(Fi)}}),[mi]),(0,l.jsx)(jy.g,{error:t,hint:n,required:p,children:(0,l.jsxs)(p0.k,{direction:"column",alignItems:"stretch",gap:1,children:[a&&(0,l.jsx)(Uy.Q,{onClick:Ci,action:o,children:a}),(0,l.jsx)(Zy,{ref:Pi,hasError:It,alignItems:"stretch",fontSize:2,hasRadius:!0,...A}),(0,l.jsx)(Wy.c,{}),(0,l.jsx)(zy.J,{})]})})}),Zy=(0,Ny.ZP)(p0.k)`
2199
+ `:o=="r"?"\r":o=="t"?" ":"\\")}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new hv(this):new fv(this)}getCursor(t,n=0,o){let u=t.doc?t:ui.create({doc:t});return o==null&&(o=u.doc.length),this.regexp?bd(this,u,n,o):Ed(this,u,n,o)}}class hm{constructor(t){this.spec=t}}function Ed(a,t,n,o){return new vd(t.doc,a.unquoted,n,o,a.caseSensitive?void 0:u=>u.toLowerCase(),a.wholeWord?cv(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}function cv(a,t){return(n,o,u,p)=>((p>n||p+u.length<o)&&(p=Math.max(0,n-2),u=a.sliceString(p,Math.min(a.length,o+2))),(t(eh(u,n-p))!=qr.Word||t(th(u,n-p))!=qr.Word)&&(t(th(u,o-p))!=qr.Word||t(eh(u,o-p))!=qr.Word))}class fv extends hm{constructor(t){super(t)}nextMatch(t,n,o){let u=Ed(this.spec,t,o,t.doc.length).nextOverlapping();return u.done&&(u=Ed(this.spec,t,0,n).nextOverlapping()),u.done?null:u.value}prevMatchInRange(t,n,o){for(let u=o;;){let p=Math.max(n,u-1e4-this.spec.unquoted.length),v=Ed(this.spec,t,p,u),S=null;for(;!v.nextOverlapping().done;)S=v.value;if(S)return S;if(p==n)return null;u-=1e4}}prevMatch(t,n,o){return this.prevMatchInRange(t,0,n)||this.prevMatchInRange(t,o,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace)}matchAll(t,n){let o=Ed(this.spec,t,0,t.doc.length),u=[];for(;!o.next().done;){if(u.length>=n)return null;u.push(o.value)}return u}highlight(t,n,o,u){let p=Ed(this.spec,t,Math.max(0,n-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,t.doc.length));for(;!p.next().done;)u(p.value.from,p.value.to)}}function bd(a,t,n,o){return new am(t.doc,a.search,{ignoreCase:!a.caseSensitive,test:a.wholeWord?dv(t.charCategorizer(t.selection.main.head)):void 0},n,o)}function eh(a,t){return a.slice(ne(a,t,!1),t)}function th(a,t){return a.slice(t,ne(a,t))}function dv(a){return(t,n,o)=>!o[0].length||(a(eh(o.input,o.index))!=qr.Word||a(th(o.input,o.index))!=qr.Word)&&(a(th(o.input,o.index+o[0].length))!=qr.Word||a(eh(o.input,o.index+o[0].length))!=qr.Word)}class hv extends hm{nextMatch(t,n,o){let u=bd(this.spec,t,o,t.doc.length).next();return u.done&&(u=bd(this.spec,t,0,n).next()),u.done?null:u.value}prevMatchInRange(t,n,o){for(let u=1;;u++){let p=Math.max(n,o-u*1e4),v=bd(this.spec,t,p,o),S=null;for(;!v.next().done;)S=v.value;if(S&&(p==n||S.from>p+10))return S;if(p==n)return null}}prevMatch(t,n,o){return this.prevMatchInRange(t,0,n)||this.prevMatchInRange(t,o,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(n,o)=>o=="$"?"$":o=="&"?t.match[0]:o!="0"&&+o<t.match.length?t.match[o]:n))}matchAll(t,n){let o=bd(this.spec,t,0,t.doc.length),u=[];for(;!o.next().done;){if(u.length>=n)return null;u.push(o.value)}return u}highlight(t,n,o,u){let p=bd(this.spec,t,Math.max(0,n-250),Math.min(o+250,t.doc.length));for(;!p.next().done;)u(p.value.from,p.value.to)}}const Id=Et.define(),Bh=Et.define(),rf=Ut.define({create(a){return new kh(ih(a).create(),null)},update(a,t){for(let n of t.effects)n.is(Id)?a=new kh(n.value.create(),a.panel):n.is(Bh)&&(a=new kh(a.query,n.value?jh:null));return a},provide:a=>pi.from(a,t=>t.panel)});function b1(a){let t=a.field(rf,!1);return t?t.query.spec:ih(a)}function x1(a){var t;return((t=a.field(rf,!1))===null||t===void 0?void 0:t.panel)!=null}class kh{constructor(t,n){this.query=t,this.panel=n}}const pv=Lr.mark({class:"cm-searchMatch"}),mv=Lr.mark({class:"cm-searchMatch cm-searchMatch-selected"}),gv=Wo.fromClass(class{constructor(a){this.view=a,this.decorations=this.highlight(a.state.field(rf))}update(a){let t=a.state.field(rf);(t!=a.startState.field(rf)||a.docChanged||a.selectionSet||a.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:a,panel:t}){if(!t||!a.spec.valid)return Lr.none;let{view:n}=this,o=new Uo;for(let u=0,p=n.visibleRanges,v=p.length;u<v;u++){let{from:S,to:A}=p[u];for(;u<v-1&&A>p[u+1].from-2*250;)A=p[++u].to;a.highlight(n.state,S,A,(H,X)=>{let Me=n.state.selection.ranges.some(gt=>gt.from==H&&gt.to==X);o.add(H,X,Me?mv:pv)})}return o.finish()}},{decorations:a=>a.decorations});function _d(a){return t=>{let n=t.state.field(rf,!1);return n&&n.query.spec.valid?a(t,n):mm(t)}}const nh=_d((a,{query:t})=>{let{to:n}=a.state.selection.main,o=t.nextMatch(a.state,n,n);return o?(a.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0,effects:Uh(a,o),userEvent:"select.search"}),!0):!1}),rh=_d((a,{query:t})=>{let{state:n}=a,{from:o}=n.selection.main,u=t.prevMatch(n,o,o);return u?(a.dispatch({selection:{anchor:u.from,head:u.to},scrollIntoView:!0,effects:Uh(a,u),userEvent:"select.search"}),!0):!1}),vv=_d((a,{query:t})=>{let n=t.matchAll(a.state,1e3);return!n||!n.length?!1:(a.dispatch({selection:ue.create(n.map(o=>ue.range(o.from,o.to))),userEvent:"select.search.matches"}),!0)}),yv=({state:a,dispatch:t})=>{let n=a.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:o,to:u}=n.main,p=[],v=0;for(let S=new vd(a.doc,a.sliceDoc(o,u));!S.next().done;){if(p.length>1e3)return!1;S.value.from==o&&(v=p.length),p.push(ue.range(S.value.from,S.value.to))}return t(a.update({selection:ue.create(p,v),userEvent:"select.search.matches"})),!0},pm=_d((a,{query:t})=>{let{state:n}=a,{from:o,to:u}=n.selection.main;if(n.readOnly)return!1;let p=t.nextMatch(n,o,o);if(!p)return!1;let v=[],S,A,H=[];if(p.from==o&&p.to==u&&(A=n.toText(t.getReplacement(p)),v.push({from:p.from,to:p.to,insert:A}),p=t.nextMatch(n,p.from,p.to),H.push(Di.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(o).number)+"."))),p){let X=v.length==0||v[0].from>=p.to?0:p.to-p.from-A.length;S={anchor:p.from-X,head:p.to-X},H.push(Uh(a,p))}return a.dispatch({changes:v,selection:S,scrollIntoView:!!S,effects:H,userEvent:"input.replace"}),!0}),Ev=_d((a,{query:t})=>{if(a.state.readOnly)return!1;let n=t.matchAll(a.state,1e9).map(u=>{let{from:p,to:v}=u;return{from:p,to:v,insert:t.getReplacement(u)}});if(!n.length)return!1;let o=a.state.phrase("replaced $ matches",n.length)+".";return a.dispatch({changes:n,effects:Di.announce.of(o),userEvent:"input.replace.all"}),!0});function jh(a){return a.state.facet(qd).createPanel(a)}function ih(a,t){var n,o,u,p;let v=a.selection.main,S=v.empty||v.to>v.from+100?"":a.sliceDoc(v.from,v.to);if(t&&!S)return t;let A=a.facet(qd);return new dm({search:((n=t?.literal)!==null&&n!==void 0?n:A.literal)?S:S.replace(/\n/g,"\\n"),caseSensitive:(o=t?.caseSensitive)!==null&&o!==void 0?o:A.caseSensitive,literal:(u=t?.literal)!==null&&u!==void 0?u:A.literal,wholeWord:(p=t?.wholeWord)!==null&&p!==void 0?p:A.wholeWord})}const mm=a=>{let t=a.state.field(rf,!1);if(t&&t.panel){let n=gl(a,jh);if(!n)return!1;let o=n.dom.querySelector("[main-field]");if(o&&o!=a.root.activeElement){let u=ih(a.state,t.query.spec);u.valid&&a.dispatch({effects:Id.of(u)}),o.focus(),o.select()}}else a.dispatch({effects:[Bh.of(!0),t?Id.of(ih(a.state,t.query.spec)):Et.appendConfig.of(Wh)]});return!0},gm=a=>{let t=a.state.field(rf,!1);if(!t||!t.panel)return!1;let n=gl(a,jh);return n&&n.dom.contains(a.root.activeElement)&&a.focus(),a.dispatch({effects:Bh.of(!1)}),!0},bv=[{key:"Mod-f",run:mm,scope:"editor search-panel"},{key:"F3",run:nh,shift:rh,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:nh,shift:rh,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:gm,scope:"editor search-panel"},{key:"Mod-Shift-l",run:yv},{key:"Alt-g",run:Xg},{key:"Mod-d",run:uv,preventDefault:!0}];class xv{constructor(t){this.view=t;let n=this.query=t.state.field(rf).query.spec;this.commit=this.commit.bind(this),this.searchField=js("input",{value:n.search,placeholder:Ou(t,"Find"),"aria-label":Ou(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=js("input",{value:n.replace,placeholder:Ou(t,"Replace"),"aria-label":Ou(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=js("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=js("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=js("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function o(u,p,v){return js("button",{class:"cm-button",name:u,onclick:p,type:"button"},v)}this.dom=js("div",{onkeydown:u=>this.keydown(u),class:"cm-search"},[this.searchField,o("next",()=>nh(t),[Ou(t,"next")]),o("prev",()=>rh(t),[Ou(t,"previous")]),o("select",()=>vv(t),[Ou(t,"all")]),js("label",null,[this.caseField,Ou(t,"match case")]),js("label",null,[this.reField,Ou(t,"regexp")]),js("label",null,[this.wordField,Ou(t,"by word")]),...t.state.readOnly?[]:[js("br"),this.replaceField,o("replace",()=>pm(t),[Ou(t,"replace")]),o("replaceAll",()=>Ev(t),[Ou(t,"replace all")])],js("button",{name:"close",onclick:()=>gm(t),"aria-label":Ou(t,"close"),type:"button"},["\xD7"])])}commit(){let t=new dm({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:Id.of(t)}))}keydown(t){Cf(this.view,t,"search-panel")?t.preventDefault():t.keyCode==13&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?rh:nh)(this.view)):t.keyCode==13&&t.target==this.replaceField&&(t.preventDefault(),pm(this.view))}update(t){for(let n of t.transactions)for(let o of n.effects)o.is(Id)&&!o.value.eq(this.query)&&this.setQuery(o.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(qd).top}}function Ou(a,t){return a.state.phrase(t)}const oh=30,sh=/[\s\.,:;?!]/;function Uh(a,{from:t,to:n}){let o=a.state.doc.lineAt(t),u=a.state.doc.lineAt(n).to,p=Math.max(o.from,t-oh),v=Math.min(u,n+oh),S=a.state.sliceDoc(p,v);if(p!=o.from){for(let A=0;A<oh;A++)if(!sh.test(S[A+1])&&sh.test(S[A])){S=S.slice(A);break}}if(v!=u){for(let A=S.length-1;A>S.length-oh;A--)if(!sh.test(S[A-1])&&sh.test(S[A])){S=S.slice(0,A);break}}return Di.announce.of(`${a.state.phrase("current match")}. ${S} ${a.state.phrase("on line")} ${o.number}.`)}const Cv=Di.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Wh=[rf,xn.lowest(gv),Cv];class vm{constructor(t,n,o){this.state=t,this.pos=n,this.explicit=o,this.abortListeners=[]}tokenBefore(t){let n=Z(this.state).resolveInner(this.pos,-1);for(;n&&t.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(t){let n=this.state.doc.lineAt(this.pos),o=Math.max(n.from,this.pos-250),u=n.text.slice(o-n.from,this.pos-n.from),p=u.search(bm(t,!1));return p<0?null:{from:o+p,to:this.pos,text:u.slice(p)}}get aborted(){return this.abortListeners==null}addEventListener(t,n){t=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function ym(a){let t=Object.keys(a).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function Mv(a){let t=Object.create(null),n=Object.create(null);for(let{label:u}of a){t[u[0]]=!0;for(let p=1;p<u.length;p++)n[u[p]]=!0}let o=ym(t)+ym(n)+"*$";return[new RegExp("^"+o),new RegExp(o)]}function Sv(a){let t=a.map(u=>typeof u=="string"?{label:u}:u),[n,o]=t.every(u=>/^\w+$/.test(u.label))?[/\w*$/,/\w+$/]:Mv(t);return u=>{let p=u.matchBefore(o);return p||u.explicit?{from:p?p.from:u.pos,options:t,validFor:n}:null}}function C1(a,t){return n=>{for(let o=syntaxTree(n.state).resolveInner(n.pos,-1);o;o=o.parent)if(a.indexOf(o.name)>-1)return t(n);return null}}function M1(a,t){return n=>{for(let o=syntaxTree(n.state).resolveInner(n.pos,-1);o;o=o.parent)if(a.indexOf(o.name)>-1)return null;return t(n)}}class Em{constructor(t,n,o){this.completion=t,this.source=n,this.match=o}}function Yf(a){return a.selection.main.head}function bm(a,t){var n;let{source:o}=a,u=t&&o[0]!="^",p=o[o.length-1]!="$";return!u&&!p?a:new RegExp(`${u?"^":""}(?:${o})${p?"$":""}`,(n=a.flags)!==null&&n!==void 0?n:a.ignoreCase?"i":"")}const Ov=Xe.define();function Tv(a,t,n,o){return Object.assign(Object.assign({},a.changeByRange(u=>{if(u==a.selection.main)return{changes:{from:n,to:o,insert:t},range:ue.cursor(n+t.length)};let p=o-n;return!u.empty||p&&a.sliceDoc(u.from-p,u.from)!=a.sliceDoc(n,o)?{range:u}:{changes:{from:u.from-p,to:u.from,insert:t},range:ue.cursor(u.from-p+t.length)}})),{userEvent:"input.complete"})}function xm(a,t){const n=t.completion.apply||t.completion.label;let o=t.source;typeof n=="string"?a.dispatch(Object.assign(Object.assign({},Tv(a.state,n,o.from,o.to)),{annotations:Ov.of(t.completion)})):n(a,t.completion,o.from,o.to)}const Cm=new WeakMap;function wv(a){if(!Array.isArray(a))return a;let t=Cm.get(a);return t||Cm.set(a,t=Sv(a)),t}class Dv{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let n=0;n<t.length;){let o=Rt(t,n),u=qt(o);this.chars.push(o);let p=t.slice(n,n+u),v=p.toUpperCase();this.folded.push(Rt(v==p?p.toLowerCase():v,0)),n+=u}this.astral=t.length!=this.chars.length}match(t){if(this.pattern.length==0)return[0];if(t.length<this.pattern.length)return null;let{chars:n,folded:o,any:u,precise:p,byWord:v}=this;if(n.length==1){let Si=Rt(t,0);return Si==n[0]?[0,0,qt(Si)]:Si==o[0]?[-200,0,qt(Si)]:null}let S=t.indexOf(this.pattern);if(S==0)return[0,0,this.pattern.length];let A=n.length,H=0;if(S<0){for(let Si=0,ki=Math.min(t.length,200);Si<ki&&H<A;){let mi=Rt(t,Si);(mi==n[H]||mi==o[H])&&(u[H++]=Si),Si+=qt(mi)}if(H<A)return null}let X=0,Me=0,gt=!1,It=0,un=-1,or=-1,ar=/[a-z]/.test(t),wr=!0;for(let Si=0,ki=Math.min(t.length,200),mi=0;Si<ki&&Me<A;){let Ci=Rt(t,Si);S<0&&(X<A&&Ci==n[X]&&(p[X++]=Si),It<A&&(Ci==n[It]||Ci==o[It]?(It==0&&(un=Si),or=Si+1,It++):It=0));let Pi,Fi=Ci<255?Ci>=48&&Ci<=57||Ci>=97&&Ci<=122?2:Ci>=65&&Ci<=90?1:0:(Pi=fn(Ci))!=Pi.toLowerCase()?1:Pi!=Pi.toUpperCase()?2:0;(!Si||Fi==1&&ar||mi==0&&Fi!=0)&&(n[Me]==Ci||o[Me]==Ci&&(gt=!0)?v[Me++]=Si:v.length&&(wr=!1)),mi=Fi,Si+=qt(Ci)}return Me==A&&v[0]==0&&wr?this.result(-100+(gt?-200:0),v,t):It==A&&un==0?[-200-t.length,0,or]:S>-1?[-700-t.length,S,S+this.pattern.length]:It==A?[-200+-700-t.length,un,or]:Me==A?this.result(-100+(gt?-200:0)+-700+(wr?0:-1100),v,t):n.length==2?null:this.result((u[0]?-700:0)+-200+-1100,u,t)}result(t,n,o){let u=[t-o.length],p=1;for(let v of n){let S=v+(this.astral?qt(Rt(o,v)):1);p>1&&u[p-1]==v?u[p-1]=S:(u[p++]=v,u[p++]=S)}return u}}const Ju=ft.define({combine(a){return Vi(a,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:(t,n)=>t.label.localeCompare(n.label),interactionDelay:75},{defaultKeymap:(t,n)=>t&&n,closeOnBlur:(t,n)=>t&&n,icons:(t,n)=>t&&n,tooltipClass:(t,n)=>o=>Mm(t(o),n(o)),optionClass:(t,n)=>o=>Mm(t(o),n(o)),addToOptions:(t,n)=>t.concat(n)})}});function Mm(a,t){return a?t?a+" "+t:a:t}function Pv(a){let t=a.addToOptions.slice();return a.icons&&t.push({render(n){let o=document.createElement("div");return o.classList.add("cm-completionIcon"),n.type&&o.classList.add(...n.type.split(/\s+/g).map(u=>"cm-completionIcon-"+u)),o.setAttribute("aria-hidden","true"),o},position:20}),t.push({render(n,o,u){let p=document.createElement("span");p.className="cm-completionLabel";let{label:v}=n,S=0;for(let A=1;A<u.length;){let H=u[A++],X=u[A++];H>S&&p.appendChild(document.createTextNode(v.slice(S,H)));let Me=p.appendChild(document.createElement("span"));Me.appendChild(document.createTextNode(v.slice(H,X))),Me.className="cm-completionMatchedText",S=X}return S<v.length&&p.appendChild(document.createTextNode(v.slice(S))),p},position:50},{render(n){if(!n.detail)return null;let o=document.createElement("span");return o.className="cm-completionDetail",o.textContent=n.detail,o},position:80}),t.sort((n,o)=>n.position-o.position).map(n=>n.render)}function Sm(a,t,n){if(a<=n)return{from:0,to:a};if(t<0&&(t=0),t<=a>>1){let u=Math.floor(t/n);return{from:u*n,to:(u+1)*n}}let o=Math.floor((a-t)/n);return{from:a-(o+1)*n,to:a-o*n}}class Av{constructor(t,n){this.view=t,this.stateField=n,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:S=>this.positionInfo(S),key:this},this.space=null,this.currentClass="";let o=t.state.field(n),{options:u,selected:p}=o.open,v=t.state.facet(Ju);this.optionContent=Pv(v),this.optionClass=v.optionClass,this.tooltipClass=v.tooltipClass,this.range=Sm(u.length,p,v.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",S=>{for(let A=S.target,H;A&&A!=this.dom;A=A.parentNode)if(A.nodeName=="LI"&&(H=/-(\d+)$/.exec(A.id))&&+H[1]<u.length){xm(t,u[+H[1]]),S.preventDefault();return}}),this.list=this.dom.appendChild(this.createListBox(u,o.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})}mount(){this.updateSel()}update(t){var n,o,u;let p=t.state.field(this.stateField),v=t.startState.field(this.stateField);this.updateTooltipClass(t.state),p!=v&&(this.updateSel(),((n=p.open)===null||n===void 0?void 0:n.disabled)!=((o=v.open)===null||o===void 0?void 0:o.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((u=p.open)===null||u===void 0)&&u.disabled)))}updateTooltipClass(t){let n=this.tooltipClass(t);if(n!=this.currentClass){for(let o of this.currentClass.split(" "))o&&this.dom.classList.remove(o);for(let o of n.split(" "))o&&this.dom.classList.add(o);this.currentClass=n}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let t=this.view.state.field(this.stateField),n=t.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=Sm(n.options.length,n.selected,this.view.state.facet(Ju).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(n.options,t.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})),this.updateSelectedOption(n.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:o}=n.options[n.selected],{info:u}=o;if(!u)return;let p=typeof u=="string"?document.createTextNode(u):u(o);if(!p)return;"then"in p?p.then(v=>{v&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(v)}).catch(v=>Ls(this.view.state,v,"completion info")):this.addInfoPane(p)}}addInfoPane(t){let n=this.info=document.createElement("div");n.className="cm-tooltip cm-completionInfo",n.appendChild(t),this.dom.appendChild(n),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(t){let n=null;for(let o=this.list.firstChild,u=this.range.from;o;o=o.nextSibling,u++)u==t?o.hasAttribute("aria-selected")||(o.setAttribute("aria-selected","true"),n=o):o.hasAttribute("aria-selected")&&o.removeAttribute("aria-selected");return n&&Iv(this.list,n),n}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let n=this.dom.getBoundingClientRect(),o=this.info.getBoundingClientRect(),u=t.getBoundingClientRect(),p=this.space;if(!p){let un=this.dom.ownerDocument.defaultView||window;p={left:0,top:0,right:un.innerWidth,bottom:un.innerHeight}}if(u.top>Math.min(p.bottom,n.bottom)-10||u.bottom<Math.max(p.top,n.top)+10)return null;let v=this.view.textDirection==ts.RTL,S=v,A=!1,H,X="",Me="",gt=n.left-p.left,It=p.right-n.right;if(S&&gt<Math.min(o.width,It)?S=!1:!S&&It<Math.min(o.width,gt)&&(S=!0),o.width<=(S?gt:It))X=Math.max(p.top,Math.min(u.top,p.bottom-o.height))-n.top+"px",H=Math.min(400,S?gt:It)+"px";else{A=!0,H=Math.min(400,(v?n.right:p.right-n.left)-30)+"px";let un=p.bottom-n.bottom;un>=o.height||un>n.top?X=u.bottom-n.top+"px":Me=n.bottom-u.top+"px"}return{top:X,bottom:Me,maxWidth:H,class:A?v?"left-narrow":"right-narrow":S?"left":"right"}}positionInfo(t){this.info&&(t?(this.info.style.top=t.top,this.info.style.bottom=t.bottom,this.info.style.maxWidth=t.maxWidth,this.info.className="cm-tooltip cm-completionInfo cm-completionInfo-"+t.class):this.info.style.top="-1e6px")}createListBox(t,n,o){const u=document.createElement("ul");u.id=n,u.setAttribute("role","listbox"),u.setAttribute("aria-expanded","true"),u.setAttribute("aria-label",this.view.state.phrase("Completions"));for(let p=o.from;p<o.to;p++){let{completion:v,match:S}=t[p];const A=u.appendChild(document.createElement("li"));A.id=n+"-"+p,A.setAttribute("role","option");let H=this.optionClass(v);H&&(A.className=H);for(let X of this.optionContent){let Me=X(v,this.view.state,S);Me&&A.appendChild(Me)}}return o.from&&u.classList.add("cm-completionListIncompleteTop"),o.to<t.length&&u.classList.add("cm-completionListIncompleteBottom"),u}}function Rv(a){return t=>new Av(t,a)}function Iv(a,t){let n=a.getBoundingClientRect(),o=t.getBoundingClientRect();o.top<n.top?a.scrollTop-=n.top-o.top:o.bottom>n.bottom&&(a.scrollTop+=o.bottom-n.bottom)}function Om(a){return(a.boost||0)*100+(a.apply?10:0)+(a.info?5:0)+(a.type?1:0)}function _v(a,t){let n=[],o=0;for(let S of a)if(S.hasResult())if(S.result.filter===!1){let A=S.result.getMatch;for(let H of S.result.options){let X=[1e9-o++];if(A)for(let Me of A(H))X.push(Me);n.push(new Em(H,S,X))}}else{let A=new Dv(t.sliceDoc(S.from,S.to)),H;for(let X of S.result.options)(H=A.match(X.label))&&(X.boost!=null&&(H[0]+=X.boost),n.push(new Em(X,S,H)))}let u=[],p=null,v=t.facet(Ju).compareCompletions;for(let S of n.sort((A,H)=>H.match[0]-A.match[0]||v(A.completion,H.completion)))!p||p.label!=S.completion.label||p.detail!=S.completion.detail||p.type!=null&&S.completion.type!=null&&p.type!=S.completion.type||p.apply!=S.completion.apply?u.push(S):Om(S.completion)>Om(p)&&(u[u.length-1]=S),p=S.completion;return u}class xd{constructor(t,n,o,u,p,v){this.options=t,this.attrs=n,this.tooltip=o,this.timestamp=u,this.selected=p,this.disabled=v}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new xd(this.options,Tm(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,o,u,p){let v=_v(t,n);if(!v.length)return u&&t.some(A=>A.state==1)?new xd(u.options,u.attrs,u.tooltip,u.timestamp,u.selected,!0):null;let S=n.facet(Ju).selectOnOpen?0:-1;if(u&&u.selected!=S&&u.selected!=-1){let A=u.options[u.selected].completion;for(let H=0;H<v.length;H++)if(v[H].completion==A){S=H;break}}return new xd(v,Tm(o,S),{pos:t.reduce((A,H)=>H.hasResult()?Math.min(A,H.from):A,1e8),create:Rv(Nl),above:p.aboveCursor},u?u.timestamp:Date.now(),S,!1)}map(t){return new xd(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class ah{constructor(t,n,o){this.active=t,this.id=n,this.open=o}static start(){return new ah(Nv,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,o=n.facet(Ju),p=(o.override||n.languageDataAt("autocomplete",Yf(n)).map(wv)).map(S=>(this.active.find(H=>H.source==S)||new iu(S,this.active.some(H=>H.state!=0)?1:0)).update(t,o));p.length==this.active.length&&p.every((S,A)=>S==this.active[A])&&(p=this.active);let v=this.open;v&&t.docChanged&&(v=v.map(t.changes)),t.selection||p.some(S=>S.hasResult()&&t.changes.touchesRange(S.from,S.to))||!Lv(p,this.active)?v=xd.build(p,n,this.id,v,o):v&&v.disabled&&!p.some(S=>S.state==1)&&(v=null),!v&&p.every(S=>S.state!=1)&&p.some(S=>S.hasResult())&&(p=p.map(S=>S.hasResult()?new iu(S.source,0):S));for(let S of t.effects)S.is(Hh)&&(v=v&&v.setSelected(S.value,this.id));return p==this.active&&v==this.open?this:new ah(p,this.id,v)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:$v}}function Lv(a,t){if(a==t)return!0;for(let n=0,o=0;;){for(;n<a.length&&!a[n].hasResult;)n++;for(;o<t.length&&!t[o].hasResult;)o++;let u=n==a.length,p=o==t.length;if(u||p)return u==p;if(a[n++].result!=t[o++].result)return!1}}const $v={"aria-autocomplete":"list"};function Tm(a,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":a};return t>-1&&(n["aria-activedescendant"]=a+"-"+t),n}const Nv=[];function zh(a){return a.isUserEvent("input.type")?"input":a.isUserEvent("delete.backward")?"delete":null}class iu{constructor(t,n,o=-1){this.source=t,this.state=n,this.explicitPos=o}hasResult(){return!1}update(t,n){let o=zh(t),u=this;o?u=u.handleUserEvent(t,o,n):t.docChanged?u=u.handleChange(t):t.selection&&u.state!=0&&(u=new iu(u.source,0));for(let p of t.effects)if(p.is(Vh))u=new iu(u.source,1,p.value?Yf(t.state):-1);else if(p.is(lh))u=new iu(u.source,0);else if(p.is(wm))for(let v of p.value)v.source==u.source&&(u=v);return u}handleUserEvent(t,n,o){return n=="delete"||!o.activateOnTyping?this.map(t.changes):new iu(this.source,1)}handleChange(t){return t.changes.touchesRange(Yf(t.startState))?new iu(this.source,0):this.map(t.changes)}map(t){return t.empty||this.explicitPos<0?this:new iu(this.source,this.state,t.mapPos(this.explicitPos))}}class Ld extends iu{constructor(t,n,o,u,p){super(t,2,n),this.result=o,this.from=u,this.to=p}hasResult(){return!0}handleUserEvent(t,n,o){var u;let p=t.changes.mapPos(this.from),v=t.changes.mapPos(this.to,1),S=Yf(t.state);if((this.explicitPos<0?S<=p:S<this.from)||S>v||n=="delete"&&Yf(t.startState)==this.from)return new iu(this.source,n=="input"&&o.activateOnTyping?1:0);let A=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos),H;return Fv(this.result.validFor,t.state,p,v)?new Ld(this.source,A,this.result,p,v):this.result.update&&(H=this.result.update(this.result,p,v,new vm(t.state,S,A>=0)))?new Ld(this.source,A,H,H.from,(u=H.to)!==null&&u!==void 0?u:Yf(t.state)):new iu(this.source,1,A)}handleChange(t){return t.changes.touchesRange(this.from,this.to)?new iu(this.source,0):this.map(t.changes)}map(t){return t.empty?this:new Ld(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1))}}function Fv(a,t,n,o){if(!a)return!1;let u=t.sliceDoc(n,o);return typeof a=="function"?a(u,n,o,t):bm(a,!0).test(u)}const Vh=Et.define(),lh=Et.define(),wm=Et.define({map(a,t){return a.map(n=>n.map(t))}}),Hh=Et.define(),Nl=Ut.define({create(){return ah.start()},update(a,t){return a.update(t)},provide:a=>[Uu.from(a,t=>t.tooltip),Di.contentAttributes.from(a,t=>t.attrs)]});function uh(a,t="option"){return n=>{let o=n.state.field(Nl,!1);if(!o||!o.open||o.open.disabled||Date.now()-o.open.timestamp<n.state.facet(Ju).interactionDelay)return!1;let u=1,p;t=="page"&&(p=Ga(n,o.open.tooltip))&&(u=Math.max(2,Math.floor(p.dom.offsetHeight/p.dom.querySelector("li").offsetHeight)-1));let{length:v}=o.open.options,S=o.open.selected>-1?o.open.selected+u*(a?1:-1):a?0:v-1;return S<0?S=t=="page"?0:v-1:S>=v&&(S=t=="page"?v-1:0),n.dispatch({effects:Hh.of(S)}),!0}}const Bv=a=>{let t=a.state.field(Nl,!1);return a.state.readOnly||!t||!t.open||t.open.selected<0||Date.now()-t.open.timestamp<a.state.facet(Ju).interactionDelay?!1:(t.open.disabled||xm(a,t.open.options[t.open.selected]),!0)},kv=a=>a.state.field(Nl,!1)?(a.dispatch({effects:Vh.of(!0)}),!0):!1,jv=a=>{let t=a.state.field(Nl,!1);return!t||!t.active.some(n=>n.state!=0)?!1:(a.dispatch({effects:lh.of(null)}),!0)};class Uv{constructor(t,n){this.active=t,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Dm=50,Wv=50,zv=1e3,Vv=Wo.fromClass(class{constructor(a){this.view=a,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let t of a.state.field(Nl).active)t.state==1&&this.startQuery(t)}update(a){let t=a.state.field(Nl);if(!a.selectionSet&&!a.docChanged&&a.startState.field(Nl)==t)return;let n=a.transactions.some(o=>(o.selection||o.docChanged)&&!zh(o));for(let o=0;o<this.running.length;o++){let u=this.running[o];if(n||u.updates.length+a.transactions.length>Wv&&Date.now()-u.time>zv){for(let p of u.context.abortListeners)try{p()}catch(v){Ls(this.view.state,v)}u.context.abortListeners=null,this.running.splice(o--,1)}else u.updates.push(...a.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=t.active.some(o=>o.state==1&&!this.running.some(u=>u.active.source==o.source))?setTimeout(()=>this.startUpdate(),Dm):-1,this.composing!=0)for(let o of a.transactions)zh(o)=="input"?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:a}=this.view,t=a.field(Nl);for(let n of t.active)n.state==1&&!this.running.some(o=>o.active.source==n.source)&&this.startQuery(n)}startQuery(a){let{state:t}=this.view,n=Yf(t),o=new vm(t,n,a.explicitPos==n),u=new Uv(a,o);this.running.push(u),Promise.resolve(a.source(o)).then(p=>{u.context.aborted||(u.done=p||null,this.scheduleAccept())},p=>{this.view.dispatch({effects:lh.of(null)}),Ls(this.view.state,p)})}scheduleAccept(){this.running.every(a=>a.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),Dm))}accept(){var a;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(Ju);for(let o=0;o<this.running.length;o++){let u=this.running[o];if(u.done===void 0)continue;if(this.running.splice(o--,1),u.done){let v=new Ld(u.active.source,u.active.explicitPos,u.done,u.done.from,(a=u.done.to)!==null&&a!==void 0?a:Yf(u.updates.length?u.updates[0].startState:this.view.state));for(let S of u.updates)v=v.update(S,n);if(v.hasResult()){t.push(v);continue}}let p=this.view.state.field(Nl).active.find(v=>v.source==u.active.source);if(p&&p.state==1)if(u.done==null){let v=new iu(u.active.source,0);for(let S of u.updates)v=v.update(S,n);v.state!=1&&t.push(v)}else this.startQuery(p)}t.length&&this.view.dispatch({effects:wm.of(t)})}},{eventHandlers:{blur(){let a=this.view.state.field(Nl,!1);a&&a.tooltip&&this.view.state.facet(Ju).closeOnBlur&&this.view.dispatch({effects:lh.of(null)})},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Vh.of(!1)}),20),this.composing=0}}}),Pm=Di.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xB7\xB7\xB7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:`${400}px`,boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`${30}px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`${30}px`},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Hv{constructor(t,n,o,u){this.field=t,this.line=n,this.from=o,this.to=u}}class Zh{constructor(t,n,o){this.field=t,this.from=n,this.to=o}map(t){let n=t.mapPos(this.from,-1,MapMode.TrackDel),o=t.mapPos(this.to,1,MapMode.TrackDel);return n==null||o==null?null:new Zh(this.field,n,o)}}class Kh{constructor(t,n){this.lines=t,this.fieldPositions=n}instantiate(t,n){let o=[],u=[n],p=t.doc.lineAt(n),v=/^\s*/.exec(p.text)[0];for(let A of this.lines){if(o.length){let H=v,X=/^\t*/.exec(A)[0].length;for(let Me=0;Me<X;Me++)H+=t.facet(indentUnit);u.push(n+H.length-X),A=H+A.slice(X)}o.push(A),n+=A.length+1}let S=this.fieldPositions.map(A=>new Zh(A.field,u[A.line]+A.from,u[A.line]+A.to));return{text:o,ranges:S}}static parse(t){let n=[],o=[],u=[],p;for(let v of t.split(/\r\n?|\n/)){for(;p=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(v);){let S=p[1]?+p[1]:null,A=p[2]||p[3]||"",H=-1;for(let X=0;X<n.length;X++)(S!=null?n[X].seq==S:A&&n[X].name==A)&&(H=X);if(H<0){let X=0;for(;X<n.length&&(S==null||n[X].seq!=null&&n[X].seq<S);)X++;n.splice(X,0,{seq:S,name:A}),H=X;for(let Me of u)Me.field>=H&&Me.field++}u.push(new Hv(H,o.length,p.index,p.index+A.length)),v=v.slice(0,p.index)+A+v.slice(p.index+p[0].length)}for(let S;S=/\\([{}])/.exec(v);){v=v.slice(0,S.index)+S[1]+v.slice(S.index+S[0].length);for(let A of u)A.line==o.length&&A.from>S.index&&(A.from--,A.to--)}o.push(v)}return new Kh(o,u)}}let Zv=Lr.widget({widget:new class extends ba{toDOM(){let a=document.createElement("span");return a.className="cm-snippetFieldPosition",a}ignoreEvent(){return!1}}}),Kv=Lr.mark({class:"cm-snippetField"});class Cd{constructor(t,n){this.ranges=t,this.active=n,this.deco=Lr.set(t.map(o=>(o.from==o.to?Zv:Kv).range(o.from,o.to)))}map(t){let n=[];for(let o of this.ranges){let u=o.map(t);if(!u)return null;n.push(u)}return new Cd(n,this.active)}selectionInsideField(t){return t.ranges.every(n=>this.ranges.some(o=>o.field==this.active&&o.from<=n.from&&o.to>=n.to))}}const $d=Et.define({map(a,t){return a&&a.map(t)}}),Gv=Et.define(),Nd=Ut.define({create(){return null},update(a,t){for(let n of t.effects){if(n.is($d))return n.value;if(n.is(Gv)&&a)return new Cd(a.ranges,n.value)}return a&&t.docChanged&&(a=a.map(t.changes)),a&&t.selection&&!a.selectionInsideField(t.selection)&&(a=null),a},provide:a=>Di.decorations.from(a,t=>t?t.deco:Lr.none)});function Gh(a,t){return ue.create(a.filter(n=>n.field==t).map(n=>ue.range(n.from,n.to)))}function Yv(a){let t=Kh.parse(a);return(n,o,u,p)=>{let{text:v,ranges:S}=t.instantiate(n.state,u),A={changes:{from:u,to:p,insert:Text.of(v)},scrollIntoView:!0};if(S.length&&(A.selection=Gh(S,0)),S.length>1){let H=new Cd(S,0),X=A.effects=[$d.of(H)];n.state.field(Nd,!1)===void 0&&X.push(StateEffect.appendConfig.of([Nd,Jv,Xv,Pm]))}n.dispatch(n.state.update(A))}}function Am(a){return({state:t,dispatch:n})=>{let o=t.field(Nd,!1);if(!o||a<0&&o.active==0)return!1;let u=o.active+a,p=a>0&&!o.ranges.some(v=>v.field==u+a);return n(t.update({selection:Gh(o.ranges,u),effects:$d.of(p?null:new Cd(o.ranges,u))})),!0}}const Qv=[{key:"Tab",run:Am(1),shift:Am(-1)},{key:"Escape",run:({state:a,dispatch:t})=>a.field(Nd,!1)?(t(a.update({effects:$d.of(null)})),!0):!1}],Rm=ft.define({combine(a){return a.length?a[0]:Qv}}),Jv=xn.highest(Eu.compute([Rm],a=>a.facet(Rm)));function w1(a,t){return Object.assign(Object.assign({},t),{apply:Yv(a)})}const Xv=Di.domEventHandlers({mousedown(a,t){let n=t.state.field(Nd,!1),o;if(!n||(o=t.posAtCoords({x:a.clientX,y:a.clientY}))==null)return!1;let u=n.ranges.find(p=>p.from<=o&&p.to>=o);return!u||u.field==n.active?!1:(t.dispatch({selection:Gh(n.ranges,u.field),effects:$d.of(n.ranges.some(p=>p.field>u.field)?new Cd(n.ranges,u.field):null)}),!0)}});function qv(a){let t=a.replace(/[\\[.+*?(){|^$]/g,"\\$&");try{return new RegExp(`[\\p{Alphabetic}\\p{Number}_${t}]+`,"ug")}catch{return new RegExp(`[w${t}]`,"g")}}function Im(a,t){return new RegExp(t(a.source),a.unicode?"u":"")}const _m=null;function ey(a){return _m[a]||(_m[a]=new WeakMap)}function Lm(a,t,n,o,u){for(let p=a.iterLines(),v=0;!p.next().done;){let{value:S}=p,A;for(t.lastIndex=0;A=t.exec(S);)if(!o[A[0]]&&v+A.index!=u&&(n.push({type:"text",label:A[0]}),o[A[0]]=!0,n.length>=2e3))return;v+=S.length+1}}function $m(a,t,n,o,u){let p=a.length>=1e3,v=p&&t.get(a);if(v)return v;let S=[],A=Object.create(null);if(a.children){let H=0;for(let X of a.children){if(X.length>=1e3)for(let Me of $m(X,t,n,o-H,u-H))A[Me.label]||(A[Me.label]=!0,S.push(Me));else Lm(X,n,S,A,u-H);H+=X.length+1}}else Lm(a,n,S,A,u);return p&&S.length<2e3&&t.set(a,S),S}const D1=a=>{let t=a.state.languageDataAt("wordChars",a.pos).join(""),n=qv(t),o=a.matchBefore(Im(n,v=>v+"$"));if(!o&&!a.explicit)return null;let u=o?o.from:a.pos,p=$m(a.state.doc,ey(t),n,5e4,u);return{from:u,options:p,validFor:Im(n,v=>"^"+v)}},Fd={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ad=Et.define({map(a,t){let n=t.mapPos(a,-1,Jt.TrackAfter);return n??void 0}}),Yh=Et.define({map(a,t){return t.mapPos(a)}}),Qh=new class extends Bi{};Qh.startSide=1,Qh.endSide=-1;const Nm=Ut.define({create(){return hi.empty},update(a,t){if(t.selection){let n=t.state.doc.lineAt(t.selection.main.head).from,o=t.startState.doc.lineAt(t.startState.selection.main.head).from;n!=t.changes.mapPos(o,-1)&&(a=hi.empty)}a=a.map(t.changes);for(let n of t.effects)n.is(ad)?a=a.update({add:[Qh.range(n.value,n.value+1)]}):n.is(Yh)&&(a=a.update({filter:o=>o!=n.value}));return a}});function ty(){return[ry,Nm]}const Jh="()[]{}<>";function Fm(a){for(let t=0;t<Jh.length;t+=2)if(Jh.charCodeAt(t)==a)return Jh.charAt(t+1);return fn(a<128?a:a+1)}function Bm(a,t){return a.languageDataAt("closeBrackets",t)[0]||Fd}const ny=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),ry=Di.inputHandler.of((a,t,n,o)=>{if((ny?a.composing:a.compositionStarted)||a.state.readOnly)return!1;let u=a.state.selection.main;if(o.length>2||o.length==2&&qt(Rt(o,0))==1||t!=u.from||n!=u.to)return!1;let p=oy(a.state,o);return p?(a.dispatch(p),!0):!1}),iy=[{key:"Backspace",run:({state:a,dispatch:t})=>{if(a.readOnly)return!1;let o=Bm(a,a.selection.main.head).brackets||Fd.brackets,u=null,p=a.changeByRange(v=>{if(v.empty){let S=sy(a.doc,v.head);for(let A of o)if(A==S&&ch(a.doc,v.head)==Fm(Rt(A,0)))return{changes:{from:v.head-A.length,to:v.head+A.length},range:ue.cursor(v.head-A.length)}}return{range:u=v}});return u||t(a.update(p,{scrollIntoView:!0,userEvent:"delete.backward"})),!u}}];function oy(a,t){let n=Bm(a,a.selection.main.head),o=n.brackets||Fd.brackets;for(let u of o){let p=Fm(Rt(u,0));if(t==u)return p==u?uy(a,u,o.indexOf(u+u+u)>-1,n):ay(a,u,p,n.before||Fd.before);if(t==p&&km(a,a.selection.main.from))return ly(a,u,p)}return null}function km(a,t){let n=!1;return a.field(Nm).between(0,a.doc.length,o=>{o==t&&(n=!0)}),n}function ch(a,t){let n=a.sliceString(t,t+2);return n.slice(0,qt(Rt(n,0)))}function sy(a,t){let n=a.sliceString(t-2,t);return qt(Rt(n,0))==n.length?n:n.slice(1)}function ay(a,t,n,o){let u=null,p=a.changeByRange(v=>{if(!v.empty)return{changes:[{insert:t,from:v.from},{insert:n,from:v.to}],effects:ad.of(v.to+t.length),range:ue.range(v.anchor+t.length,v.head+t.length)};let S=ch(a.doc,v.head);return!S||/\s/.test(S)||o.indexOf(S)>-1?{changes:{insert:t+n,from:v.head},effects:ad.of(v.head+t.length),range:ue.cursor(v.head+t.length)}:{range:u=v}});return u?null:a.update(p,{scrollIntoView:!0,userEvent:"input.type"})}function ly(a,t,n){let o=null,u=a.selection.ranges.map(p=>p.empty&&ch(a.doc,p.head)==n?ue.cursor(p.head+n.length):o=p);return o?null:a.update({selection:ue.create(u,a.selection.mainIndex),scrollIntoView:!0,effects:a.selection.ranges.map(({from:p})=>Yh.of(p))})}function uy(a,t,n,o){let u=o.stringPrefixes||Fd.stringPrefixes,p=null,v=a.changeByRange(S=>{if(!S.empty)return{changes:[{insert:t,from:S.from},{insert:t,from:S.to}],effects:ad.of(S.to+t.length),range:ue.range(S.anchor+t.length,S.head+t.length)};let A=S.head,H=ch(a.doc,A),X;if(H==t){if(jm(a,A))return{changes:{insert:t+t,from:A},effects:ad.of(A+t.length),range:ue.cursor(A+t.length)};if(km(a,A)){let Me=n&&a.sliceDoc(A,A+t.length*3)==t+t+t;return{range:ue.cursor(A+t.length*(Me?3:1)),effects:Yh.of(A)}}}else{if(n&&a.sliceDoc(A-2*t.length,A)==t+t&&(X=Um(a,A-2*t.length,u))>-1&&jm(a,X))return{changes:{insert:t+t+t+t,from:A},effects:ad.of(A+t.length),range:ue.cursor(A+t.length)};if(a.charCategorizer(A)(H)!=qr.Word&&Um(a,A,u)>-1&&!cy(a,A,t,u))return{changes:{insert:t+t,from:A},effects:ad.of(A+t.length),range:ue.cursor(A+t.length)}}return{range:p=S}});return p?null:a.update(v,{scrollIntoView:!0,userEvent:"input.type"})}function jm(a,t){let n=Z(a).resolveInner(t+1);return n.parent&&n.from==t}function cy(a,t,n,o){let u=Z(a).resolveInner(t,-1),p=o.reduce((v,S)=>Math.max(v,S.length),0);for(let v=0;v<5;v++){let S=a.sliceDoc(u.from,Math.min(u.to,u.from+n.length+p)),A=S.indexOf(n);if(!A||A>-1&&o.indexOf(S.slice(0,A))>-1){let X=u.firstChild;for(;X&&X.from==u.from&&X.to-X.from>n.length+A;){if(a.sliceDoc(X.to-n.length,X.to)==n)return!1;X=X.firstChild}return!0}let H=u.to==t&&u.parent;if(!H)break;u=H}return!1}function Um(a,t,n){let o=a.charCategorizer(t);if(o(a.sliceDoc(t-1,t))!=qr.Word)return t;for(let u of n){let p=t-u.length;if(a.sliceDoc(p,t)==u&&o(a.sliceDoc(p-1,p))!=qr.Word)return p}return-1}function fy(a={}){return[Nl,Ju.of(a),Vv,dy,Pm]}const Wm=[{key:"Ctrl-Space",run:kv},{key:"Escape",run:jv},{key:"ArrowDown",run:uh(!0)},{key:"ArrowUp",run:uh(!1)},{key:"PageDown",run:uh(!0,"page")},{key:"PageUp",run:uh(!1,"page")},{key:"Enter",run:Bv}],dy=xn.highest(Eu.computeN([Ju],a=>a.facet(Ju).defaultKeymap?[Wm]:[]));function A1(a){let t=a.field(Nl,!1);return t&&t.active.some(n=>n.state==1)?"pending":t&&t.active.some(n=>n.state!=0)?"active":null}const zm=new WeakMap;function R1(a){var t;let n=(t=a.field(Nl,!1))===null||t===void 0?void 0:t.open;if(!n||n.disabled)return[];let o=zm.get(n.options);return o||zm.set(n.options,o=n.options.map(u=>u.completion)),o}function I1(a){var t;let n=(t=a.field(Nl,!1))===null||t===void 0?void 0:t.open;return n&&!n.disabled&&n.selected>=0?n.options[n.selected].completion:null}function _1(a){var t;let n=(t=a.field(Nl,!1))===null||t===void 0?void 0:t.open;return n&&!n.disabled&&n.selected>=0?n.selected:null}function L1(a){return Hh.of(a)}class hy{constructor(t,n,o){this.from=t,this.to=n,this.diagnostic=o}}class ld{constructor(t,n,o){this.diagnostics=t,this.panel=n,this.selected=o}static init(t,n,o){let u=t,p=o.facet(ud).markerFilter;p&&(u=p(u));let v=Lr.set(u.map(S=>S.from==S.to||S.from==S.to-1&&o.doc.lineAt(S.from).to==S.from?Lr.widget({widget:new Ey(S),diagnostic:S}).range(S.from):Lr.mark({attributes:{class:"cm-lintRange cm-lintRange-"+S.severity},diagnostic:S}).range(S.from,S.to)),!0);return new ld(v,n,Md(v))}}function Md(a,t=null,n=0){let o=null;return a.between(n,1e9,(u,p,{spec:v})=>{if(!(t&&v.diagnostic!=t))return o=new hy(u,p,v.diagnostic),!1}),o}function Vm(a,t){return!!(a.effects.some(n=>n.is(fh))||a.changes.touchesRange(t.pos))}function Hm(a,t){return a.field(Gl,!1)?t:t.concat(Et.appendConfig.of([Gl,Di.decorations.compute([Gl],n=>{let{selected:o,panel:u}=n.field(Gl);return!o||!u||o.from==o.to?Lr.none:Lr.set([my.range(o.from,o.to)])}),zs(gy,{hideOn:Vm}),by]))}function py(a,t){return{effects:Hm(a,[fh.of(t)])}}const fh=Et.define(),Xh=Et.define(),Zm=Et.define(),Gl=Ut.define({create(){return new ld(Lr.none,null,null)},update(a,t){if(t.docChanged){let n=a.diagnostics.map(t.changes),o=null;if(a.selected){let u=t.changes.mapPos(a.selected.from,1);o=Md(n,a.selected.diagnostic,u)||Md(n,null,u)}a=new ld(n,a.panel,o)}for(let n of t.effects)n.is(fh)?a=ld.init(n.value,a.panel,t.state):n.is(Xh)?a=new ld(a.diagnostics,n.value?dh.open:null,a.selected):n.is(Zm)&&(a=new ld(a.diagnostics,a.panel,n.value));return a},provide:a=>[pi.from(a,t=>t.panel),Di.decorations.from(a,t=>t.diagnostics)]});function $1(a){let t=a.field(Gl,!1);return t?t.diagnostics.size:0}const my=Lr.mark({class:"cm-lintRange cm-lintRange-active"});function gy(a,t,n){let{diagnostics:o}=a.state.field(Gl),u=[],p=2e8,v=0;o.between(t-(n<0?1:0),t+(n>0?1:0),(A,H,{spec:X})=>{t>=A&&t<=H&&(A==H||(t>A||n>0)&&(t<H||n<0))&&(u.push(X.diagnostic),p=Math.min(A,p),v=Math.max(H,v))});let S=a.state.facet(ud).tooltipFilter;return S&&(u=S(u)),u.length?{pos:p,end:v,above:a.state.doc.lineAt(p).to<v,create(){return{dom:Km(a,u)}}}:null}function Km(a,t){return js("ul",{class:"cm-tooltip-lint"},t.map(n=>Jm(a,n,!1)))}const vy=a=>{let t=a.state.field(Gl,!1);(!t||!t.panel)&&a.dispatch({effects:Hm(a.state,[Xh.of(!0)])});let n=gl(a,dh.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},Gm=a=>{let t=a.state.field(Gl,!1);return!t||!t.panel?!1:(a.dispatch({effects:Xh.of(!1)}),!0)},yy=[{key:"Mod-Shift-m",run:vy,preventDefault:!0},{key:"F8",run:a=>{let t=a.state.field(Gl,!1);if(!t)return!1;let n=a.state.selection.main,o=t.diagnostics.iter(n.to+1);return!o.value&&(o=t.diagnostics.iter(0),!o.value||o.from==n.from&&o.to==n.to)?!1:(a.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0}),!0)}}],Ym=Wo.fromClass(class{constructor(a){this.view=a,this.timeout=-1,this.set=!0;let{delay:t}=a.state.facet(ud);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){let a=Date.now();if(a<this.lintTime-10)setTimeout(this.run,this.lintTime-a);else{this.set=!1;let{state:t}=this.view,{sources:n}=t.facet(ud);Promise.all(n.map(o=>Promise.resolve(o(this.view)))).then(o=>{let u=o.reduce((p,v)=>p.concat(v));this.view.state.doc==t.doc&&this.view.dispatch(py(this.view.state,u))},o=>{Ls(this.view.state,o)})}}update(a){let t=a.state.facet(ud);(a.docChanged||t!=a.startState.facet(ud))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),ud=ft.define({combine(a){return Object.assign({sources:a.map(t=>t.source)},Vi(a.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null}))},enables:Ym});function F1(a,t={}){return ud.of({source:a,config:t})}function B1(a){let t=a.plugin(Ym);t&&t.force()}function Qm(a){let t=[];if(a)e:for(let{name:n}of a){for(let o=0;o<n.length;o++){let u=n[o];if(/[a-zA-Z]/.test(u)&&!t.some(p=>p.toLowerCase()==u.toLowerCase())){t.push(u);continue e}}t.push("")}return t}function Jm(a,t,n){var o;let u=n?Qm(t.actions):[];return js("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},js("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),(o=t.actions)===null||o===void 0?void 0:o.map((p,v)=>{let S=Me=>{Me.preventDefault();let gt=Md(a.state.field(Gl).diagnostics,t);gt&&p.apply(a,gt.from,gt.to)},{name:A}=p,H=u[v]?A.indexOf(u[v]):-1,X=H<0?A:[A.slice(0,H),js("u",A.slice(H,H+1)),A.slice(H+1)];return js("button",{type:"button",class:"cm-diagnosticAction",onclick:S,onmousedown:S,"aria-label":` Action: ${A}${H<0?"":` (access key "${u[v]})"`}.`},X)}),t.source&&js("div",{class:"cm-diagnosticSource"},t.source))}class Ey extends ba{constructor(t){super(),this.diagnostic=t}eq(t){return t.diagnostic==this.diagnostic}toDOM(){return js("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Xm{constructor(t,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Jm(t,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class dh{constructor(t){this.view=t,this.items=[];let n=u=>{if(u.keyCode==27)Gm(this.view),this.view.focus();else if(u.keyCode==38||u.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(u.keyCode==40||u.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(u.keyCode==36)this.moveSelection(0);else if(u.keyCode==35)this.moveSelection(this.items.length-1);else if(u.keyCode==13)this.view.focus();else if(u.keyCode>=65&&u.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:p}=this.items[this.selectedIndex],v=Qm(p.actions);for(let S=0;S<v.length;S++)if(v[S].toUpperCase().charCodeAt(0)==u.keyCode){let A=Md(this.view.state.field(Gl).diagnostics,p);A&&p.actions[S].apply(t,A.from,A.to)}}else return;u.preventDefault()},o=u=>{for(let p=0;p<this.items.length;p++)this.items[p].dom.contains(u.target)&&this.moveSelection(p)};this.list=js("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:o}),this.dom=js("div",{class:"cm-panel-lint"},this.list,js("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Gm(this.view)},"\xD7")),this.update()}get selectedIndex(){let t=this.view.state.field(Gl).selected;if(!t)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==t.diagnostic)return n;return-1}update(){let{diagnostics:t,selected:n}=this.view.state.field(Gl),o=0,u=!1,p=null;for(t.between(0,this.view.state.doc.length,(v,S,{spec:A})=>{let H=-1,X;for(let Me=o;Me<this.items.length;Me++)if(this.items[Me].diagnostic==A.diagnostic){H=Me;break}H<0?(X=new Xm(this.view,A.diagnostic),this.items.splice(o,0,X),u=!0):(X=this.items[H],H>o&&(this.items.splice(o,H-o),u=!0)),n&&X.diagnostic==n.diagnostic?X.dom.hasAttribute("aria-selected")||(X.dom.setAttribute("aria-selected","true"),p=X):X.dom.hasAttribute("aria-selected")&&X.dom.removeAttribute("aria-selected"),o++});o<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)u=!0,this.items.pop();this.items.length==0&&(this.items.push(new Xm(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),u=!0),p?(this.list.setAttribute("aria-activedescendant",p.id),this.view.requestMeasure({key:this,read:()=>({sel:p.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:v,panel:S})=>{v.top<S.top?this.list.scrollTop-=S.top-v.top:v.bottom>S.bottom&&(this.list.scrollTop+=v.bottom-S.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),u&&this.sync()}sync(){let t=this.list.firstChild;function n(){let o=t;t=o.nextSibling,o.remove()}for(let o of this.items)if(o.dom.parentNode==this.list){for(;t!=o.dom;)n();t=o.dom.nextSibling}else this.list.insertBefore(o.dom,t);for(;t;)n()}moveSelection(t){if(this.selectedIndex<0)return;let n=this.view.state.field(Gl),o=Md(n.diagnostics,this.items[t].diagnostic);o&&this.view.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0,effects:Zm.of(o)})}static open(t){return new dh(t)}}function hh(a,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(a)}</svg>')`}function qh(a){return hh(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${a}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const by=Di.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:qh("#d11")},".cm-lintRange-warning":{backgroundImage:qh("orange")},".cm-lintRange-info":{backgroundImage:qh("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});class xy extends Mi{constructor(t){super(),this.diagnostics=t,this.severity=t.reduce((n,o)=>{let u=o.severity;return u=="error"||u=="warning"&&n=="info"?u:n},"info")}toDOM(t){let n=document.createElement("div");n.className="cm-lint-marker cm-lint-marker-"+this.severity;let o=this.diagnostics,u=t.state.facet(ph).tooltipFilter;return u&&(o=u(o)),o.length&&(n.onmouseover=()=>My(t,n,o)),n}}function Cy(a,t){let n=o=>{let u=t.getBoundingClientRect();if(!(o.clientX>u.left-10&&o.clientX<u.right+10&&o.clientY>u.top-10&&o.clientY<u.bottom+10)){for(let p=o.target;p;p=p.parentNode)if(p.nodeType==1&&p.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",n),a.state.field(e0)&&a.dispatch({effects:ep.of(null)})}};window.addEventListener("mousemove",n)}function My(a,t,n){function o(){let v=a.elementAtHeight(t.getBoundingClientRect().top+5-a.documentTop);a.coordsAtPos(v.from)&&a.dispatch({effects:ep.of({pos:v.from,above:!1,create(){return{dom:Km(a,n),getCoords:()=>t.getBoundingClientRect()}}})}),t.onmouseout=t.onmousemove=null,Cy(a,t)}let{hoverTime:u}=a.state.facet(ph),p=setTimeout(o,u);t.onmouseout=()=>{clearTimeout(p),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(p),p=setTimeout(o,u)}}function Sy(a,t){let n=Object.create(null);for(let u of t){let p=a.lineAt(u.from);(n[p.from]||(n[p.from]=[])).push(u)}let o=[];for(let u in n)o.push(new xy(n[u]).range(+u));return hi.of(o,!0)}const Oy=os({class:"cm-gutter-lint",markers:a=>a.state.field(qm)}),qm=Ut.define({create(){return hi.empty},update(a,t){a=a.map(t.changes);let n=t.state.facet(ph).markerFilter;for(let o of t.effects)if(o.is(fh)){let u=o.value;n&&(u=n(u||[])),a=Sy(t.state.doc,u.slice(0))}return a}}),ep=Et.define(),e0=Ut.define({create(){return null},update(a,t){return a&&t.docChanged&&(a=Vm(t,a)?null:Object.assign(Object.assign({},a),{pos:t.changes.mapPos(a.pos)})),t.effects.reduce((n,o)=>o.is(ep)?o.value:n,a)},provide:a=>Uu.from(a)}),Ty=Di.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:hh('<path fill="#aaf" stroke="#77e" stroke-width="6" stroke-linejoin="round" d="M5 5L35 5L35 35L5 35Z"/>')},".cm-lint-marker-warning":{content:hh('<path fill="#fe8" stroke="#fd7" stroke-width="6" stroke-linejoin="round" d="M20 6L37 35L3 35Z"/>')},".cm-lint-marker-error":{content:hh('<circle cx="20" cy="20" r="15" fill="#f87" stroke="#f43" stroke-width="6"/>')}}),ph=ft.define({combine(a){return Vi(a,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function k1(a={}){return[ph.of(a),qm,Oy,Ty,e0]}function j1(a,t){let n=a.field(Gl,!1);if(n&&n.diagnostics.size)for(let o=RangeSet.iter([n.diagnostics]);o.value;o.next())t(o.value.spec.diagnostic,o.from,o.to)}var t0=function(t){t===void 0&&(t={});var n=[];t.closeBracketsKeymap!==!1&&(n=n.concat(iy)),t.defaultKeymap!==!1&&(n=n.concat(Yg)),t.searchKeymap!==!1&&(n=n.concat(bv)),t.historyKeymap!==!1&&(n=n.concat(ag)),t.foldKeymap!==!1&&(n=n.concat(Ui)),t.completionKeymap!==!1&&(n=n.concat(Wm)),t.lintKeymap!==!1&&(n=n.concat(yy));var o=[];return t.lineNumbers!==!1&&o.push(pd()),t.highlightActiveLineGutter!==!1&&o.push(Sc()),t.highlightSpecialChars!==!1&&o.push(ri()),t.history!==!1&&o.push(X0()),t.foldGutter!==!1&&o.push(yh()),t.drawSelection!==!1&&o.push(jf()),t.dropCursor!==!1&&o.push(nd()),t.allowMultipleSelections!==!1&&o.push(ui.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&o.push(c()),t.syntaxHighlighting!==!1&&o.push(ap(E0,{fallback:!0})),t.bracketMatching!==!1&&o.push(O0()),t.closeBrackets!==!1&&o.push(ty()),t.autocompletion!==!1&&o.push(fy()),t.rectangularSelection!==!1&&o.push(_l()),t.crosshairCursor!==!1&&o.push(Pf()),t.highlightActiveLine!==!1&&o.push(ws()),t.highlightSelectionMatches!==!1&&o.push(tv()),t.tabSize&&typeof t.tabSize=="number"&&o.push(Ai.of(" ".repeat(t.tabSize))),o.concat([Eu.of(n.flat())]).filter(Boolean)},U1=function(t){t===void 0&&(t={});var n=[];t.defaultKeymap!==!1&&(n=n.concat(defaultKeymap)),t.historyKeymap!==!1&&(n=n.concat(historyKeymap));var o=[];return t.highlightSpecialChars!==!1&&o.push(highlightSpecialChars()),t.history!==!1&&o.push(history()),t.drawSelection!==!1&&o.push(drawSelection()),t.syntaxHighlighting!==!1&&o.push(syntaxHighlighting(defaultHighlightStyle,{fallback:!0})),o.concat([keymap.of(n.flat())]).filter(Boolean)};const n0="#e5c07b",tp="#e06c75",r0="#56b6c2",i0="#ffffff",Bd="#abb2bf",mh="#7d8799",o0="#61afef",s0="#98c379",np="#d19a66",a0="#c678dd",l0="#21252b",rp="#2c313a",ip="#282c34",gh="#353a42",u0="#3E4451",op="#528bff",W1={chalky:n0,coral:tp,cyan:r0,invalid:i0,ivory:Bd,stone:mh,malibu:o0,sage:s0,whiskey:np,violet:a0,darkBackground:l0,highlightBackground:rp,background:ip,tooltipBackground:gh,selection:u0,cursor:op},wy=Di.theme({"&":{color:Bd,backgroundColor:ip},".cm-content":{caretColor:op},".cm-cursor, .cm-dropCursor":{borderLeftColor:op},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:u0},".cm-panels":{backgroundColor:l0,color:Bd},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847",outline:"1px solid #515a6b"},".cm-gutters":{backgroundColor:ip,color:mh,border:"none"},".cm-activeLineGutter":{backgroundColor:rp},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:gh},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:gh,borderBottomColor:gh},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:rp,color:Bd}}},{dark:!0}),Dy=Dd.define([{tag:Ke.keyword,color:a0},{tag:[Ke.name,Ke.deleted,Ke.character,Ke.propertyName,Ke.macroName],color:tp},{tag:[Ke.function(Ke.variableName),Ke.labelName],color:o0},{tag:[Ke.color,Ke.constant(Ke.name),Ke.standard(Ke.name)],color:np},{tag:[Ke.definition(Ke.name),Ke.separator],color:Bd},{tag:[Ke.typeName,Ke.className,Ke.number,Ke.changed,Ke.annotation,Ke.modifier,Ke.self,Ke.namespace],color:n0},{tag:[Ke.operator,Ke.operatorKeyword,Ke.url,Ke.escape,Ke.regexp,Ke.link,Ke.special(Ke.string)],color:r0},{tag:[Ke.meta,Ke.comment],color:mh},{tag:Ke.strong,fontWeight:"bold"},{tag:Ke.emphasis,fontStyle:"italic"},{tag:Ke.strikethrough,textDecoration:"line-through"},{tag:Ke.link,color:mh,textDecoration:"underline"},{tag:Ke.heading,fontWeight:"bold",color:tp},{tag:[Ke.atom,Ke.bool,Ke.special(Ke.variableName)],color:np},{tag:[Ke.processingInstruction,Ke.string,Ke.inserted],color:s0},{tag:Ke.invalid,color:i0}]),Py=[wy,ap(Dy)];var Ay=Di.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Ry=function(t){t===void 0&&(t={});var{indentWithTab:n=!0,editable:o=!0,readOnly:u=!1,theme:p="light",placeholder:v="",basicSetup:S=!0}=t,A=[];switch(n&&A.unshift(Eu.of([Qg])),S&&(typeof S=="boolean"?A.unshift(t0()):A.unshift(t0(S))),v&&A.unshift(Qo(v)),p){case"light":A.push(Ay);break;case"dark":A.push(Py);break;case"none":break;default:A.push(p);break}return o===!1&&A.push(Di.editable.of(!1)),u&&A.push(ui.readOnly.of(!0)),[...A]},Iy=a=>({line:a.state.doc.lineAt(a.state.selection.main.from),lineCount:a.state.doc.lines,lineBreak:a.state.lineBreak,length:a.state.doc.length,readOnly:a.state.readOnly,tabSize:a.state.tabSize,selection:a.state.selection,selectionAsSingle:a.state.selection.asSingle().main,ranges:a.state.selection.ranges,selectionCode:a.state.sliceDoc(a.state.selection.main.from,a.state.selection.main.to),selections:a.state.selection.ranges.map(t=>a.state.sliceDoc(t.from,t.to)),selectedText:a.state.selection.ranges.some(t=>!t.empty)}),c0=Xe.define(),_y=[];function f0(a){var{value:t,selection:n,onChange:o,onStatistics:u,onCreateEditor:p,onUpdate:v,extensions:S=_y,autoFocus:A,theme:H="light",height:X=null,minHeight:Me=null,maxHeight:gt=null,width:It=null,minWidth:un=null,maxWidth:or=null,placeholder:ar="",editable:wr=!0,readOnly:Si=!1,indentWithTab:ki=!0,basicSetup:mi=!0,root:Ci,initialState:Pi}=a,[Fi,To]=(0,f.useState)(),[eo,oo]=(0,f.useState)(),[Zo,Us]=(0,f.useState)(),oa=Di.theme({"&":{height:X,minHeight:Me,maxHeight:gt,width:It,minWidth:un,maxWidth:or},"& .cm-scroller":{height:"100% !important"}}),Qa=Di.updateListener.of(La=>{if(La.docChanged&&typeof o=="function"&&!La.transactions.some(Tc=>Tc.annotation(c0))){var aa=La.state.doc,Hs=aa.toString();o(Hs,La)}u&&u(Iy(La))}),yl=Ry({theme:H,editable:wr,readOnly:Si,placeholder:ar,indentWithTab:ki,basicSetup:mi}),sa=[Qa,oa,...yl];return v&&typeof v=="function"&&sa.push(Di.updateListener.of(v)),sa=sa.concat(S),(0,f.useEffect)(()=>{if(Fi&&!Zo){var La={doc:t,selection:n,extensions:sa},aa=Pi?ui.fromJSON(Pi.json,La,Pi.fields):ui.create(La);if(Us(aa),!eo){var Hs=new Di({state:aa,parent:Fi,root:Ci});oo(Hs),p&&p(Hs,aa)}}return()=>{eo&&(Us(void 0),oo(void 0))}},[Fi,Zo]),(0,f.useEffect)(()=>To(a.container),[a.container]),(0,f.useEffect)(()=>()=>{eo&&(eo.destroy(),oo(void 0))},[eo]),(0,f.useEffect)(()=>{A&&eo&&eo.focus()},[A,eo]),(0,f.useEffect)(()=>{eo&&eo.dispatch({effects:Et.reconfigure.of(sa)})},[H,S,X,Me,gt,It,un,or,ar,wr,Si,ki,mi,o,v]),(0,f.useEffect)(()=>{if(t!==void 0){var La=eo?eo.state.doc.toString():"";eo&&t!==La&&eo.dispatch({changes:{from:0,to:La.length,insert:t||""},annotations:[c0.of(!0)]})}},[t,eo]),{state:Zo,setState:Us,view:eo,setView:oo,container:Fi,setContainer:To}}var Ly=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],$y=(0,f.forwardRef)((a,t)=>{var{className:n,value:o="",selection:u,extensions:p=[],onChange:v,onStatistics:S,onCreateEditor:A,onUpdate:H,autoFocus:X,theme:Me="light",height:gt,minHeight:It,maxHeight:un,width:or,minWidth:ar,maxWidth:wr,basicSetup:Si,placeholder:ki,indentWithTab:mi,editable:Ci,readOnly:Pi,root:Fi,initialState:To}=a,eo=(0,U0.Z)(a,Ly),oo=(0,f.useRef)(null),{state:Zo,view:Us,container:oa}=f0({container:oo.current,root:Fi,value:o,autoFocus:X,theme:Me,height:gt,minHeight:It,maxHeight:un,width:or,minWidth:ar,maxWidth:wr,basicSetup:Si,placeholder:ki,indentWithTab:mi,editable:Ci,readOnly:Pi,selection:u,onChange:v,onStatistics:S,onCreateEditor:A,onUpdate:H,extensions:p,initialState:To});if((0,f.useImperativeHandle)(t,()=>({editor:oo.current,state:Zo,view:Us}),[oo,oa,Zo,Us]),typeof o!="string")throw new Error("value must be typeof string but got "+typeof o);var Qa=typeof Me=="string"?"cm-theme-"+Me:"cm-theme";return(0,l.jsx)("div",(0,j0.Z)({ref:oo,className:""+Qa+(n?" "+n:"")},eo))});$y.displayName="CodeMirror";var z1=null,Ny=i(8471);const d0=Et.define(),h0=Et.define(),Fy=Lr.mark({attributes:{style:"background-color: yellow; color: black"}}),By=Ut.define({create(){return Lr.none},update(a,t){return a=a.map(t.changes),t.effects.forEach(n=>{n.is(d0)?a=a.update({add:n.value,sort:!0}):n.is(h0)&&(a=a.update({filter:n.value}))}),a},provide:a=>Di.decorations.from(a)});var ky=i(78584),jy=i(750),p0=i(84642),Uy=i(99391),Wy=i(15667),zy=i(74925),Vy=i(59619);const Hy=(0,f.forwardRef)(({label:a,error:t,hint:n,labelAction:o,value:u="",required:p=!1,disabled:v=!1,onChange:S=()=>null,...A},H)=>{const X=(0,f.useRef)(),Me=(0,f.useRef)(),gt=(0,f.useRef)(),It=Boolean(t),un=Fi=>{const To=Me.current?.doc;if(To){const{text:eo,to:oo}=To.line(Fi),Zo=oo-eo.trimStart().length;oo>Zo&&gt.current?.dispatch({effects:d0.of([Fy.range(Zo,oo)])})}},or=()=>{const Fi=Me.current?.doc;if(Fi){const To=Fi.length||0;gt.current?.dispatch({effects:h0.of((eo,oo)=>oo<=0||eo>=To)})}},ar=({state:Fi,view:To})=>{gt.current=To,Me.current=Fi,or();const oo=N0()(To);oo.length&&un(Fi.doc.lineAt(oo[0].from).number)},wr=(Fi,To)=>{ar(To),S(Fi)},Si=(Fi,To)=>{gt.current=Fi,Me.current=To,ar({view:Fi,state:To})},{setContainer:ki,view:mi}=f0({value:u,onCreateEditor:Si,container:X.current,editable:!v,extensions:[k0(),By],onChange:wr,theme:"dark",basicSetup:{lineNumbers:!0,bracketMatching:!0,closeBrackets:!0,indentOnInput:!0,syntaxHighlighting:!0,highlightSelectionMatches:!0,tabSize:2}}),Ci=()=>{!v&&mi&&mi.focus()},Pi=(0,ky.e)(X,ki);return(0,f.useImperativeHandle)(H,()=>({...mi?.dom,focus(){mi&&mi.focus()},scrollIntoView(Fi){mi&&mi.dom.scrollIntoView(Fi)}}),[mi]),(0,l.jsx)(jy.g,{error:t,hint:n,required:p,children:(0,l.jsxs)(p0.k,{direction:"column",alignItems:"stretch",gap:1,children:[a&&(0,l.jsx)(Uy.Q,{onClick:Ci,action:o,children:a}),(0,l.jsx)(Zy,{ref:Pi,hasError:It,alignItems:"stretch",fontSize:2,hasRadius:!0,...A}),(0,l.jsx)(Wy.c,{}),(0,l.jsx)(zy.J,{})]})})}),Zy=(0,Ny.ZP)(p0.k)`
2200
2200
  line-height: ${({theme:a})=>a.lineHeights[2]};
2201
2201
 
2202
2202
  .cm-editor {