@dcl/builder-site 7.19.1 → 7.19.2

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 (79) hide show
  1. package/assets/{Back-BMwdG_lT.js → Back-FYhl4raf.js} +1 -1
  2. package/assets/{CollectionProvider.container-xB_bALqh.js → CollectionProvider.container-BjAE-QMl.js} +1 -1
  3. package/assets/{CollectionStatus.container-C7l-Mf8h.js → CollectionStatus.container-CP-quDcb.js} +1 -1
  4. package/assets/{ConfirmDelete-BH_e6gg4.js → ConfirmDelete-DIvOGz8z.js} +1 -1
  5. package/assets/{FileSaver.min-r4TCCEsP.js → FileSaver.min-CDQMoaWY.js} +1 -1
  6. package/assets/{ItemProvider.container-DA4IGB42.js → ItemProvider.container-C-q8vBW2.js} +2 -2
  7. package/assets/{JumpIn.container-ERAO0KCp.js → JumpIn.container-DvP7x37P.js} +1 -1
  8. package/assets/{LandAction-KRKWlXqA.js → LandAction-CiN-M5uK.js} +1 -1
  9. package/assets/{LandProviderPage-Dj9N_PW0.js → LandProviderPage-DoB5Gv7P.js} +1 -1
  10. package/assets/{LoggedInDetailPage.container-CCL2zROi.js → LoggedInDetailPage.container-DbQebeQd.js} +1 -1
  11. package/assets/{Navigation-dTmYCtuQ.css → Navigation-CNKrUZkJ.css} +1 -1
  12. package/assets/{Navigation.container-INpo5kYA.js → Navigation.container-xyyd5mUr.js} +1 -1
  13. package/assets/{NotFound-x8CcnrUa.js → NotFound-D_YPmEFv.js} +1 -1
  14. package/assets/{OptionsDropdown-CqY1_bRp.js → OptionsDropdown-qU-LlyWf.js} +1 -1
  15. package/assets/{RentalPeriod-DHBQzrUH.js → RentalPeriod-BkfdHTyn.js} +1 -1
  16. package/assets/{SDKTag-Bk1968iG.js → SDKTag-_Lrb2J6b.js} +1 -1
  17. package/assets/{SceneStats.container-B4m-rxBV.js → SceneStats.container-B-IU88XD.js} +1 -1
  18. package/assets/{SignInRequired-CLAy0k4a.js → SignInRequired-h6B_5gxX.js} +1 -1
  19. package/assets/{ThirdPartyKindBadge-Bk3h3U1H.js → ThirdPartyKindBadge-DRnNYgXw.js} +1 -1
  20. package/assets/{dataReader-BypJ7MqN.js → dataReader-txeTvc-E.js} +1 -1
  21. package/assets/{date-B6IQjUEa.js → date-g7oYcGu5.js} +1 -1
  22. package/assets/{fortmatic-DbmHuG9Y.js → fortmatic-Db80G_nJ.js} +1 -1
  23. package/assets/{hooks-BtT-ntFZ.js → hooks-Dnsfitqh.js} +1 -1
  24. package/assets/{index-DOMInmjC.js → index-02bGz8_X.js} +1 -1
  25. package/assets/{index-BxTWurZN.js → index-0tYm0-tC.js} +1 -1
  26. package/assets/{index-D4em5a_U.js → index-3Yt2UkyR.js} +1 -1
  27. package/assets/{index-Dir9OYFu.js → index-8jUqVFiR.js} +1 -1
  28. package/assets/{index-CwxR5FBz.js → index-9440G85o.js} +1 -1
  29. package/assets/{index-DeHyKo5N.js → index-B1kGOkeA.js} +1 -1
  30. package/assets/{index-D8smHxXz.js → index-B6_fsGNl.js} +22 -22
  31. package/assets/{index-ByR5uNwZ.js → index-BD7r5Ru1.js} +1 -1
  32. package/assets/{index-BdPPi0vu.js → index-BHyeJYr0.js} +1 -1
  33. package/assets/index-BPlMjB3x.js +1 -0
  34. package/assets/{index-Dsd4pmVH.js → index-BW5ztrtN.js} +1 -1
  35. package/assets/{index-D6jHeHbB.js → index-BWsA8LdK.js} +1 -1
  36. package/assets/{index-C01GmYwM.js → index-Bhgrqya3.js} +1 -1
  37. package/assets/{index-iKmYSUm5.js → index-BiX5eLsQ.js} +1 -1
  38. package/assets/{index-DsltaPem.css → index-BnBrzbF1.css} +1 -1
  39. package/assets/{index-f8CbEIiE.js → index-BqEvBLLe.js} +1 -1
  40. package/assets/{index-CtVcF_h8.js → index-C-JNWqGJ.js} +1 -1
  41. package/assets/{index-DssW62hZ.js → index-C0-xVtIE.js} +1 -1
  42. package/assets/{index-Dy6ETp8H.css → index-C4fgbHCD.css} +1 -1
  43. package/assets/index-CI-_sh3n.js +1 -0
  44. package/assets/{index-BMIo-0wx.js → index-CI53uhe2.js} +1 -1
  45. package/assets/{index-CBsZM1KU.js → index-CP4Whvdj.js} +1 -1
  46. package/assets/{index-BsnIKhOL.js → index-CWCbKyii.js} +1 -1
  47. package/assets/{index-BKQ5Z-iA.js → index-CXwOxmMQ.js} +1 -1
  48. package/assets/{index-DGX9S1FZ.js → index-CYdeqfX1.js} +1 -1
  49. package/assets/{index-W5a6Rz0m.js → index-C_2Rllw4.js} +1 -1
  50. package/assets/{index-BcfsbNoh.js → index-Cq7R0i-l.js} +1 -1
  51. package/assets/{index-oOujRQmu.css → index-D9H2_4Bx.css} +1 -1
  52. package/assets/{index-CO4Z_ALc.css → index-DHLedj2O.css} +1 -1
  53. package/assets/{index-DGfkFU_K.js → index-DJkh5DZF.js} +2 -2
  54. package/assets/{index-Dsu421SX.js → index-DNszyHgg.js} +1 -1
  55. package/assets/{index-DpgSilEx.css → index-DQS1K8pE.css} +1 -1
  56. package/assets/{index-DZdg_F1p.js → index-DVE_A0n8.js} +1 -1
  57. package/assets/{index-DtEmpDWK.js → index-DXfYJYmO.js} +1 -1
  58. package/assets/{index-DiKb2Kpq.css → index-DZd6mo4f.css} +1 -1
  59. package/assets/{index-Cqg2Cd0f.js → index-DdP6XPwR.js} +1 -1
  60. package/assets/{index-CLdLGQaI.js → index-DgNE9OPH.js} +1 -1
  61. package/assets/{index-I2DNBLlO.js → index-Din-Pjct.js} +1 -1
  62. package/assets/{index-BsWn9fbv.js → index-Dp8oluSx.js} +1 -1
  63. package/assets/{index-mdz1QZU1.js → index-DuOBLiI7.js} +1 -1
  64. package/assets/{index-C5AoilOF.js → index-JZckXaxx.js} +1 -1
  65. package/assets/index-KVwuyYon.js +1 -0
  66. package/assets/{index-BYMeE9bd.js → index-LnEBGawq.js} +1 -1
  67. package/assets/{index-Dywbkp8u.js → index-SFhmARlI.js} +1 -1
  68. package/assets/{index-B786w02A.js → index-V4kU507t.js} +1 -1
  69. package/assets/{index-tSmZits3.js → index-X97POTGB.js} +1 -1
  70. package/assets/{index-vjhVB9kz.js → index-eWx2LzjO.js} +1 -1
  71. package/assets/{index-JjJsMr7f.css → index-rt2YmuLS.css} +7 -7
  72. package/assets/{index-B27tP_PW.js → index-sm6I8sxr.js} +1 -1
  73. package/assets/{index.es-CkkaofOn.js → index.es-drZg1Jcm.js} +4 -4
  74. package/assets/{selectors-yGlOLvMK.js → selectors-BtqWSHNR.js} +1 -1
  75. package/index.html +3 -3
  76. package/package.json +3 -3
  77. package/assets/index-1jKUXbSR.js +0 -1
  78. package/assets/index-CkmQH8Fo.js +0 -1
  79. package/assets/index-D-juMjAC.js +0 -1
@@ -1 +1 @@
1
- var ue=Object.defineProperty;var he=(n,t,e)=>t in n?ue(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var v=(n,t,e)=>he(n,typeof t!="symbol"?t+"":t,e);import{c0 as x,c1 as b,cm as j,hU as ge,gD as T,gP as fe,a4 as me,J as A,hV as J,R as ve,N as o,M as c,S as l,dN as pe,e_ as K,bQ as V,T as re,aM as we,eD as Ce,a2 as Te,eF as xe,ak as _e,eG as O,b6 as be,hW as ye,eI as Ee,eL as De,ek as Oe,bd as Se,hX as Pe,ad as je,bq as $,hY as Me,eN as Ne,gG as Le,eQ as Ue,eU as ke,hZ as Re,eW as Ye,h_ as Ae}from"./index-D8smHxXz.js";import{d as Ie,e as We,c as Fe}from"./selectors-yGlOLvMK.js";import{N as Be}from"./NotFound-x8CcnrUa.js";import{L as He}from"./LoggedInDetailPage.container-CCL2zROi.js";import{N as qe}from"./Navigation.container-INpo5kYA.js";import{C as $e}from"./CollectionStatus.container-C7l-Mf8h.js";import{C as Ge,T as Qe}from"./ThirdPartyKindBadge-Bk3h3U1H.js";import{s as I,a as Ve}from"./date-B6IQjUEa.js";import{g as X,e as Xe,l as Je}from"./index-B786w02A.js";import"./SignInRequired-CLAy0k4a.js";function Ke(n,t){x(2,arguments);var e=b(n).getTime(),a=j(t);return new Date(e+a)}function Ze(n){return x(1,arguments),n instanceof Date||ge(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ze(n){if(x(1,arguments),!Ze(n)&&typeof n!="number")return!1;var t=b(n);return!isNaN(Number(t))}function et(n,t){x(2,arguments);var e=j(t);return Ke(n,-e)}var tt=864e5;function at(n){x(1,arguments);var t=b(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var a=t.getTime(),r=e-a;return Math.floor(r/tt)+1}function W(n){x(1,arguments);var t=1,e=b(n),a=e.getUTCDay(),r=(a<t?7:0)+a-t;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function ne(n){x(1,arguments);var t=b(n),e=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(e+1,0,4),a.setUTCHours(0,0,0,0);var r=W(a),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=W(i);return t.getTime()>=r.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function rt(n){x(1,arguments);var t=ne(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var a=W(e);return a}var nt=6048e5;function it(n){x(1,arguments);var t=b(n),e=W(t).getTime()-rt(t).getTime();return Math.round(e/nt)+1}function ie(n,t){var e,a,r,i,s,u,f,h;x(1,arguments);var p=b(n),w=p.getUTCFullYear(),g=X(),m=j((e=(a=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:g.firstWeekContainsDate)!==null&&a!==void 0?a:(f=g.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=new Date(0);_.setUTCFullYear(w+1,0,m),_.setUTCHours(0,0,0,0);var M=I(_,t),D=new Date(0);D.setUTCFullYear(w,0,m),D.setUTCHours(0,0,0,0);var B=I(D,t);return p.getTime()>=M.getTime()?w+1:p.getTime()>=B.getTime()?w:w-1}function ot(n,t){var e,a,r,i,s,u,f,h;x(1,arguments);var p=X(),w=j((e=(a=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:p.firstWeekContainsDate)!==null&&a!==void 0?a:(f=p.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&e!==void 0?e:1),g=ie(n,t),m=new Date(0);m.setUTCFullYear(g,0,w),m.setUTCHours(0,0,0,0);var _=I(m,t);return _}var st=6048e5;function lt(n,t){x(1,arguments);var e=b(n),a=I(e,t).getTime()-ot(e,t).getTime();return Math.round(a/st)+1}function d(n,t){for(var e=n<0?"-":"",a=Math.abs(n).toString();a.length<t;)a="0"+a;return e+a}var E={y:function(t,e){var a=t.getUTCFullYear(),r=a>0?a:1-a;return d(e==="yy"?r%100:r,e.length)},M:function(t,e){var a=t.getUTCMonth();return e==="M"?String(a+1):d(a+1,2)},d:function(t,e){return d(t.getUTCDate(),e.length)},a:function(t,e){var a=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h:function(t,e){return d(t.getUTCHours()%12||12,e.length)},H:function(t,e){return d(t.getUTCHours(),e.length)},m:function(t,e){return d(t.getUTCMinutes(),e.length)},s:function(t,e){return d(t.getUTCSeconds(),e.length)},S:function(t,e){var a=e.length,r=t.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,a-3));return d(i,e.length)}},P={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ct={G:function(t,e,a){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})}},y:function(t,e,a){if(e==="yo"){var r=t.getUTCFullYear(),i=r>0?r:1-r;return a.ordinalNumber(i,{unit:"year"})}return E.y(t,e)},Y:function(t,e,a,r){var i=ie(t,r),s=i>0?i:1-i;if(e==="YY"){var u=s%100;return d(u,2)}return e==="Yo"?a.ordinalNumber(s,{unit:"year"}):d(s,e.length)},R:function(t,e){var a=ne(t);return d(a,e.length)},u:function(t,e){var a=t.getUTCFullYear();return d(a,e.length)},Q:function(t,e,a){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return d(r,2);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,a){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return d(r,2);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,a){var r=t.getUTCMonth();switch(e){case"M":case"MM":return E.M(t,e);case"Mo":return a.ordinalNumber(r+1,{unit:"month"});case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,a){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return d(r+1,2);case"Lo":return a.ordinalNumber(r+1,{unit:"month"});case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,a,r){var i=lt(t,r);return e==="wo"?a.ordinalNumber(i,{unit:"week"}):d(i,e.length)},I:function(t,e,a){var r=it(t);return e==="Io"?a.ordinalNumber(r,{unit:"week"}):d(r,e.length)},d:function(t,e,a){return e==="do"?a.ordinalNumber(t.getUTCDate(),{unit:"date"}):E.d(t,e)},D:function(t,e,a){var r=at(t);return e==="Do"?a.ordinalNumber(r,{unit:"dayOfYear"}):d(r,e.length)},E:function(t,e,a){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,a,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return d(s,2);case"eo":return a.ordinalNumber(s,{unit:"day"});case"eee":return a.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(i,{width:"short",context:"formatting"});case"eeee":default:return a.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,a,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return d(s,e.length);case"co":return a.ordinalNumber(s,{unit:"day"});case"ccc":return a.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(i,{width:"narrow",context:"standalone"});case"cccccc":return a.day(i,{width:"short",context:"standalone"});case"cccc":default:return a.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,a){var r=t.getUTCDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return d(i,e.length);case"io":return a.ordinalNumber(i,{unit:"day"});case"iii":return a.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(r,{width:"short",context:"formatting"});case"iiii":default:return a.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,a){var r=t.getUTCHours(),i=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,a){var r=t.getUTCHours(),i;switch(r===12?i=P.noon:r===0?i=P.midnight:i=r/12>=1?"pm":"am",e){case"b":case"bb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,a){var r=t.getUTCHours(),i;switch(r>=17?i=P.evening:r>=12?i=P.afternoon:r>=4?i=P.morning:i=P.night,e){case"B":case"BB":case"BBB":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,a){if(e==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),a.ordinalNumber(r,{unit:"hour"})}return E.h(t,e)},H:function(t,e,a){return e==="Ho"?a.ordinalNumber(t.getUTCHours(),{unit:"hour"}):E.H(t,e)},K:function(t,e,a){var r=t.getUTCHours()%12;return e==="Ko"?a.ordinalNumber(r,{unit:"hour"}):d(r,e.length)},k:function(t,e,a){var r=t.getUTCHours();return r===0&&(r=24),e==="ko"?a.ordinalNumber(r,{unit:"hour"}):d(r,e.length)},m:function(t,e,a){return e==="mo"?a.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):E.m(t,e)},s:function(t,e,a){return e==="so"?a.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):E.s(t,e)},S:function(t,e){return E.S(t,e)},X:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return z(s);case"XXXX":case"XX":return S(s);case"XXXXX":case"XXX":default:return S(s,":")}},x:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"x":return z(s);case"xxxx":case"xx":return S(s);case"xxxxx":case"xxx":default:return S(s,":")}},O:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Z(s,":");case"OOOO":default:return"GMT"+S(s,":")}},z:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Z(s,":");case"zzzz":default:return"GMT"+S(s,":")}},t:function(t,e,a,r){var i=r._originalDate||t,s=Math.floor(i.getTime()/1e3);return d(s,e.length)},T:function(t,e,a,r){var i=r._originalDate||t,s=i.getTime();return d(s,e.length)}};function Z(n,t){var e=n>0?"-":"+",a=Math.abs(n),r=Math.floor(a/60),i=a%60;if(i===0)return e+String(r);var s=t;return e+String(r)+s+d(i,2)}function z(n,t){if(n%60===0){var e=n>0?"-":"+";return e+d(Math.abs(n)/60,2)}return S(n,t)}function S(n,t){var e=t||"",a=n>0?"-":"+",r=Math.abs(n),i=d(Math.floor(r/60),2),s=d(r%60,2);return a+i+e+s}var ee=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},oe=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},dt=function(t,e){var a=t.match(/(P+)(p+)?/)||[],r=a[1],i=a[2];if(!i)return ee(t,e);var s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",ee(r,e)).replace("{{time}}",oe(i,e))},ut={p:oe,P:dt},ht=["D","DD"],gt=["YY","YYYY"];function ft(n){return ht.indexOf(n)!==-1}function mt(n){return gt.indexOf(n)!==-1}function te(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var vt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wt=/^'([^]*?)'?$/,Ct=/''/g,Tt=/[a-zA-Z]/;function xt(n,t,e){var a,r,i,s,u,f,h,p,w,g,m,_,M,D;x(2,arguments);var B=String(t),N=X(),L=(a=(r=void 0)!==null&&r!==void 0?r:N.locale)!==null&&a!==void 0?a:Je,H=j((i=(s=(u=(f=void 0)!==null&&f!==void 0?f:void 0)!==null&&u!==void 0?u:N.firstWeekContainsDate)!==null&&s!==void 0?s:(h=N.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(H>=1&&H<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var q=j((w=(g=(m=(_=void 0)!==null&&_!==void 0?_:void 0)!==null&&m!==void 0?m:N.weekStartsOn)!==null&&g!==void 0?g:(M=N.locale)===null||M===void 0||(D=M.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&w!==void 0?w:0);if(!(q>=0&&q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!L.localize)throw new RangeError("locale must contain localize property");if(!L.formatLong)throw new RangeError("locale must contain formatLong property");var R=b(n);if(!ze(R))throw new RangeError("Invalid time value");var se=Xe(R),le=et(R,se),ce={firstWeekContainsDate:H,weekStartsOn:q,locale:L,_originalDate:R},de=B.match(pt).map(function(C){var y=C[0];if(y==="p"||y==="P"){var Y=ut[y];return Y(C,L.formatLong)}return C}).join("").match(vt).map(function(C){if(C==="''")return"'";var y=C[0];if(y==="'")return _t(C);var Y=ct[y];if(Y)return mt(C)&&te(C,t,String(n)),ft(C)&&te(C,t,String(n)),Y(le,C,L.localize,ce);if(y.match(Tt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return C}).join("");return de}function _t(n){var t=n.match(wt);return t?t[1].replace(Ct,"'"):n}const bt=(n,t)=>{if(n.isApproved){if(!t||t.status==="approved")return T.APPROVED;if(t.status==="rejected")return T.REJECTED}else{if(!t&&fe(n))return T.DISABLED;if(t&&t.status==="rejected")return T.REJECTED}return t&&t.status==="pending"&&t.assignee?T.UNDER_REVIEW:T.TO_REVIEW};function yt(n){const{collection:t,curation:e,address:a,itemCount:r,onOpenModal:i}=n,s=me(),u=A.useCallback(g=>{window.open(t.forumLink,"_blank"),g.preventDefault(),g.stopPropagation()},[t]),f=A.useCallback((g,m=J.SELF_ASSIGN)=>{i("EditCurationAssigneeModal",{collectionId:t.id,type:m}),g.preventDefault(),g.stopPropagation()},[i,t]),h=A.useCallback(()=>{s.push(ve.itemEditor({collectionId:t.id,isReviewing:"true"}))},[s,t]),p=A.useCallback(()=>{switch(bt(t,e)){case T.APPROVED:return o.jsxs("div",{className:"approved action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.approved")})," ",o.jsx(l.Icon,{name:"check"})]});case T.REJECTED:return o.jsxs("div",{className:"rejected action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.rejected")})," ",o.jsx(l.Icon,{name:"close"})]});case T.DISABLED:return o.jsxs("div",{className:"disabled action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.disabled")})," ",o.jsx(l.Icon,{name:"close"})]});case T.UNDER_REVIEW:return o.jsxs("span",{children:[" ",c("collection_row.under_review")]});case T.TO_REVIEW:return o.jsxs("span",{children:[" ",c("collection_row.to_review")]});default:return o.jsxs("span",{children:[" ",c("collection_row.to_review")]})}},[t,e]),w=new Date((e==null?void 0:e.createdAt)||t.createdAt);return o.jsxs(l.Table.Row,{className:"CollectionRow",onClick:h,children:[o.jsx(l.Table.Cell,{width:5,children:o.jsxs("div",{className:"image-column",children:[o.jsx(pe,{collectionId:t.id}),o.jsxs("div",{className:"info",children:[o.jsxs("div",{className:"title",children:[o.jsx($e,{collection:t}),t.name]}),o.jsx("div",{className:"subtitle name",children:c("collection_row.items",{count:r})})]})]})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx(Ge,{isThirdParty:K(t)})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx(Qe,{isProgrammatic:t.isProgrammatic})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{children:K(t)?"-":o.jsx(V,{textOnly:!0,address:t.owner})})}),o.jsx(l.Table.Cell,{width:3,children:o.jsxs("div",{title:xt(w,"d MMMM yyyy HH:mm"),children:[o.jsx("span",{children:c(e?"collection_row.review_request":"collection_row.published")})," ",Ve(w,{addSuffix:!0})]})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"actions text-centered",children:p()})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"edit-container",children:e!=null&&e.assignee?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"curator-name",children:[o.jsx(V,{textOnly:!0,address:e.assignee}),a===e.assignee?o.jsxs(o.Fragment,{children:[" (",c("collection_row.you"),")"]}):null," "]}),e.status!==T.APPROVED||!t.isApproved?o.jsx(l.Icon,{name:"pencil",onClick:g=>f(g,J.REASSIGN)}):null]}):o.jsxs("div",{className:"assignee-container",children:[c("collection_row.unassigned"),o.jsx("span",{className:"link",onClick:f,children:c("collection_row.assign_to_me")})]})})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"text-centered",children:t.forumLink?o.jsx("span",{className:"link",onClick:u,children:c("collection_row.link")}):c("collection_row.no_forum_post")})})]},t.id)}const Et=(n,t)=>({address:we(n),itemCount:Ce(n,t.collection.id)}),Dt=n=>({onOpenModal:(t,e)=>n(Te(t,e))}),Ot=re(Et,Dt)(yt);var F=(n=>(n.ALL_STATUS="ALL_STATUS",n))(F||{}),k=(n=>(n.ALL_TYPES="ALL_TYPES",n))(k||{});const U={...T,...F},ae={...xe,...k},G=12,Q="all";let St=class extends _e.PureComponent{constructor(){super(...arguments);v(this,"state",{sortBy:O.CREATED_AT_DESC,filterByStatus:F.ALL_STATUS,filterByTags:[],filterByType:k.ALL_TYPES,assignee:Q,searchText:"",page:1});v(this,"getFetchParams",e=>{const{assignee:a,filterByStatus:r,filterByType:i,page:s,searchText:u,sortBy:f,filterByTags:h}=this.state;return{page:s,limit:G,assignee:a!==Q?a:void 0,status:r!==F.ALL_STATUS?r:void 0,type:i!==k.ALL_TYPES?i:void 0,q:u||void 0,sort:f,tag:h.length>0?h:void 0,isPublished:!0,...e}});v(this,"fetchCollections",()=>{const{onFetchCollections:e}=this.props;e(this.getFetchParams())});v(this,"updateParam",e=>{this.setState(e,this.fetchCollections)});v(this,"handleSortChange",(e,{value:a})=>{this.updateParam({sortBy:a,page:1})});v(this,"handleStatusChange",(e,{value:a})=>{this.updateParam({filterByStatus:`${a}`,page:1})});v(this,"handleTypeChange",(e,{value:a})=>{this.updateParam({filterByType:`${a}`,page:1})});v(this,"handleAssigneeChange",(e,{value:a})=>{this.updateParam({assignee:`${a}`,page:1})});v(this,"handleSearchChange",e=>{const{searchText:a}=this.state;e!==a&&this.updateParam({searchText:e,page:1})});v(this,"handlePageChange",(e,a)=>{this.updateParam({page:+a.activePage})});v(this,"handleOnCampaignToggleChange",(e,a)=>{const{campaignTag:r}=this.props,{checked:i}=a;r&&(i?this.updateParam({filterByTags:[...this.state.filterByTags,r]}):this.updateParam({filterByTags:[...this.state.filterByTags.filter(s=>s!==r)]}))});v(this,"renderSortDropdown",()=>{const{sortBy:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:O.MOST_RELEVANT,text:c("curation_page.order.most_relevant")},{value:O.CREATED_AT_DESC,text:c("global.order.newest")},{value:O.NAME_ASC,text:c("global.order.name_asc")},{value:O.NAME_DESC,text:c("global.order.name_desc")}],onChange:this.handleSortChange})});v(this,"renderTypesFilterDropdown",()=>{const{filterByType:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:k.ALL_TYPES,text:c("curation_page.filter.all_types")},{value:ae.STANDARD,text:c("curation_page.filter.standard")},{value:ae.THIRD_PARTY,text:c("curation_page.filter.third_party")}],onChange:this.handleTypeChange})});v(this,"renderStatusFilterDropdown",()=>{const{filterByStatus:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:U.ALL_STATUS,text:c("curation_page.filter.all_status")},{value:U.UNDER_REVIEW,text:c("curation_page.filter.under_review")},{value:U.TO_REVIEW,text:c("curation_page.filter.to_review")},{value:U.APPROVED,text:c("curation_page.filter.approved")},{value:U.REJECTED,text:c("curation_page.filter.rejected")}],onChange:this.handleStatusChange})});v(this,"renderAssigneeFilterDropdown",()=>{const{committeeMembers:e,wallet:a}=this.props,{assignee:r}=this.state;return o.jsx(l.Dropdown,{className:"assignees",direction:"left",value:r,options:[{value:Q,text:c("curation_page.filter.all_assignees")},...e.reduce((i,s)=>(s===a.address?i.unshift(s):i.push(s),i),[]).map(i=>({value:i,text:o.jsx(V,{textOnly:!0,address:i})}))],onChange:this.handleAssigneeChange})});v(this,"renderCampaignFilterToggle",()=>{const{isCampaignEnabled:e,campaignName:a,campaignTag:r}=this.props,{filterByTags:i}=this.state;return e&&a&&r?o.jsx(l.Radio,{toggle:!0,className:"filterByCampaignTag",checked:i.includes(r),onChange:this.handleOnCampaignToggleChange,label:a}):null})}componentDidMount(){const{onFetchCollections:e,wallet:a,isLoadingCommittee:r,isCommitteeMember:i}=this.props;a&&!r&&i&&e({page:1,limit:G,isPublished:!0,sort:O.MOST_RELEVANT})}componentDidUpdate(e){const{onFetchCollections:a,wallet:r,isLoadingCommittee:i,isCommitteeMember:s}=this.props;r&&!i&&s&&e.isCommitteeMember!==s&&a({page:1,limit:G,isPublished:!0,sort:O.MOST_RELEVANT})}renderPage(){const{isLoadingCollectionsData:e,isLoadingCommittee:a,collections:r,curationsByCollectionId:i,paginationData:s}=this.props,{page:u,searchText:f}=this.state,h=s==null?void 0:s.total,p=s==null?void 0:s.totalPages,w=r,g=e||a||!s;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"filters",children:o.jsxs(l.Container,{children:[s?o.jsx(l.Row,{className:"text-filter-row",children:o.jsx(l.TextFilter,{placeholder:c("curation_page.search_placeholder"),value:f,onChange:this.handleSearchChange})}):null,o.jsxs(l.Row,{children:[o.jsx(l.Column,{grow:!1,shrink:!1,children:o.jsx(l.Row,{children:!e&&!!h&&h>0&&o.jsx(l.Header,{sub:!0,children:c("collections_page.results",{count:h})})})}),o.jsx(l.Column,{align:"right",shrink:!1,children:o.jsxs(l.Row,{children:[this.renderCampaignFilterToggle(),this.renderAssigneeFilterDropdown(),this.renderTypesFilterDropdown(),this.renderStatusFilterDropdown(),this.renderSortDropdown()]})})]})]})}),g?o.jsx(l.Loader,{active:!0,size:"large"}):o.jsxs(l.Container,{children:[o.jsxs(l.Section,{children:[o.jsx(l.Table,{basic:"very",children:r.length>0?o.jsxs(o.Fragment,{children:[o.jsx(l.Table.Header,{children:o.jsxs(l.Table.Row,{children:[o.jsx(l.Table.HeaderCell,{children:c("collection_row.collection")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.type")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.kind")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.owner")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.date")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.status")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.assignee")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.discussion")})]})}),o.jsx(l.Table.Body,{children:w.map(m=>o.jsx(Ot,{collection:m,curation:i[m.id]||null},m.id))})]}):null}),r.length===0?o.jsx(l.Empty,{height:200,children:o.jsx("div",{children:o.jsx(be,{id:"curation_page.empty_collections"})})}):null]}),!!p&&p>1&&o.jsx(l.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:p,activePage:u,onPageChange:this.handlePageChange})]})]})}render(){const{isCommitteeMember:e,isConnecting:a,isLoadingCommittee:r}=this.props,i=a||r;return o.jsx(He,{className:"CurationPage",activeTab:qe.CURATION,isLoading:i,children:e?this.renderPage():o.jsx(Be,{})})}};const Pt=n=>{var r;const t=ye(n),e=Ee(n),a=De(n);return{wallet:Oe(n),collections:e,paginationData:a,curationsByCollectionId:t,isCommitteeMember:Se(n),committeeMembers:Pe(n),isConnecting:je(n),isLoadingCommittee:$(Me(n),Re),isLoadingCollectionsData:$(Ne(n),Ye)||$(Le(n),Ae),isCampaignEnabled:Ue(n),campaignTag:Ie(n),campaignName:(r=We(n))==null?void 0:r[Fe(n)]}},jt=n=>({onFetchCollections:t=>n(ke(void 0,t))}),Ht=re(Pt,jt)(St);export{Ht as default};
1
+ var ue=Object.defineProperty;var he=(n,t,e)=>t in n?ue(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var v=(n,t,e)=>he(n,typeof t!="symbol"?t+"":t,e);import{c0 as x,c1 as b,cm as j,hU as ge,gD as T,gP as fe,a4 as me,J as A,hV as J,R as ve,N as o,M as c,S as l,dN as pe,e_ as K,bQ as V,T as re,aM as we,eD as Ce,a2 as Te,eF as xe,ak as _e,eG as O,b6 as be,hW as ye,eI as Ee,eL as De,ek as Oe,bd as Se,hX as Pe,ad as je,bq as $,hY as Me,eN as Ne,gG as Le,eQ as Ue,eU as ke,hZ as Re,eW as Ye,h_ as Ae}from"./index-B6_fsGNl.js";import{d as Ie,e as We,c as Fe}from"./selectors-BtqWSHNR.js";import{N as Be}from"./NotFound-D_YPmEFv.js";import{L as He}from"./LoggedInDetailPage.container-DbQebeQd.js";import{N as qe}from"./Navigation.container-xyyd5mUr.js";import{C as $e}from"./CollectionStatus.container-CP-quDcb.js";import{C as Ge,T as Qe}from"./ThirdPartyKindBadge-DRnNYgXw.js";import{s as I,a as Ve}from"./date-g7oYcGu5.js";import{g as X,e as Xe,l as Je}from"./index-V4kU507t.js";import"./SignInRequired-h6B_5gxX.js";function Ke(n,t){x(2,arguments);var e=b(n).getTime(),a=j(t);return new Date(e+a)}function Ze(n){return x(1,arguments),n instanceof Date||ge(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ze(n){if(x(1,arguments),!Ze(n)&&typeof n!="number")return!1;var t=b(n);return!isNaN(Number(t))}function et(n,t){x(2,arguments);var e=j(t);return Ke(n,-e)}var tt=864e5;function at(n){x(1,arguments);var t=b(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var a=t.getTime(),r=e-a;return Math.floor(r/tt)+1}function W(n){x(1,arguments);var t=1,e=b(n),a=e.getUTCDay(),r=(a<t?7:0)+a-t;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function ne(n){x(1,arguments);var t=b(n),e=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(e+1,0,4),a.setUTCHours(0,0,0,0);var r=W(a),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=W(i);return t.getTime()>=r.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function rt(n){x(1,arguments);var t=ne(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var a=W(e);return a}var nt=6048e5;function it(n){x(1,arguments);var t=b(n),e=W(t).getTime()-rt(t).getTime();return Math.round(e/nt)+1}function ie(n,t){var e,a,r,i,s,u,f,h;x(1,arguments);var p=b(n),w=p.getUTCFullYear(),g=X(),m=j((e=(a=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:g.firstWeekContainsDate)!==null&&a!==void 0?a:(f=g.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=new Date(0);_.setUTCFullYear(w+1,0,m),_.setUTCHours(0,0,0,0);var M=I(_,t),D=new Date(0);D.setUTCFullYear(w,0,m),D.setUTCHours(0,0,0,0);var B=I(D,t);return p.getTime()>=M.getTime()?w+1:p.getTime()>=B.getTime()?w:w-1}function ot(n,t){var e,a,r,i,s,u,f,h;x(1,arguments);var p=X(),w=j((e=(a=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:p.firstWeekContainsDate)!==null&&a!==void 0?a:(f=p.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&e!==void 0?e:1),g=ie(n,t),m=new Date(0);m.setUTCFullYear(g,0,w),m.setUTCHours(0,0,0,0);var _=I(m,t);return _}var st=6048e5;function lt(n,t){x(1,arguments);var e=b(n),a=I(e,t).getTime()-ot(e,t).getTime();return Math.round(a/st)+1}function d(n,t){for(var e=n<0?"-":"",a=Math.abs(n).toString();a.length<t;)a="0"+a;return e+a}var E={y:function(t,e){var a=t.getUTCFullYear(),r=a>0?a:1-a;return d(e==="yy"?r%100:r,e.length)},M:function(t,e){var a=t.getUTCMonth();return e==="M"?String(a+1):d(a+1,2)},d:function(t,e){return d(t.getUTCDate(),e.length)},a:function(t,e){var a=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h:function(t,e){return d(t.getUTCHours()%12||12,e.length)},H:function(t,e){return d(t.getUTCHours(),e.length)},m:function(t,e){return d(t.getUTCMinutes(),e.length)},s:function(t,e){return d(t.getUTCSeconds(),e.length)},S:function(t,e){var a=e.length,r=t.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,a-3));return d(i,e.length)}},P={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ct={G:function(t,e,a){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})}},y:function(t,e,a){if(e==="yo"){var r=t.getUTCFullYear(),i=r>0?r:1-r;return a.ordinalNumber(i,{unit:"year"})}return E.y(t,e)},Y:function(t,e,a,r){var i=ie(t,r),s=i>0?i:1-i;if(e==="YY"){var u=s%100;return d(u,2)}return e==="Yo"?a.ordinalNumber(s,{unit:"year"}):d(s,e.length)},R:function(t,e){var a=ne(t);return d(a,e.length)},u:function(t,e){var a=t.getUTCFullYear();return d(a,e.length)},Q:function(t,e,a){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return d(r,2);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,a){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return d(r,2);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,a){var r=t.getUTCMonth();switch(e){case"M":case"MM":return E.M(t,e);case"Mo":return a.ordinalNumber(r+1,{unit:"month"});case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,a){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return d(r+1,2);case"Lo":return a.ordinalNumber(r+1,{unit:"month"});case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,a,r){var i=lt(t,r);return e==="wo"?a.ordinalNumber(i,{unit:"week"}):d(i,e.length)},I:function(t,e,a){var r=it(t);return e==="Io"?a.ordinalNumber(r,{unit:"week"}):d(r,e.length)},d:function(t,e,a){return e==="do"?a.ordinalNumber(t.getUTCDate(),{unit:"date"}):E.d(t,e)},D:function(t,e,a){var r=at(t);return e==="Do"?a.ordinalNumber(r,{unit:"dayOfYear"}):d(r,e.length)},E:function(t,e,a){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,a,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return d(s,2);case"eo":return a.ordinalNumber(s,{unit:"day"});case"eee":return a.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(i,{width:"short",context:"formatting"});case"eeee":default:return a.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,a,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return d(s,e.length);case"co":return a.ordinalNumber(s,{unit:"day"});case"ccc":return a.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(i,{width:"narrow",context:"standalone"});case"cccccc":return a.day(i,{width:"short",context:"standalone"});case"cccc":default:return a.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,a){var r=t.getUTCDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return d(i,e.length);case"io":return a.ordinalNumber(i,{unit:"day"});case"iii":return a.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(r,{width:"short",context:"formatting"});case"iiii":default:return a.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,a){var r=t.getUTCHours(),i=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,a){var r=t.getUTCHours(),i;switch(r===12?i=P.noon:r===0?i=P.midnight:i=r/12>=1?"pm":"am",e){case"b":case"bb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,a){var r=t.getUTCHours(),i;switch(r>=17?i=P.evening:r>=12?i=P.afternoon:r>=4?i=P.morning:i=P.night,e){case"B":case"BB":case"BBB":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,a){if(e==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),a.ordinalNumber(r,{unit:"hour"})}return E.h(t,e)},H:function(t,e,a){return e==="Ho"?a.ordinalNumber(t.getUTCHours(),{unit:"hour"}):E.H(t,e)},K:function(t,e,a){var r=t.getUTCHours()%12;return e==="Ko"?a.ordinalNumber(r,{unit:"hour"}):d(r,e.length)},k:function(t,e,a){var r=t.getUTCHours();return r===0&&(r=24),e==="ko"?a.ordinalNumber(r,{unit:"hour"}):d(r,e.length)},m:function(t,e,a){return e==="mo"?a.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):E.m(t,e)},s:function(t,e,a){return e==="so"?a.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):E.s(t,e)},S:function(t,e){return E.S(t,e)},X:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return z(s);case"XXXX":case"XX":return S(s);case"XXXXX":case"XXX":default:return S(s,":")}},x:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"x":return z(s);case"xxxx":case"xx":return S(s);case"xxxxx":case"xxx":default:return S(s,":")}},O:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Z(s,":");case"OOOO":default:return"GMT"+S(s,":")}},z:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Z(s,":");case"zzzz":default:return"GMT"+S(s,":")}},t:function(t,e,a,r){var i=r._originalDate||t,s=Math.floor(i.getTime()/1e3);return d(s,e.length)},T:function(t,e,a,r){var i=r._originalDate||t,s=i.getTime();return d(s,e.length)}};function Z(n,t){var e=n>0?"-":"+",a=Math.abs(n),r=Math.floor(a/60),i=a%60;if(i===0)return e+String(r);var s=t;return e+String(r)+s+d(i,2)}function z(n,t){if(n%60===0){var e=n>0?"-":"+";return e+d(Math.abs(n)/60,2)}return S(n,t)}function S(n,t){var e=t||"",a=n>0?"-":"+",r=Math.abs(n),i=d(Math.floor(r/60),2),s=d(r%60,2);return a+i+e+s}var ee=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},oe=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},dt=function(t,e){var a=t.match(/(P+)(p+)?/)||[],r=a[1],i=a[2];if(!i)return ee(t,e);var s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",ee(r,e)).replace("{{time}}",oe(i,e))},ut={p:oe,P:dt},ht=["D","DD"],gt=["YY","YYYY"];function ft(n){return ht.indexOf(n)!==-1}function mt(n){return gt.indexOf(n)!==-1}function te(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var vt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wt=/^'([^]*?)'?$/,Ct=/''/g,Tt=/[a-zA-Z]/;function xt(n,t,e){var a,r,i,s,u,f,h,p,w,g,m,_,M,D;x(2,arguments);var B=String(t),N=X(),L=(a=(r=void 0)!==null&&r!==void 0?r:N.locale)!==null&&a!==void 0?a:Je,H=j((i=(s=(u=(f=void 0)!==null&&f!==void 0?f:void 0)!==null&&u!==void 0?u:N.firstWeekContainsDate)!==null&&s!==void 0?s:(h=N.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(H>=1&&H<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var q=j((w=(g=(m=(_=void 0)!==null&&_!==void 0?_:void 0)!==null&&m!==void 0?m:N.weekStartsOn)!==null&&g!==void 0?g:(M=N.locale)===null||M===void 0||(D=M.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&w!==void 0?w:0);if(!(q>=0&&q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!L.localize)throw new RangeError("locale must contain localize property");if(!L.formatLong)throw new RangeError("locale must contain formatLong property");var R=b(n);if(!ze(R))throw new RangeError("Invalid time value");var se=Xe(R),le=et(R,se),ce={firstWeekContainsDate:H,weekStartsOn:q,locale:L,_originalDate:R},de=B.match(pt).map(function(C){var y=C[0];if(y==="p"||y==="P"){var Y=ut[y];return Y(C,L.formatLong)}return C}).join("").match(vt).map(function(C){if(C==="''")return"'";var y=C[0];if(y==="'")return _t(C);var Y=ct[y];if(Y)return mt(C)&&te(C,t,String(n)),ft(C)&&te(C,t,String(n)),Y(le,C,L.localize,ce);if(y.match(Tt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return C}).join("");return de}function _t(n){var t=n.match(wt);return t?t[1].replace(Ct,"'"):n}const bt=(n,t)=>{if(n.isApproved){if(!t||t.status==="approved")return T.APPROVED;if(t.status==="rejected")return T.REJECTED}else{if(!t&&fe(n))return T.DISABLED;if(t&&t.status==="rejected")return T.REJECTED}return t&&t.status==="pending"&&t.assignee?T.UNDER_REVIEW:T.TO_REVIEW};function yt(n){const{collection:t,curation:e,address:a,itemCount:r,onOpenModal:i}=n,s=me(),u=A.useCallback(g=>{window.open(t.forumLink,"_blank"),g.preventDefault(),g.stopPropagation()},[t]),f=A.useCallback((g,m=J.SELF_ASSIGN)=>{i("EditCurationAssigneeModal",{collectionId:t.id,type:m}),g.preventDefault(),g.stopPropagation()},[i,t]),h=A.useCallback(()=>{s.push(ve.itemEditor({collectionId:t.id,isReviewing:"true"}))},[s,t]),p=A.useCallback(()=>{switch(bt(t,e)){case T.APPROVED:return o.jsxs("div",{className:"approved action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.approved")})," ",o.jsx(l.Icon,{name:"check"})]});case T.REJECTED:return o.jsxs("div",{className:"rejected action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.rejected")})," ",o.jsx(l.Icon,{name:"close"})]});case T.DISABLED:return o.jsxs("div",{className:"disabled action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.disabled")})," ",o.jsx(l.Icon,{name:"close"})]});case T.UNDER_REVIEW:return o.jsxs("span",{children:[" ",c("collection_row.under_review")]});case T.TO_REVIEW:return o.jsxs("span",{children:[" ",c("collection_row.to_review")]});default:return o.jsxs("span",{children:[" ",c("collection_row.to_review")]})}},[t,e]),w=new Date((e==null?void 0:e.createdAt)||t.createdAt);return o.jsxs(l.Table.Row,{className:"CollectionRow",onClick:h,children:[o.jsx(l.Table.Cell,{width:5,children:o.jsxs("div",{className:"image-column",children:[o.jsx(pe,{collectionId:t.id}),o.jsxs("div",{className:"info",children:[o.jsxs("div",{className:"title",children:[o.jsx($e,{collection:t}),t.name]}),o.jsx("div",{className:"subtitle name",children:c("collection_row.items",{count:r})})]})]})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx(Ge,{isThirdParty:K(t)})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx(Qe,{isProgrammatic:t.isProgrammatic})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{children:K(t)?"-":o.jsx(V,{textOnly:!0,address:t.owner})})}),o.jsx(l.Table.Cell,{width:3,children:o.jsxs("div",{title:xt(w,"d MMMM yyyy HH:mm"),children:[o.jsx("span",{children:c(e?"collection_row.review_request":"collection_row.published")})," ",Ve(w,{addSuffix:!0})]})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"actions text-centered",children:p()})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"edit-container",children:e!=null&&e.assignee?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"curator-name",children:[o.jsx(V,{textOnly:!0,address:e.assignee}),a===e.assignee?o.jsxs(o.Fragment,{children:[" (",c("collection_row.you"),")"]}):null," "]}),e.status!==T.APPROVED||!t.isApproved?o.jsx(l.Icon,{name:"pencil",onClick:g=>f(g,J.REASSIGN)}):null]}):o.jsxs("div",{className:"assignee-container",children:[c("collection_row.unassigned"),o.jsx("span",{className:"link",onClick:f,children:c("collection_row.assign_to_me")})]})})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"text-centered",children:t.forumLink?o.jsx("span",{className:"link",onClick:u,children:c("collection_row.link")}):c("collection_row.no_forum_post")})})]},t.id)}const Et=(n,t)=>({address:we(n),itemCount:Ce(n,t.collection.id)}),Dt=n=>({onOpenModal:(t,e)=>n(Te(t,e))}),Ot=re(Et,Dt)(yt);var F=(n=>(n.ALL_STATUS="ALL_STATUS",n))(F||{}),k=(n=>(n.ALL_TYPES="ALL_TYPES",n))(k||{});const U={...T,...F},ae={...xe,...k},G=12,Q="all";let St=class extends _e.PureComponent{constructor(){super(...arguments);v(this,"state",{sortBy:O.CREATED_AT_DESC,filterByStatus:F.ALL_STATUS,filterByTags:[],filterByType:k.ALL_TYPES,assignee:Q,searchText:"",page:1});v(this,"getFetchParams",e=>{const{assignee:a,filterByStatus:r,filterByType:i,page:s,searchText:u,sortBy:f,filterByTags:h}=this.state;return{page:s,limit:G,assignee:a!==Q?a:void 0,status:r!==F.ALL_STATUS?r:void 0,type:i!==k.ALL_TYPES?i:void 0,q:u||void 0,sort:f,tag:h.length>0?h:void 0,isPublished:!0,...e}});v(this,"fetchCollections",()=>{const{onFetchCollections:e}=this.props;e(this.getFetchParams())});v(this,"updateParam",e=>{this.setState(e,this.fetchCollections)});v(this,"handleSortChange",(e,{value:a})=>{this.updateParam({sortBy:a,page:1})});v(this,"handleStatusChange",(e,{value:a})=>{this.updateParam({filterByStatus:`${a}`,page:1})});v(this,"handleTypeChange",(e,{value:a})=>{this.updateParam({filterByType:`${a}`,page:1})});v(this,"handleAssigneeChange",(e,{value:a})=>{this.updateParam({assignee:`${a}`,page:1})});v(this,"handleSearchChange",e=>{const{searchText:a}=this.state;e!==a&&this.updateParam({searchText:e,page:1})});v(this,"handlePageChange",(e,a)=>{this.updateParam({page:+a.activePage})});v(this,"handleOnCampaignToggleChange",(e,a)=>{const{campaignTag:r}=this.props,{checked:i}=a;r&&(i?this.updateParam({filterByTags:[...this.state.filterByTags,r]}):this.updateParam({filterByTags:[...this.state.filterByTags.filter(s=>s!==r)]}))});v(this,"renderSortDropdown",()=>{const{sortBy:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:O.MOST_RELEVANT,text:c("curation_page.order.most_relevant")},{value:O.CREATED_AT_DESC,text:c("global.order.newest")},{value:O.NAME_ASC,text:c("global.order.name_asc")},{value:O.NAME_DESC,text:c("global.order.name_desc")}],onChange:this.handleSortChange})});v(this,"renderTypesFilterDropdown",()=>{const{filterByType:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:k.ALL_TYPES,text:c("curation_page.filter.all_types")},{value:ae.STANDARD,text:c("curation_page.filter.standard")},{value:ae.THIRD_PARTY,text:c("curation_page.filter.third_party")}],onChange:this.handleTypeChange})});v(this,"renderStatusFilterDropdown",()=>{const{filterByStatus:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:U.ALL_STATUS,text:c("curation_page.filter.all_status")},{value:U.UNDER_REVIEW,text:c("curation_page.filter.under_review")},{value:U.TO_REVIEW,text:c("curation_page.filter.to_review")},{value:U.APPROVED,text:c("curation_page.filter.approved")},{value:U.REJECTED,text:c("curation_page.filter.rejected")}],onChange:this.handleStatusChange})});v(this,"renderAssigneeFilterDropdown",()=>{const{committeeMembers:e,wallet:a}=this.props,{assignee:r}=this.state;return o.jsx(l.Dropdown,{className:"assignees",direction:"left",value:r,options:[{value:Q,text:c("curation_page.filter.all_assignees")},...e.reduce((i,s)=>(s===a.address?i.unshift(s):i.push(s),i),[]).map(i=>({value:i,text:o.jsx(V,{textOnly:!0,address:i})}))],onChange:this.handleAssigneeChange})});v(this,"renderCampaignFilterToggle",()=>{const{isCampaignEnabled:e,campaignName:a,campaignTag:r}=this.props,{filterByTags:i}=this.state;return e&&a&&r?o.jsx(l.Radio,{toggle:!0,className:"filterByCampaignTag",checked:i.includes(r),onChange:this.handleOnCampaignToggleChange,label:a}):null})}componentDidMount(){const{onFetchCollections:e,wallet:a,isLoadingCommittee:r,isCommitteeMember:i}=this.props;a&&!r&&i&&e({page:1,limit:G,isPublished:!0,sort:O.MOST_RELEVANT})}componentDidUpdate(e){const{onFetchCollections:a,wallet:r,isLoadingCommittee:i,isCommitteeMember:s}=this.props;r&&!i&&s&&e.isCommitteeMember!==s&&a({page:1,limit:G,isPublished:!0,sort:O.MOST_RELEVANT})}renderPage(){const{isLoadingCollectionsData:e,isLoadingCommittee:a,collections:r,curationsByCollectionId:i,paginationData:s}=this.props,{page:u,searchText:f}=this.state,h=s==null?void 0:s.total,p=s==null?void 0:s.totalPages,w=r,g=e||a||!s;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"filters",children:o.jsxs(l.Container,{children:[s?o.jsx(l.Row,{className:"text-filter-row",children:o.jsx(l.TextFilter,{placeholder:c("curation_page.search_placeholder"),value:f,onChange:this.handleSearchChange})}):null,o.jsxs(l.Row,{children:[o.jsx(l.Column,{grow:!1,shrink:!1,children:o.jsx(l.Row,{children:!e&&!!h&&h>0&&o.jsx(l.Header,{sub:!0,children:c("collections_page.results",{count:h})})})}),o.jsx(l.Column,{align:"right",shrink:!1,children:o.jsxs(l.Row,{children:[this.renderCampaignFilterToggle(),this.renderAssigneeFilterDropdown(),this.renderTypesFilterDropdown(),this.renderStatusFilterDropdown(),this.renderSortDropdown()]})})]})]})}),g?o.jsx(l.Loader,{active:!0,size:"large"}):o.jsxs(l.Container,{children:[o.jsxs(l.Section,{children:[o.jsx(l.Table,{basic:"very",children:r.length>0?o.jsxs(o.Fragment,{children:[o.jsx(l.Table.Header,{children:o.jsxs(l.Table.Row,{children:[o.jsx(l.Table.HeaderCell,{children:c("collection_row.collection")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.type")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.kind")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.owner")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.date")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.status")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.assignee")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.discussion")})]})}),o.jsx(l.Table.Body,{children:w.map(m=>o.jsx(Ot,{collection:m,curation:i[m.id]||null},m.id))})]}):null}),r.length===0?o.jsx(l.Empty,{height:200,children:o.jsx("div",{children:o.jsx(be,{id:"curation_page.empty_collections"})})}):null]}),!!p&&p>1&&o.jsx(l.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:p,activePage:u,onPageChange:this.handlePageChange})]})]})}render(){const{isCommitteeMember:e,isConnecting:a,isLoadingCommittee:r}=this.props,i=a||r;return o.jsx(He,{className:"CurationPage",activeTab:qe.CURATION,isLoading:i,children:e?this.renderPage():o.jsx(Be,{})})}};const Pt=n=>{var r;const t=ye(n),e=Ee(n),a=De(n);return{wallet:Oe(n),collections:e,paginationData:a,curationsByCollectionId:t,isCommitteeMember:Se(n),committeeMembers:Pe(n),isConnecting:je(n),isLoadingCommittee:$(Me(n),Re),isLoadingCollectionsData:$(Ne(n),Ye)||$(Le(n),Ae),isCampaignEnabled:Ue(n),campaignTag:Ie(n),campaignName:(r=We(n))==null?void 0:r[Fe(n)]}},jt=n=>({onFetchCollections:t=>n(ke(void 0,t))}),Ht=re(Pt,jt)(St);export{Ht as default};
@@ -1 +1 @@
1
- import{J as l,a4 as E,dG as w,R as I,bP as h,N as e,S as t,M as r,bO as T,T as y,dr as B,dw as H,ad as R,bq as O,cU as P,bY as A,ca as F,cX as z}from"./index-D8smHxXz.js";import{L as D}from"./LoggedInDetailPage.container-CCL2zROi.js";import{B as G}from"./Back-BMwdG_lT.js";import{N as M}from"./NotFound-x8CcnrUa.js";import"./Navigation.container-INpo5kYA.js";import"./selectors-yGlOLvMK.js";import"./SignInRequired-CLAy0k4a.js";function U(i){const[s,u]=l.useState(void 0),[g,L]=l.useState(void 0),{isLoading:b,ens:o,landTiles:c}=i,m=E(),x=l.useMemo(()=>{const a=Object.values(c||{});if(a.length===1)return a[0].land;let n;for(const d of a)if(d.land.id!==o.landId){n=d.land;break}return n},[c]);l.useEffect(()=>{!s&&!b&&o&&u(x)},[x]);const j=l.useCallback((a,n)=>{const d=h(a,n);return c&&d in c?c[d].land:void 0},[c]),f=l.useCallback((a,n)=>{const d=j(a,n);d&&u(d)},[]),S=l.useCallback(()=>{const a=w(c,s.id);u(a)},[s,c]),v=l.useCallback(()=>{s&&m.push(I.landAssignENS(s.id,o.subdomain))},[o,m,s]),C=l.useCallback((a,n)=>{const d=h(a,n);return(!s||s.id!==d)&&g===d},[]),_=l.useCallback((a,n)=>C(a,n)&&j(a,n)?{color:"#fcc6d1",scale:1.4}:null,[]),k=l.useCallback((a,n)=>{L(h(a,n))},[]),p=l.useCallback(()=>{m.goBack()},[m]),N=s&&o&&s.id===o.landId;return e.jsx(D,{className:"ENSSelectLandPage",hasNavigation:!1,children:b?e.jsx(t.Loader,{active:!0,size:"massive"}):o?e.jsxs(e.Fragment,{children:[e.jsx(G,{absolute:!0,onClick:p}),e.jsxs(t.Narrow,{children:[e.jsx(t.Row,{children:e.jsx(t.Column,{children:e.jsxs(t.Section,{children:[e.jsx(t.Header,{className:"title",size:"large",children:r("ens_select_land_page.title",{name:o?o.subdomain:r("global.name")})}),e.jsx("span",{className:"subtitle",children:r("ens_select_land_page.subtitle")})]})})}),e.jsx("div",{className:"atlas-wrapper",children:e.jsx(T,{showControls:!0,showOwner:!0,isDraggable:!0,landId:s?s.id:void 0,onClick:f,onHover:k,onLocateLand:S,layers:[_]})}),e.jsxs(t.Row,{className:"atlas-footer",children:[e.jsx(t.Column,{grow:!0,children:s?e.jsxs("div",{className:"selected-land",children:[e.jsx("div",{className:"label",children:r("ens_select_land_page.land_selected")}),e.jsxs("div",{className:"land",children:[s.name," (",s.id,")"]})]}):null}),e.jsx(t.Column,{grow:!1,children:e.jsxs("div",{className:"actions",children:[e.jsx(t.Button,{secondary:!0,onClick:p,children:r("global.cancel")}),e.jsx(t.Button,{primary:!0,disabled:!s||N,onClick:v,children:N?r("ens_select_land_page.already_assigned"):r("global.continue")})]})})]})]})]}):e.jsx(M,{})})}const q=(i,s)=>{const{subdomain:u}=s.match.params,g=B(i);return{ens:H(g,u),isLoading:R(i)||O(P(i),z)||A(i),landTiles:F(i)}},W=y(q)(U);export{W as default};
1
+ import{J as l,a4 as E,dG as w,R as I,bP as h,N as e,S as t,M as r,bO as T,T as y,dr as B,dw as H,ad as R,bq as O,cU as P,bY as A,ca as F,cX as z}from"./index-B6_fsGNl.js";import{L as D}from"./LoggedInDetailPage.container-DbQebeQd.js";import{B as G}from"./Back-FYhl4raf.js";import{N as M}from"./NotFound-D_YPmEFv.js";import"./Navigation.container-xyyd5mUr.js";import"./selectors-BtqWSHNR.js";import"./SignInRequired-h6B_5gxX.js";function U(i){const[s,u]=l.useState(void 0),[g,L]=l.useState(void 0),{isLoading:b,ens:o,landTiles:c}=i,m=E(),x=l.useMemo(()=>{const a=Object.values(c||{});if(a.length===1)return a[0].land;let n;for(const d of a)if(d.land.id!==o.landId){n=d.land;break}return n},[c]);l.useEffect(()=>{!s&&!b&&o&&u(x)},[x]);const j=l.useCallback((a,n)=>{const d=h(a,n);return c&&d in c?c[d].land:void 0},[c]),f=l.useCallback((a,n)=>{const d=j(a,n);d&&u(d)},[]),S=l.useCallback(()=>{const a=w(c,s.id);u(a)},[s,c]),v=l.useCallback(()=>{s&&m.push(I.landAssignENS(s.id,o.subdomain))},[o,m,s]),C=l.useCallback((a,n)=>{const d=h(a,n);return(!s||s.id!==d)&&g===d},[]),_=l.useCallback((a,n)=>C(a,n)&&j(a,n)?{color:"#fcc6d1",scale:1.4}:null,[]),k=l.useCallback((a,n)=>{L(h(a,n))},[]),p=l.useCallback(()=>{m.goBack()},[m]),N=s&&o&&s.id===o.landId;return e.jsx(D,{className:"ENSSelectLandPage",hasNavigation:!1,children:b?e.jsx(t.Loader,{active:!0,size:"massive"}):o?e.jsxs(e.Fragment,{children:[e.jsx(G,{absolute:!0,onClick:p}),e.jsxs(t.Narrow,{children:[e.jsx(t.Row,{children:e.jsx(t.Column,{children:e.jsxs(t.Section,{children:[e.jsx(t.Header,{className:"title",size:"large",children:r("ens_select_land_page.title",{name:o?o.subdomain:r("global.name")})}),e.jsx("span",{className:"subtitle",children:r("ens_select_land_page.subtitle")})]})})}),e.jsx("div",{className:"atlas-wrapper",children:e.jsx(T,{showControls:!0,showOwner:!0,isDraggable:!0,landId:s?s.id:void 0,onClick:f,onHover:k,onLocateLand:S,layers:[_]})}),e.jsxs(t.Row,{className:"atlas-footer",children:[e.jsx(t.Column,{grow:!0,children:s?e.jsxs("div",{className:"selected-land",children:[e.jsx("div",{className:"label",children:r("ens_select_land_page.land_selected")}),e.jsxs("div",{className:"land",children:[s.name," (",s.id,")"]})]}):null}),e.jsx(t.Column,{grow:!1,children:e.jsxs("div",{className:"actions",children:[e.jsx(t.Button,{secondary:!0,onClick:p,children:r("global.cancel")}),e.jsx(t.Button,{primary:!0,disabled:!s||N,onClick:v,children:N?r("ens_select_land_page.already_assigned"):r("global.continue")})]})})]})]})]}):e.jsx(M,{})})}const q=(i,s)=>{const{subdomain:u}=s.match.params,g=B(i);return{ens:H(g,u),isLoading:R(i)||O(P(i),z)||A(i),landTiles:F(i)}},W=y(q)(U);export{W as default};
@@ -1 +1 @@
1
- ._image_142g7_1,._main_142g7_2{position:relative;width:64px;height:64px;border-radius:50%!important}._image_142g7_1{overflow:hidden}._network_142g7_13{position:absolute;bottom:0;right:0;width:32px;height:32px;z-index:1}._ellipsis_4huv2_1{margin:auto!important;color:var(--primary-text)}._itemImage_1y9df_1{min-width:64px;max-width:64px;height:64px;padding:5px;margin-left:18px;margin-right:24px}._itemStatus_1y9df_10{margin-right:4px}._grid_1y9df_14{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider)}._grid_1y9df_14:hover{background-color:#24212966;color:var(--text)}._row_1y9df_25{align-items:center!important;font-size:15px}._column_1y9df_30{display:flex!important}._statusColumn_1y9df_34{font-size:13px;text-transform:uppercase}._statusColumn_1y9df_34._synced_1y9df_39{color:#34ce76}._statusColumn_1y9df_34._unsynced_1y9df_43{color:#fc9965}._avatarColumn_1y9df_47{align-items:center;padding-left:10px!important}._nameWrapper_1y9df_52{display:flex;align-items:center;overflow:hidden}._name_1y9df_52{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._itemActions_1y9df_65{display:flex;align-items:center;justify-content:flex-end;width:100%}._action_1y9df_72{margin-left:5px}._status_rgxu1_1{text-transform:uppercase;padding:4px 8px;border-radius:32px;display:inline-flex;align-items:center;gap:4px}._status_rgxu1_1 .icon{height:18px}._pending_migration_rgxu1_14{color:#ffbc5b;background-color:#ffbc5b33}._synced_rgxu1_19{color:#65d890;background-color:#65d89033}._unpublished_rgxu1_24,._unsynced_rgxu1_25{color:#63b4f6;background-color:#63b4f633}._pending_mapping_rgxu1_30,._under_review_rgxu1_31{color:#ecebed;background-color:#ecebed33}._icon_rgxu1_10{width:17px;height:17px}._itemImage_1rili_1{min-width:64px;max-width:64px;height:64px;padding:5px;margin-left:18px;margin-right:24px}._itemStatus_1rili_10{margin-right:4px}._grid_1rili_14{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider);position:relative}._grid_1rili_14:not(._loading_1rili_21):hover{background-color:#24212966;color:var(--text)}._row_1rili_26{align-items:center!important;font-size:15px}._column_1rili_31{display:flex!important}._avatarColumn_1rili_35{align-items:center;padding-left:10px!important}._nameWrapper_1rili_40{display:flex;align-items:center;overflow:hidden}._name_1rili_40{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._itemActions_1rili_53{display:flex;align-items:center;justify-content:flex-end;width:100%}._action_1rili_60{margin-left:5px}._overlay_1rili_65{position:absolute;pointer-events:none;z-index:100000000;top:0;left:0;width:100%;height:100%;background-color:#00000046;z-index:1000;display:flex;justify-content:center;align-items:center}._itemCheckbox_2k9qa_1{margin-right:10px}._gridHeader_2k9qa_5.ui.grid{border-bottom:1px solid var(--divider);padding-bottom:10px;color:var(--secondary-text)}._gridHeader_2k9qa_5.ui.grid>.row>.column:first-child{padding-left:10px}._gridHeader_2k9qa_5.ui.grid>.row>.column._itemColumn_2k9qa_15{display:flex;align-items:center}._gridHeader_4acv6_1.ui.grid{border-bottom:1px solid var(--divider);padding-bottom:10px;color:var(--secondary-text)}._gridHeader_4acv6_1.ui.grid>.row>.column:first-child{padding-left:10px}._gridHeader_4acv6_1.ui.grid>.row>.column._itemColumn_4acv6_11{display:flex;align-items:center}._itemCheckbox_4acv6_16{margin-right:10px}._linkedToColumn_4acv6_20>span{margin-right:6px}._main_16i8r_3,._main_16i8r_3>.ui.container{display:flex;flex-direction:column;min-height:0;flex:1}._slots_16i8r_11{font-weight:700;text-transform:uppercase;position:relative}._slots_16i8r_11:before{content:"";display:inline-block;background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%202C4%203.10457%203.10457%204%202%204C0.89543%204%200%203.10457%200%202C0%200.89543%200.89543%200%202%200C3.10457%200%204%200.89543%204%202Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%208C4%209.10457%203.10457%2010%202%2010C0.89543%2010%200%209.10457%200%208C0%206.89543%200.89543%206%202%206C3.10457%206%204%206.89543%204%208Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%2014C4%2015.1046%203.10457%2016%202%2016C0.89543%2016%200%2015.1046%200%2014C0%2012.8954%200.89543%2012%202%2012C3.10457%2012%204%2012.8954%204%2014Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%202C10%203.10457%209.10457%204%208%204C6.89543%204%206%203.10457%206%202C6%200.89543%206.89543%200%208%200C9.10457%200%2010%200.89543%2010%202Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%208C10%209.10457%209.10457%2010%208%2010C6.89543%2010%206%209.10457%206%208C6%206.89543%206.89543%206%208%206C9.10457%206%2010%206.89543%2010%208Z'%20fill='%23FF2D55'/%3e%3cpath%20d='M8%2015.5C8.82843%2015.5%209.5%2014.8284%209.5%2014C9.5%2013.1716%208.82843%2012.5%208%2012.5C7.17157%2012.5%206.5%2013.1716%206.5%2014C6.5%2014.8284%207.17157%2015.5%208%2015.5Z'%20stroke='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16%202C16%203.10457%2015.1046%204%2014%204C12.8954%204%2012%203.10457%2012%202C12%200.89543%2012.8954%200%2014%200C15.1046%200%2016%200.89543%2016%202Z'%20fill='%23FF2D55'/%3e%3cpath%20d='M14%209.5C14.8284%209.5%2015.5%208.82843%2015.5%208C15.5%207.17157%2014.8284%206.5%2014%206.5C13.1716%206.5%2012.5%207.17157%2012.5%208C12.5%208.82843%2013.1716%209.5%2014%209.5Z'%20stroke='%23FF2D55'/%3e%3cpath%20d='M14%2015.5C14.8284%2015.5%2015.5%2014.8284%2015.5%2014C15.5%2013.1716%2014.8284%2012.5%2014%2012.5C13.1716%2012.5%2012.5%2013.1716%2012.5%2014C12.5%2014.8284%2013.1716%2015.5%2014%2015.5Z'%20stroke='%23FF2D55'/%3e%3c/svg%3e");width:16px;height:16px;top:3px;position:relative;margin-right:8px}.button._slots_16i8r_11._empty_16i8r_28:before{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%202C4%203.10457%203.10457%204%202%204C0.89543%204%200%203.10457%200%202C0%200.89543%200.89543%200%202%200C3.10457%200%204%200.89543%204%202Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%208C4%209.10457%203.10457%2010%202%2010C0.89543%2010%200%209.10457%200%208C0%206.89543%200.89543%206%202%206C3.10457%206%204%206.89543%204%208Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%2014C4%2015.1046%203.10457%2016%202%2016C0.89543%2016%200%2015.1046%200%2014C0%2012.8954%200.89543%2012%202%2012C3.10457%2012%204%2012.8954%204%2014Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%202C10%203.10457%209.10457%204%208%204C6.89543%204%206%203.10457%206%202C6%200.89543%206.89543%200%208%200C9.10457%200%2010%200.89543%2010%202Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%208C10%209.10457%209.10457%2010%208%2010C6.89543%2010%206%209.10457%206%208C6%206.89543%206.89543%206%208%206C9.10457%206%2010%206.89543%2010%208Z'%20fill='%23736E7D'/%3e%3cpath%20d='M8%2015.5C8.82843%2015.5%209.5%2014.8284%209.5%2014C9.5%2013.1716%208.82843%2012.5%208%2012.5C7.17157%2012.5%206.5%2013.1716%206.5%2014C6.5%2014.8284%207.17157%2015.5%208%2015.5Z'%20stroke='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16%202C16%203.10457%2015.1046%204%2014%204C12.8954%204%2012%203.10457%2012%202C12%200.89543%2012.8954%200%2014%200C15.1046%200%2016%200.89543%2016%202Z'%20fill='%23736E7D'/%3e%3cpath%20d='M14%209.5C14.8284%209.5%2015.5%208.82843%2015.5%208C15.5%207.17157%2014.8284%206.5%2014%206.5C13.1716%206.5%2012.5%207.17157%2012.5%208C12.5%208.82843%2013.1716%209.5%2014%209.5Z'%20stroke='%23736E7D'/%3e%3cpath%20d='M14%2015.5C14.8284%2015.5%2015.5%2014.8284%2015.5%2014C15.5%2013.1716%2014.8284%2012.5%2014%2012.5C13.1716%2012.5%2012.5%2013.1716%2012.5%2014C12.5%2014.8284%2013.1716%2015.5%2014%2015.5Z'%20stroke='%23736E7D'/%3e%3c/svg%3e")}._searchContainer_16i8r_32{display:flex;align-items:center;justify-content:end}._searchContainer_16i8r_32 .dcl.text-filter{flex:1}._searchContainer_16i8r_32 ._searchInfo_16i8r_42{color:var(--secondary-text)}._syncedStatusList_16i8r_46.ui.dropdown{margin-left:25px;padding-left:7px;margin-right:10px;color:var(--primary)}._selectionInfo_16i8r_53{display:flex;justify-content:center;align-items:center;margin-bottom:20px;padding:10px 0;border:1px solid var(--secondary-text);border-radius:4px}._header_16i8r_63{display:flex;flex-direction:row;align-items:center;gap:16px;padding-right:142px;padding-left:90px;min-width:1400px;width:100%}._header_16i8r_63 ._content_16i8r_74{display:flex;flex-direction:row;background-color:#242129;padding:24px;width:calc(100% - 50px);border-radius:8px}._header_16i8r_63 ._title_16i8r_83{display:flex;flex-direction:row;align-items:center;gap:12px;overflow:hidden;margin-right:20px;flex:1 1 auto;min-width:0}._editCollectionName_16i8r_96{visibility:hidden;padding-left:16px}._header_16i8r_63 ._title_16i8r_83 ._name_16i8r_101:hover+._editCollectionName_16i8r_96{visibility:visible}._nameAndType_16i8r_105{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}._nameWrapper_16i8r_115{display:flex;flex-direction:row;align-items:center;gap:15px;min-width:0;flex:1}._header_16i8r_63 ._title_16i8r_83 ._name_16i8r_101{margin-top:0;margin-bottom:0;cursor:pointer;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;min-width:0;width:fit-content}._header_16i8r_63 ._title_16i8r_83 ._size_16i8r_139{font-size:16px}._header_16i8r_63 ._actions_16i8r_143{display:flex;flex-direction:row;align-items:center;gap:16px;flex:0 0 auto}._body_16i8r_151{display:flex;flex-direction:column;padding-right:142px;padding-left:142px;margin-top:16px;gap:16px;min-width:1400px;flex:1}._info_16i8r_162{display:flex;flex-direction:row;gap:10px;align-items:center;font-weight:600}._infoHeader_16i8r_170{display:flex;flex-direction:row;text-transform:uppercase;color:#a09ba8;gap:10px}._infoContent_16i8r_178{display:flex;flex-direction:row;align-items:center;gap:5px;border-radius:6px;padding:8px;background-color:#43404a}._info_16i8r_162 .dui-info-tooltip__trigger{background-repeat:no-repeat;background-size:cover;height:20px;width:20px}._slotsIcon_16i8r_195{background-color:#5e5b67;border-radius:32px;padding:2px;height:24px;width:24px;background-image:url("data:image/svg+xml,%3csvg%20width='19'%20height='14'%20viewBox='0%200%2019%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%204H4V0H2C0.9%200%200%200.9%200%202V4ZM0%209H4V5H0V9ZM5%209H9V5H5V9ZM10%209H14V5H10V9ZM5%204H9V0H5V4ZM10%200V4H14V0H10ZM15%209H19V5H15V9ZM2%2014H4V10H0V12C0%2013.1%200.9%2014%202%2014ZM5%2014H9V10H5V14ZM10%2014H14V10H10V14ZM15%2014H17C18.1%2014%2019%2013.1%2019%2012V10H15V14ZM15%200V4H19V2C19%200.9%2018.1%200%2017%200H15Z'%20fill='white'/%3e%3c/svg%3e");background-size:70%;background-position:center;background-repeat:no-repeat}._copyButton_16i8r_207{cursor:pointer}._empty_16i8r_28{padding:200px 0;width:100%;border-radius:8px;justify-content:center;color:var(--secondary-text);text-align:center;line-height:22px;font-size:15px;background-color:#242129}._empty_16i8r_28 h3{color:#cfcdd4;margin-bottom:5px}._empty_16i8r_28 p{color:#a09ba8}._sparkles_16i8r_232{width:54px;height:56px;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.19.1/assets/sparkles-C-WJN0Gh.svg);background-repeat:no-repeat;margin:auto auto 20px}._start_16i8r_241{width:80px;height:80px;background-image:url("data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6709_15241)'%3e%3cpath%20d='M20%2032.0004H28C29.1%2032.0004%2030%2031.1004%2030%2030.0004V20.0004H33.18C34.96%2020.0004%2035.86%2017.8404%2034.6%2016.5804L25.42%207.40043C24.64%206.62043%2023.38%206.62043%2022.6%207.40043L13.42%2016.5804C12.16%2017.8404%2013.04%2020.0004%2014.82%2020.0004H18V30.0004C18%2031.1004%2018.9%2032.0004%2020%2032.0004ZM12%2036.0004H36C37.1%2036.0004%2038%2036.9004%2038%2038.0004C38%2039.1004%2037.1%2040.0004%2036%2040.0004H12C10.9%2040.0004%2010%2039.1004%2010%2038.0004C10%2036.9004%2010.9%2036.0004%2012%2036.0004Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6709_15241'%3e%3crect%20width='48'%20height='48'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");background-size:48px;background-position:center;background-repeat:no-repeat;border-radius:50%;background-color:#43404a;margin:auto auto 20px}._migrationBanner_16i8r_254{min-width:1116px;color:#000;display:flex;align-items:center;background-color:#ffbc5b;padding:9px 16px;min-height:42px;font-weight:700;text-transform:uppercase;border-radius:8px;margin-right:142px;margin-left:142px;margin-top:15px}._migrationBanner_16i8r_254 .icon{height:18px;margin-right:10px}._type_16i8r_277{display:flex;flex-direction:row;gap:8px}._linkedWearableBadge_16i8r_283{padding:4px 8px;border-radius:32px}._typeBadge_16i8r_288{background-color:#00a146}._programmaticBadge_16i8r_292{background-color:#691fa9}._standardBadge_16i8r_296{background-color:#43404a}._loader_16i8r_302{display:flex;justify-content:center;align-items:center;min-height:0;flex:1}
1
+ ._image_142g7_1,._main_142g7_2{position:relative;width:64px;height:64px;border-radius:50%!important}._image_142g7_1{overflow:hidden}._network_142g7_13{position:absolute;bottom:0;right:0;width:32px;height:32px;z-index:1}._ellipsis_4huv2_1{margin:auto!important;color:var(--primary-text)}._itemImage_1y9df_1{min-width:64px;max-width:64px;height:64px;padding:5px;margin-left:18px;margin-right:24px}._itemStatus_1y9df_10{margin-right:4px}._grid_1y9df_14{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider)}._grid_1y9df_14:hover{background-color:#24212966;color:var(--text)}._row_1y9df_25{align-items:center!important;font-size:15px}._column_1y9df_30{display:flex!important}._statusColumn_1y9df_34{font-size:13px;text-transform:uppercase}._statusColumn_1y9df_34._synced_1y9df_39{color:#34ce76}._statusColumn_1y9df_34._unsynced_1y9df_43{color:#fc9965}._avatarColumn_1y9df_47{align-items:center;padding-left:10px!important}._nameWrapper_1y9df_52{display:flex;align-items:center;overflow:hidden}._name_1y9df_52{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._itemActions_1y9df_65{display:flex;align-items:center;justify-content:flex-end;width:100%}._action_1y9df_72{margin-left:5px}._status_rgxu1_1{text-transform:uppercase;padding:4px 8px;border-radius:32px;display:inline-flex;align-items:center;gap:4px}._status_rgxu1_1 .icon{height:18px}._pending_migration_rgxu1_14{color:#ffbc5b;background-color:#ffbc5b33}._synced_rgxu1_19{color:#65d890;background-color:#65d89033}._unpublished_rgxu1_24,._unsynced_rgxu1_25{color:#63b4f6;background-color:#63b4f633}._pending_mapping_rgxu1_30,._under_review_rgxu1_31{color:#ecebed;background-color:#ecebed33}._icon_rgxu1_10{width:17px;height:17px}._itemImage_1rili_1{min-width:64px;max-width:64px;height:64px;padding:5px;margin-left:18px;margin-right:24px}._itemStatus_1rili_10{margin-right:4px}._grid_1rili_14{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider);position:relative}._grid_1rili_14:not(._loading_1rili_21):hover{background-color:#24212966;color:var(--text)}._row_1rili_26{align-items:center!important;font-size:15px}._column_1rili_31{display:flex!important}._avatarColumn_1rili_35{align-items:center;padding-left:10px!important}._nameWrapper_1rili_40{display:flex;align-items:center;overflow:hidden}._name_1rili_40{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._itemActions_1rili_53{display:flex;align-items:center;justify-content:flex-end;width:100%}._action_1rili_60{margin-left:5px}._overlay_1rili_65{position:absolute;pointer-events:none;z-index:100000000;top:0;left:0;width:100%;height:100%;background-color:#00000046;z-index:1000;display:flex;justify-content:center;align-items:center}._itemCheckbox_2k9qa_1{margin-right:10px}._gridHeader_2k9qa_5.ui.grid{border-bottom:1px solid var(--divider);padding-bottom:10px;color:var(--secondary-text)}._gridHeader_2k9qa_5.ui.grid>.row>.column:first-child{padding-left:10px}._gridHeader_2k9qa_5.ui.grid>.row>.column._itemColumn_2k9qa_15{display:flex;align-items:center}._gridHeader_4acv6_1.ui.grid{border-bottom:1px solid var(--divider);padding-bottom:10px;color:var(--secondary-text)}._gridHeader_4acv6_1.ui.grid>.row>.column:first-child{padding-left:10px}._gridHeader_4acv6_1.ui.grid>.row>.column._itemColumn_4acv6_11{display:flex;align-items:center}._itemCheckbox_4acv6_16{margin-right:10px}._linkedToColumn_4acv6_20>span{margin-right:6px}._main_16i8r_3,._main_16i8r_3>.ui.container{display:flex;flex-direction:column;min-height:0;flex:1}._slots_16i8r_11{font-weight:700;text-transform:uppercase;position:relative}._slots_16i8r_11:before{content:"";display:inline-block;background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%202C4%203.10457%203.10457%204%202%204C0.89543%204%200%203.10457%200%202C0%200.89543%200.89543%200%202%200C3.10457%200%204%200.89543%204%202Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%208C4%209.10457%203.10457%2010%202%2010C0.89543%2010%200%209.10457%200%208C0%206.89543%200.89543%206%202%206C3.10457%206%204%206.89543%204%208Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%2014C4%2015.1046%203.10457%2016%202%2016C0.89543%2016%200%2015.1046%200%2014C0%2012.8954%200.89543%2012%202%2012C3.10457%2012%204%2012.8954%204%2014Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%202C10%203.10457%209.10457%204%208%204C6.89543%204%206%203.10457%206%202C6%200.89543%206.89543%200%208%200C9.10457%200%2010%200.89543%2010%202Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%208C10%209.10457%209.10457%2010%208%2010C6.89543%2010%206%209.10457%206%208C6%206.89543%206.89543%206%208%206C9.10457%206%2010%206.89543%2010%208Z'%20fill='%23FF2D55'/%3e%3cpath%20d='M8%2015.5C8.82843%2015.5%209.5%2014.8284%209.5%2014C9.5%2013.1716%208.82843%2012.5%208%2012.5C7.17157%2012.5%206.5%2013.1716%206.5%2014C6.5%2014.8284%207.17157%2015.5%208%2015.5Z'%20stroke='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16%202C16%203.10457%2015.1046%204%2014%204C12.8954%204%2012%203.10457%2012%202C12%200.89543%2012.8954%200%2014%200C15.1046%200%2016%200.89543%2016%202Z'%20fill='%23FF2D55'/%3e%3cpath%20d='M14%209.5C14.8284%209.5%2015.5%208.82843%2015.5%208C15.5%207.17157%2014.8284%206.5%2014%206.5C13.1716%206.5%2012.5%207.17157%2012.5%208C12.5%208.82843%2013.1716%209.5%2014%209.5Z'%20stroke='%23FF2D55'/%3e%3cpath%20d='M14%2015.5C14.8284%2015.5%2015.5%2014.8284%2015.5%2014C15.5%2013.1716%2014.8284%2012.5%2014%2012.5C13.1716%2012.5%2012.5%2013.1716%2012.5%2014C12.5%2014.8284%2013.1716%2015.5%2014%2015.5Z'%20stroke='%23FF2D55'/%3e%3c/svg%3e");width:16px;height:16px;top:3px;position:relative;margin-right:8px}.button._slots_16i8r_11._empty_16i8r_28:before{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%202C4%203.10457%203.10457%204%202%204C0.89543%204%200%203.10457%200%202C0%200.89543%200.89543%200%202%200C3.10457%200%204%200.89543%204%202Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%208C4%209.10457%203.10457%2010%202%2010C0.89543%2010%200%209.10457%200%208C0%206.89543%200.89543%206%202%206C3.10457%206%204%206.89543%204%208Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%2014C4%2015.1046%203.10457%2016%202%2016C0.89543%2016%200%2015.1046%200%2014C0%2012.8954%200.89543%2012%202%2012C3.10457%2012%204%2012.8954%204%2014Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%202C10%203.10457%209.10457%204%208%204C6.89543%204%206%203.10457%206%202C6%200.89543%206.89543%200%208%200C9.10457%200%2010%200.89543%2010%202Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%208C10%209.10457%209.10457%2010%208%2010C6.89543%2010%206%209.10457%206%208C6%206.89543%206.89543%206%208%206C9.10457%206%2010%206.89543%2010%208Z'%20fill='%23736E7D'/%3e%3cpath%20d='M8%2015.5C8.82843%2015.5%209.5%2014.8284%209.5%2014C9.5%2013.1716%208.82843%2012.5%208%2012.5C7.17157%2012.5%206.5%2013.1716%206.5%2014C6.5%2014.8284%207.17157%2015.5%208%2015.5Z'%20stroke='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16%202C16%203.10457%2015.1046%204%2014%204C12.8954%204%2012%203.10457%2012%202C12%200.89543%2012.8954%200%2014%200C15.1046%200%2016%200.89543%2016%202Z'%20fill='%23736E7D'/%3e%3cpath%20d='M14%209.5C14.8284%209.5%2015.5%208.82843%2015.5%208C15.5%207.17157%2014.8284%206.5%2014%206.5C13.1716%206.5%2012.5%207.17157%2012.5%208C12.5%208.82843%2013.1716%209.5%2014%209.5Z'%20stroke='%23736E7D'/%3e%3cpath%20d='M14%2015.5C14.8284%2015.5%2015.5%2014.8284%2015.5%2014C15.5%2013.1716%2014.8284%2012.5%2014%2012.5C13.1716%2012.5%2012.5%2013.1716%2012.5%2014C12.5%2014.8284%2013.1716%2015.5%2014%2015.5Z'%20stroke='%23736E7D'/%3e%3c/svg%3e")}._searchContainer_16i8r_32{display:flex;align-items:center;justify-content:end}._searchContainer_16i8r_32 .dcl.text-filter{flex:1}._searchContainer_16i8r_32 ._searchInfo_16i8r_42{color:var(--secondary-text)}._syncedStatusList_16i8r_46.ui.dropdown{margin-left:25px;padding-left:7px;margin-right:10px;color:var(--primary)}._selectionInfo_16i8r_53{display:flex;justify-content:center;align-items:center;margin-bottom:20px;padding:10px 0;border:1px solid var(--secondary-text);border-radius:4px}._header_16i8r_63{display:flex;flex-direction:row;align-items:center;gap:16px;padding-right:142px;padding-left:90px;min-width:1400px;width:100%}._header_16i8r_63 ._content_16i8r_74{display:flex;flex-direction:row;background-color:#242129;padding:24px;width:calc(100% - 50px);border-radius:8px}._header_16i8r_63 ._title_16i8r_83{display:flex;flex-direction:row;align-items:center;gap:12px;overflow:hidden;margin-right:20px;flex:1 1 auto;min-width:0}._editCollectionName_16i8r_96{visibility:hidden;padding-left:16px}._header_16i8r_63 ._title_16i8r_83 ._name_16i8r_101:hover+._editCollectionName_16i8r_96{visibility:visible}._nameAndType_16i8r_105{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}._nameWrapper_16i8r_115{display:flex;flex-direction:row;align-items:center;gap:15px;min-width:0;flex:1}._header_16i8r_63 ._title_16i8r_83 ._name_16i8r_101{margin-top:0;margin-bottom:0;cursor:pointer;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;min-width:0;width:fit-content}._header_16i8r_63 ._title_16i8r_83 ._size_16i8r_139{font-size:16px}._header_16i8r_63 ._actions_16i8r_143{display:flex;flex-direction:row;align-items:center;gap:16px;flex:0 0 auto}._body_16i8r_151{display:flex;flex-direction:column;padding-right:142px;padding-left:142px;margin-top:16px;gap:16px;min-width:1400px;flex:1}._info_16i8r_162{display:flex;flex-direction:row;gap:10px;align-items:center;font-weight:600}._infoHeader_16i8r_170{display:flex;flex-direction:row;text-transform:uppercase;color:#a09ba8;gap:10px}._infoContent_16i8r_178{display:flex;flex-direction:row;align-items:center;gap:5px;border-radius:6px;padding:8px;background-color:#43404a}._info_16i8r_162 .dui-info-tooltip__trigger{background-repeat:no-repeat;background-size:cover;height:20px;width:20px}._slotsIcon_16i8r_195{background-color:#5e5b67;border-radius:32px;padding:2px;height:24px;width:24px;background-image:url("data:image/svg+xml,%3csvg%20width='19'%20height='14'%20viewBox='0%200%2019%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%204H4V0H2C0.9%200%200%200.9%200%202V4ZM0%209H4V5H0V9ZM5%209H9V5H5V9ZM10%209H14V5H10V9ZM5%204H9V0H5V4ZM10%200V4H14V0H10ZM15%209H19V5H15V9ZM2%2014H4V10H0V12C0%2013.1%200.9%2014%202%2014ZM5%2014H9V10H5V14ZM10%2014H14V10H10V14ZM15%2014H17C18.1%2014%2019%2013.1%2019%2012V10H15V14ZM15%200V4H19V2C19%200.9%2018.1%200%2017%200H15Z'%20fill='white'/%3e%3c/svg%3e");background-size:70%;background-position:center;background-repeat:no-repeat}._copyButton_16i8r_207{cursor:pointer}._empty_16i8r_28{padding:200px 0;width:100%;border-radius:8px;justify-content:center;color:var(--secondary-text);text-align:center;line-height:22px;font-size:15px;background-color:#242129}._empty_16i8r_28 h3{color:#cfcdd4;margin-bottom:5px}._empty_16i8r_28 p{color:#a09ba8}._sparkles_16i8r_232{width:54px;height:56px;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.19.2/assets/sparkles-C-WJN0Gh.svg);background-repeat:no-repeat;margin:auto auto 20px}._start_16i8r_241{width:80px;height:80px;background-image:url("data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6709_15241)'%3e%3cpath%20d='M20%2032.0004H28C29.1%2032.0004%2030%2031.1004%2030%2030.0004V20.0004H33.18C34.96%2020.0004%2035.86%2017.8404%2034.6%2016.5804L25.42%207.40043C24.64%206.62043%2023.38%206.62043%2022.6%207.40043L13.42%2016.5804C12.16%2017.8404%2013.04%2020.0004%2014.82%2020.0004H18V30.0004C18%2031.1004%2018.9%2032.0004%2020%2032.0004ZM12%2036.0004H36C37.1%2036.0004%2038%2036.9004%2038%2038.0004C38%2039.1004%2037.1%2040.0004%2036%2040.0004H12C10.9%2040.0004%2010%2039.1004%2010%2038.0004C10%2036.9004%2010.9%2036.0004%2012%2036.0004Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6709_15241'%3e%3crect%20width='48'%20height='48'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");background-size:48px;background-position:center;background-repeat:no-repeat;border-radius:50%;background-color:#43404a;margin:auto auto 20px}._migrationBanner_16i8r_254{min-width:1116px;color:#000;display:flex;align-items:center;background-color:#ffbc5b;padding:9px 16px;min-height:42px;font-weight:700;text-transform:uppercase;border-radius:8px;margin-right:142px;margin-left:142px;margin-top:15px}._migrationBanner_16i8r_254 .icon{height:18px;margin-right:10px}._type_16i8r_277{display:flex;flex-direction:row;gap:8px}._linkedWearableBadge_16i8r_283{padding:4px 8px;border-radius:32px}._typeBadge_16i8r_288{background-color:#00a146}._programmaticBadge_16i8r_292{background-color:#691fa9}._standardBadge_16i8r_296{background-color:#43404a}._loader_16i8r_302{display:flex;justify-content:center;align-items:center;min-height:0;flex:1}
@@ -1 +1 @@
1
- var k=Object.defineProperty;var j=(r,a,e)=>a in r?k(r,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[a]=e;var i=(r,a,e)=>j(r,typeof a!="symbol"?a+"":a,e);import{J as b,dH as O,bR as v,dI as R,bW as x,N as s,S as u,cp as S,M as o,Q as y,R as E,cq as L,cr as N,co as _,b6 as P,T as C,dJ as T}from"./index-D8smHxXz.js";import{L as w}from"./LandAction-KRKWlXqA.js";import{L as A}from"./LandProviderPage-Dj9N_PW0.js";import"./Back-BMwdG_lT.js";import"./NotFound-x8CcnrUa.js";import"./hooks-BtT-ntFZ.js";class F extends b.PureComponent{constructor(){super(...arguments);i(this,"state",{address:"",initial:"",loading:!1,editing:!1,dirty:!1,revoked:!1});i(this,"handleSetOperator",()=>{const{land:e,onSetOperator:t}=this.props,{address:n,revoked:p}=this.state;t(e,p?null:n)});i(this,"handleChange",(e,t)=>{this.setState({address:t.value,dirty:!0,revoked:!1})});i(this,"handleRevoke",()=>{this.setState({revoked:!0,dirty:!0})});i(this,"handleUndo",()=>{this.setState({revoked:!1,dirty:!1})})}async componentWillMount(){this.setState({loading:!0});const{land:e}=this.props,t=await O(e);t!==null?this.setState({address:t,initial:t,loading:!1,editing:!0}):this.setState({loading:!1})}render(){const{land:e}=this.props,{address:t,loading:n,dirty:p,revoked:d,editing:g,initial:m}=this.state,c=g&&v(t,m),h=!n&&!!t&&!_(t),f=n||!p||(v(t,m)||h)&&!d||!R(e,[x.OWNER,x.TENANT]),l=[];return d&&l.push("revoked"),g&&l.push("editing"),c&&l.push("is-revokable"),s.jsxs(u.Form,{className:"LandOperatorForm",children:[s.jsx(S,{placeholder:"0x...",label:o("operator_page.address"),className:l.join(" "),value:t,onChange:this.handleChange,loading:n,action:c?d?o("operator_page.undo"):o("operator_page.revoke"):void 0,onAction:c?d?this.handleUndo:this.handleRevoke:void 0,error:h,message:h?o("operator_page.invalid_address"):void 0}),s.jsxs(u.Row,{children:[s.jsx(y,{className:"cancel",to:E.landDetail(e.id),children:s.jsx(u.Button,{children:o("global.cancel")})}),s.jsx(L,{type:"submit",primary:!0,disabled:f,onClick:this.handleSetOperator,network:N.Network.ETHEREUM,children:o("global.submit")})]})]})}}let U=class extends b.PureComponent{render(){const{onSetOperator:a}=this.props;return s.jsx(A,{children:e=>s.jsx(w,{land:e,title:o("operator_page.title"),subtitle:s.jsx(P,{id:"operator_page.subtitle",values:{name:s.jsx("strong",{children:e.name}),b:t=>s.jsx("strong",{children:t}),br:()=>s.jsx("br",{})}}),children:s.jsx(F,{land:e,onSetOperator:a})})})}};const q=r=>({onSetOperator:(a,e)=>r(T(a,e))}),V=C(void 0,q)(U);export{V as default};
1
+ var k=Object.defineProperty;var j=(r,a,e)=>a in r?k(r,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[a]=e;var i=(r,a,e)=>j(r,typeof a!="symbol"?a+"":a,e);import{J as b,dH as O,bR as v,dI as R,bW as x,N as s,S as u,cp as S,M as o,Q as y,R as E,cq as L,cr as N,co as _,b6 as P,T as C,dJ as T}from"./index-B6_fsGNl.js";import{L as w}from"./LandAction-CiN-M5uK.js";import{L as A}from"./LandProviderPage-DoB5Gv7P.js";import"./Back-FYhl4raf.js";import"./NotFound-D_YPmEFv.js";import"./hooks-Dnsfitqh.js";class F extends b.PureComponent{constructor(){super(...arguments);i(this,"state",{address:"",initial:"",loading:!1,editing:!1,dirty:!1,revoked:!1});i(this,"handleSetOperator",()=>{const{land:e,onSetOperator:t}=this.props,{address:n,revoked:p}=this.state;t(e,p?null:n)});i(this,"handleChange",(e,t)=>{this.setState({address:t.value,dirty:!0,revoked:!1})});i(this,"handleRevoke",()=>{this.setState({revoked:!0,dirty:!0})});i(this,"handleUndo",()=>{this.setState({revoked:!1,dirty:!1})})}async componentWillMount(){this.setState({loading:!0});const{land:e}=this.props,t=await O(e);t!==null?this.setState({address:t,initial:t,loading:!1,editing:!0}):this.setState({loading:!1})}render(){const{land:e}=this.props,{address:t,loading:n,dirty:p,revoked:d,editing:g,initial:m}=this.state,c=g&&v(t,m),h=!n&&!!t&&!_(t),f=n||!p||(v(t,m)||h)&&!d||!R(e,[x.OWNER,x.TENANT]),l=[];return d&&l.push("revoked"),g&&l.push("editing"),c&&l.push("is-revokable"),s.jsxs(u.Form,{className:"LandOperatorForm",children:[s.jsx(S,{placeholder:"0x...",label:o("operator_page.address"),className:l.join(" "),value:t,onChange:this.handleChange,loading:n,action:c?d?o("operator_page.undo"):o("operator_page.revoke"):void 0,onAction:c?d?this.handleUndo:this.handleRevoke:void 0,error:h,message:h?o("operator_page.invalid_address"):void 0}),s.jsxs(u.Row,{children:[s.jsx(y,{className:"cancel",to:E.landDetail(e.id),children:s.jsx(u.Button,{children:o("global.cancel")})}),s.jsx(L,{type:"submit",primary:!0,disabled:f,onClick:this.handleSetOperator,network:N.Network.ETHEREUM,children:o("global.submit")})]})]})}}let U=class extends b.PureComponent{render(){const{onSetOperator:a}=this.props;return s.jsx(A,{children:e=>s.jsx(w,{land:e,title:o("operator_page.title"),subtitle:s.jsx(P,{id:"operator_page.subtitle",values:{name:s.jsx("strong",{children:e.name}),b:t=>s.jsx("strong",{children:t}),br:()=>s.jsx("br",{})}}),children:s.jsx(F,{land:e,onSetOperator:a})})})}};const q=r=>({onSetOperator:(a,e)=>r(T(a,e))}),V=C(void 0,q)(U);export{V as default};
@@ -1,4 +1,4 @@
1
- import{T as xt,M as re,R as N,E as k,C as x,a as X,b as Wo,O as Z,c as ht}from"./index-DGfkFU_K.js";import"./index-D8smHxXz.js";/**
1
+ import{T as xt,M as re,R as N,E as k,C as x,a as X,b as Wo,O as Z,c as ht}from"./index-DJkh5DZF.js";import"./index-B6_fsGNl.js";/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1 +1 @@
1
- var $=Object.defineProperty;var W=(n,t,s)=>t in n?$(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var j=(n,t,s)=>W(n,typeof t!="symbol"?t+"":t,s);import{J as p,K as A,L as q,M as o,N as e,O as G,P as k,Q as w,R as D,S as a,T as H,U as z,V as J,W as L,X as K,Y as V,Z,$ as Q,a0 as X,a1 as Y,a2 as B,a3 as ee,a4 as se,a5 as te,a6 as ne,a7 as ae,a8 as _,a9 as oe,aa as ce,ab as S,ac as re,ad as le,ae as ie,af as de,ag as pe,ah as he,ai as je}from"./index-D8smHxXz.js";import{N as ue,S as me,u as ge,a as xe}from"./Navigation.container-INpo5kYA.js";import{O as Pe}from"./OptionsDropdown-CqY1_bRp.js";import{S as Ce}from"./SDKTag-Bk1968iG.js";import{L as Se}from"./LoggedInDetailPage.container-CCL2zROi.js";import{u as _e}from"./hooks-BtT-ntFZ.js";import"./selectors-yGlOLvMK.js";import"./SignInRequired-CLAy0k4a.js";var E;let fe=(E=class extends p.PureComponent{constructor(){super(...arguments);j(this,"state",{isDeleting:!1});j(this,"handleOnClick",()=>{const{onClick:s,project:c}=this.props;s&&s(c)});j(this,"handleConfirmDeleteProject",()=>{this.setState({isDeleting:!0})});j(this,"handleCancelDeleteProject",()=>{this.setState({isDeleting:!1})});j(this,"handleDeleteProject",()=>{const{project:s,onDeleteProject:c}=this.props;c(s),this.setState({isDeleting:!1})});j(this,"handleDuplicateProject",()=>{const{project:s,onDuplicateProject:c}=this.props;c(s)});j(this,"handleExportScene",()=>{this.props.onOpenModal("ExportModal",{project:this.props.project})})}componentDidMount(){this.props.onLoadProjectScene(this.props.project,this.props.type)}render(){const{project:s,parcels:c,items:r,onClick:h,isUploading:u,hasError:C,scene:m}=this.props,{isDeleting:l}=this.state,g="likes"in s;let i={},x="ProjectCard",P=A(s,m);P&&(P&&q(P)&&(P+=`?updated_at=${+new Date(s.updatedAt)}`),i={backgroundImage:`url(${P})`},x+=" has-thumbnail");const v=[{text:o("scenes_page.project_actions.duplicate_project"),handler:this.handleDuplicateProject},{text:o("scenes_page.project_actions.export_project"),handler:this.handleExportScene},{text:o("scenes_page.project_actions.delete_project"),handler:this.handleConfirmDeleteProject}],f=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"project-thumbnail",style:i}),g?null:e.jsxs(e.Fragment,{children:[e.jsx(G,{projectId:s.id,className:"deployment-status"}),e.jsxs("div",{className:"options-container",children:[e.jsx(Ce,{scene:m}),e.jsx(Pe,{className:"options-dropdown",options:v})]})]}),e.jsxs("div",{className:"project-data",children:[e.jsxs("div",{className:"title-wrapper",children:[e.jsx("div",{className:"title",children:s.title}),u?e.jsx(k,{name:"cloud-upload",className:"is-uploading"}):null,!u&&C?e.jsx("div",{className:"error-indicator"}):null]}),e.jsxs("div",{className:"description",title:s.description,children:[e.jsx(k,{name:"scene-parcel"})," ",o("public_page.parcel_count",{parcels:c}),e.jsx(k,{name:"scene-object"})," ",o("project_card.item_count",{items:r})]})]})]});return e.jsxs(e.Fragment,{children:[h?e.jsx("div",{className:x,onClick:this.handleOnClick,children:f}):e.jsx(w,{to:g?D.poolView(s.id,"pool"):D.sceneDetail(s.id),className:x,children:f}),e.jsx(a.Confirm,{size:"tiny",open:l,header:o("project_card.confirm_delete_header",{title:s.title}),content:o("project_card.confirm_delete_content",{title:s.title}),confirmButton:e.jsx(a.Button,{primary:!0,children:o("global.confirm")}),cancelButton:e.jsx(a.Button,{secondary:!0,children:o("global.cancel")}),onCancel:this.handleCancelDeleteProject,onConfirm:this.handleDeleteProject})]})}},j(E,"defaultProps",{items:0,parcels:0}),E);const Ne=(n,t)=>{const{project:s}=t,c=s.layout.cols*s.layout.rows,r=z(n)[s.sceneId],h=r&&r.sdk6?Object.keys(r.sdk6.entities).length-c:0,u=J(n)[s.id]?L.POOL:L.PROJECT;return{parcels:c,items:h,scene:r,deploymentStatus:K(n)[t.project.id],deployments:V(n)[t.project.id],isUploading:Z(n).has(s.id),hasError:Q(n).has(s.id),type:u}},De=n=>({onDeleteProject:t=>n(X(t)),onDuplicateProject:t=>n(Y(t)),onOpenModal:(t,s)=>n(B(t,s)),onLoadProjectScene:(t,s)=>n(ee(t,s))}),I=H(Ne,De)(fe),F=n=>{const{page:t,poolList:s,projects:c,sortBy:r,totalPages:h,isFetching:u,isLoggingIn:C,onLoadFromScenePool:m,onOpenModal:l}=n,g=se();p.useEffect(()=>{m({sortBy:"updated_at",sortOrder:"desc"})},[m,l]),p.useEffect(()=>{te()&&l("WorldsForENSOwnersAnnouncementModal")},[l]);const i=p.useCallback(()=>{l("ImportModal")},[l]),x=p.useCallback(()=>{l("SceneCreationModal")},[l]),P=()=>e.jsx(a.Button,{inverted:!0,className:"import-scene",onClick:i,children:o("scenes_page.upload_scene")}),v=()=>e.jsx(a.Button,{primary:!0,className:"create-scene",onClick:x,children:o("scenes_page.create_scene")}),f=()=>e.jsx(a.Dropdown,{direction:"left",value:r,options:[{value:_.NEWEST,text:o("scenes_page.sort.newest")},{value:_.NAME,text:o("scenes_page.sort.name")},{value:_.SIZE,text:o("scenes_page.sort.size")}],onChange:R}),M=()=>c.length>0?e.jsx("div",{className:"CardList",children:c.map(d=>e.jsx(I,{project:d},d.id))}):e.jsxs("div",{className:"no-scenes-container",children:[e.jsx("h3",{className:"no-scenes-title",children:o("scenes_page.no_scenes.title")}),e.jsx("span",{className:"no-scenes-description",children:o("scenes_page.no_scenes.description",{a:d=>e.jsx("a",{rel:"noreferrer",target:"_blank",href:"https://docs.decentraland.org/creator/development-guide/sdk-101/",children:d})})}),e.jsx(oe,{})]}),N=p.useCallback((d={})=>{g.push(D.scenes({page:t,sortBy:r,...d}))},[t,r,g]),R=p.useCallback((d,{value:b})=>N({sortBy:b}),[N]),T=p.useCallback((d,{activePage:b})=>N({page:b}),[N]);if(C||u)return e.jsx(ne,{});const O=h>1,y={firstItem:null,lastItem:null};t===1&&(y.prevItem=null),t===h&&(y.nextItem=null);const U=()=>e.jsxs(e.Fragment,{children:[e.jsx(me,{}),e.jsxs(a.Container,{children:[e.jsxs(a.Section,{className:"projects-menu",children:[e.jsxs(a.Row,{children:[e.jsx(a.Column,{children:e.jsx(a.Header,{children:o("scenes_page.my_scenes")})}),e.jsx(a.Column,{align:"right",children:e.jsxs("div",{className:"actions",children:[P(),v()]})})]}),e.jsxs(a.Row,{className:"actions",children:[e.jsx(a.Column,{children:e.jsx("div",{className:"items-count",children:o("scenes_page.results",{count:c.length})})}),e.jsx(a.Column,{align:"right",children:c.length>1?f():null})]})]}),e.jsxs(a.Section,{className:ae("project-cards",{"has-pagination":O}),children:[M(),O?e.jsx(a.Pagination,{...y,activePage:t,totalPages:h,onPageChange:T}):null]}),s?e.jsxs(e.Fragment,{children:[e.jsxs(a.Row,{children:[e.jsx(a.Row,{className:"scene-pool-menu",children:e.jsx(a.Header,{sub:!0,children:o("scenes_page.from_scene_pool")})}),e.jsx(a.Row,{align:"right",children:e.jsx(w,{to:D.poolSearch(),children:e.jsxs(a.Button,{basic:!0,children:[o("global.view_more")," ",e.jsx(a.Icon,{name:"chevron right"})]})})})]}),e.jsx("div",{className:"scene-pool-projects",children:s.map(d=>e.jsx(I,{project:d},d.id))})]}):null]})]});return e.jsx(Se,{className:"ScenesPage",activeTab:ue.SCENES,children:U()})};F.defaultProps={projects:[]};const ve=()=>{const n=ce(),t=ge(),s=xe(),c=_e(Object.values(_),_.NEWEST),r=S(i=>re(i)||le(i)),h=S(ie),u=S(de),C=S(pe),m=S(he),l=p.useCallback((i,x)=>n(B(i,x)),[n]),g=p.useCallback(i=>n(je(i)),[n]);return e.jsx(F,{projects:s,isLoggingIn:r,isFetching:h,page:t,sortBy:c,totalPages:u,didCreate:C,poolList:m,onOpenModal:l,onLoadFromScenePool:g})},Me=ve;export{Me as default};
1
+ var $=Object.defineProperty;var W=(n,t,s)=>t in n?$(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var j=(n,t,s)=>W(n,typeof t!="symbol"?t+"":t,s);import{J as p,K as A,L as q,M as o,N as e,O as G,P as k,Q as w,R as D,S as a,T as H,U as z,V as J,W as L,X as K,Y as V,Z,$ as Q,a0 as X,a1 as Y,a2 as B,a3 as ee,a4 as se,a5 as te,a6 as ne,a7 as ae,a8 as _,a9 as oe,aa as ce,ab as S,ac as re,ad as le,ae as ie,af as de,ag as pe,ah as he,ai as je}from"./index-B6_fsGNl.js";import{N as ue,S as me,u as ge,a as xe}from"./Navigation.container-xyyd5mUr.js";import{O as Pe}from"./OptionsDropdown-qU-LlyWf.js";import{S as Ce}from"./SDKTag-_Lrb2J6b.js";import{L as Se}from"./LoggedInDetailPage.container-DbQebeQd.js";import{u as _e}from"./hooks-Dnsfitqh.js";import"./selectors-BtqWSHNR.js";import"./SignInRequired-h6B_5gxX.js";var E;let fe=(E=class extends p.PureComponent{constructor(){super(...arguments);j(this,"state",{isDeleting:!1});j(this,"handleOnClick",()=>{const{onClick:s,project:c}=this.props;s&&s(c)});j(this,"handleConfirmDeleteProject",()=>{this.setState({isDeleting:!0})});j(this,"handleCancelDeleteProject",()=>{this.setState({isDeleting:!1})});j(this,"handleDeleteProject",()=>{const{project:s,onDeleteProject:c}=this.props;c(s),this.setState({isDeleting:!1})});j(this,"handleDuplicateProject",()=>{const{project:s,onDuplicateProject:c}=this.props;c(s)});j(this,"handleExportScene",()=>{this.props.onOpenModal("ExportModal",{project:this.props.project})})}componentDidMount(){this.props.onLoadProjectScene(this.props.project,this.props.type)}render(){const{project:s,parcels:c,items:r,onClick:h,isUploading:u,hasError:C,scene:m}=this.props,{isDeleting:l}=this.state,g="likes"in s;let i={},x="ProjectCard",P=A(s,m);P&&(P&&q(P)&&(P+=`?updated_at=${+new Date(s.updatedAt)}`),i={backgroundImage:`url(${P})`},x+=" has-thumbnail");const v=[{text:o("scenes_page.project_actions.duplicate_project"),handler:this.handleDuplicateProject},{text:o("scenes_page.project_actions.export_project"),handler:this.handleExportScene},{text:o("scenes_page.project_actions.delete_project"),handler:this.handleConfirmDeleteProject}],f=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"project-thumbnail",style:i}),g?null:e.jsxs(e.Fragment,{children:[e.jsx(G,{projectId:s.id,className:"deployment-status"}),e.jsxs("div",{className:"options-container",children:[e.jsx(Ce,{scene:m}),e.jsx(Pe,{className:"options-dropdown",options:v})]})]}),e.jsxs("div",{className:"project-data",children:[e.jsxs("div",{className:"title-wrapper",children:[e.jsx("div",{className:"title",children:s.title}),u?e.jsx(k,{name:"cloud-upload",className:"is-uploading"}):null,!u&&C?e.jsx("div",{className:"error-indicator"}):null]}),e.jsxs("div",{className:"description",title:s.description,children:[e.jsx(k,{name:"scene-parcel"})," ",o("public_page.parcel_count",{parcels:c}),e.jsx(k,{name:"scene-object"})," ",o("project_card.item_count",{items:r})]})]})]});return e.jsxs(e.Fragment,{children:[h?e.jsx("div",{className:x,onClick:this.handleOnClick,children:f}):e.jsx(w,{to:g?D.poolView(s.id,"pool"):D.sceneDetail(s.id),className:x,children:f}),e.jsx(a.Confirm,{size:"tiny",open:l,header:o("project_card.confirm_delete_header",{title:s.title}),content:o("project_card.confirm_delete_content",{title:s.title}),confirmButton:e.jsx(a.Button,{primary:!0,children:o("global.confirm")}),cancelButton:e.jsx(a.Button,{secondary:!0,children:o("global.cancel")}),onCancel:this.handleCancelDeleteProject,onConfirm:this.handleDeleteProject})]})}},j(E,"defaultProps",{items:0,parcels:0}),E);const Ne=(n,t)=>{const{project:s}=t,c=s.layout.cols*s.layout.rows,r=z(n)[s.sceneId],h=r&&r.sdk6?Object.keys(r.sdk6.entities).length-c:0,u=J(n)[s.id]?L.POOL:L.PROJECT;return{parcels:c,items:h,scene:r,deploymentStatus:K(n)[t.project.id],deployments:V(n)[t.project.id],isUploading:Z(n).has(s.id),hasError:Q(n).has(s.id),type:u}},De=n=>({onDeleteProject:t=>n(X(t)),onDuplicateProject:t=>n(Y(t)),onOpenModal:(t,s)=>n(B(t,s)),onLoadProjectScene:(t,s)=>n(ee(t,s))}),I=H(Ne,De)(fe),F=n=>{const{page:t,poolList:s,projects:c,sortBy:r,totalPages:h,isFetching:u,isLoggingIn:C,onLoadFromScenePool:m,onOpenModal:l}=n,g=se();p.useEffect(()=>{m({sortBy:"updated_at",sortOrder:"desc"})},[m,l]),p.useEffect(()=>{te()&&l("WorldsForENSOwnersAnnouncementModal")},[l]);const i=p.useCallback(()=>{l("ImportModal")},[l]),x=p.useCallback(()=>{l("SceneCreationModal")},[l]),P=()=>e.jsx(a.Button,{inverted:!0,className:"import-scene",onClick:i,children:o("scenes_page.upload_scene")}),v=()=>e.jsx(a.Button,{primary:!0,className:"create-scene",onClick:x,children:o("scenes_page.create_scene")}),f=()=>e.jsx(a.Dropdown,{direction:"left",value:r,options:[{value:_.NEWEST,text:o("scenes_page.sort.newest")},{value:_.NAME,text:o("scenes_page.sort.name")},{value:_.SIZE,text:o("scenes_page.sort.size")}],onChange:R}),M=()=>c.length>0?e.jsx("div",{className:"CardList",children:c.map(d=>e.jsx(I,{project:d},d.id))}):e.jsxs("div",{className:"no-scenes-container",children:[e.jsx("h3",{className:"no-scenes-title",children:o("scenes_page.no_scenes.title")}),e.jsx("span",{className:"no-scenes-description",children:o("scenes_page.no_scenes.description",{a:d=>e.jsx("a",{rel:"noreferrer",target:"_blank",href:"https://docs.decentraland.org/creator/development-guide/sdk-101/",children:d})})}),e.jsx(oe,{})]}),N=p.useCallback((d={})=>{g.push(D.scenes({page:t,sortBy:r,...d}))},[t,r,g]),R=p.useCallback((d,{value:b})=>N({sortBy:b}),[N]),T=p.useCallback((d,{activePage:b})=>N({page:b}),[N]);if(C||u)return e.jsx(ne,{});const O=h>1,y={firstItem:null,lastItem:null};t===1&&(y.prevItem=null),t===h&&(y.nextItem=null);const U=()=>e.jsxs(e.Fragment,{children:[e.jsx(me,{}),e.jsxs(a.Container,{children:[e.jsxs(a.Section,{className:"projects-menu",children:[e.jsxs(a.Row,{children:[e.jsx(a.Column,{children:e.jsx(a.Header,{children:o("scenes_page.my_scenes")})}),e.jsx(a.Column,{align:"right",children:e.jsxs("div",{className:"actions",children:[P(),v()]})})]}),e.jsxs(a.Row,{className:"actions",children:[e.jsx(a.Column,{children:e.jsx("div",{className:"items-count",children:o("scenes_page.results",{count:c.length})})}),e.jsx(a.Column,{align:"right",children:c.length>1?f():null})]})]}),e.jsxs(a.Section,{className:ae("project-cards",{"has-pagination":O}),children:[M(),O?e.jsx(a.Pagination,{...y,activePage:t,totalPages:h,onPageChange:T}):null]}),s?e.jsxs(e.Fragment,{children:[e.jsxs(a.Row,{children:[e.jsx(a.Row,{className:"scene-pool-menu",children:e.jsx(a.Header,{sub:!0,children:o("scenes_page.from_scene_pool")})}),e.jsx(a.Row,{align:"right",children:e.jsx(w,{to:D.poolSearch(),children:e.jsxs(a.Button,{basic:!0,children:[o("global.view_more")," ",e.jsx(a.Icon,{name:"chevron right"})]})})})]}),e.jsx("div",{className:"scene-pool-projects",children:s.map(d=>e.jsx(I,{project:d},d.id))})]}):null]})]});return e.jsx(Se,{className:"ScenesPage",activeTab:ue.SCENES,children:U()})};F.defaultProps={projects:[]};const ve=()=>{const n=ce(),t=ge(),s=xe(),c=_e(Object.values(_),_.NEWEST),r=S(i=>re(i)||le(i)),h=S(ie),u=S(de),C=S(pe),m=S(he),l=p.useCallback((i,x)=>n(B(i,x)),[n]),g=p.useCallback(i=>n(je(i)),[n]);return e.jsx(F,{projects:s,isLoggingIn:r,isFetching:h,page:t,sortBy:c,totalPages:u,didCreate:C,poolList:m,onOpenModal:l,onLoadFromScenePool:g})},Me=ve;export{Me as default};
@@ -1 +1 @@
1
- var h=Object.defineProperty;var m=(a,s,e)=>s in a?h(a,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[s]=e;var r=(a,s,e)=>m(a,typeof s!="symbol"?s+"":s,e);import{J as p,N as t,M as d,b6 as g,S as o,Q as u,R as x,cq as E,bW as N,cr as b,T as j,ct as L}from"./index-D8smHxXz.js";import{L as f}from"./LandAction-KRKWlXqA.js";import{L as v}from"./LandProviderPage-Dj9N_PW0.js";import"./Back-BMwdG_lT.js";import"./NotFound-x8CcnrUa.js";import"./hooks-BtT-ntFZ.js";let D=class extends p.PureComponent{constructor(){super(...arguments);r(this,"state",{});r(this,"handleNameChange",(e,n)=>{this.setState({name:n.value})});r(this,"handleDescriptionChange",(e,n)=>{this.setState({description:n.value})})}getName(e){return typeof this.state.name>"u"?e.name:this.state.name}getDescription(e){return typeof this.state.description>"u"?e.description||"":this.state.description}render(){const{onEdit:e}=this.props,{name:n,description:c}=this.state,l=!n&&!c;return t.jsx(v,{className:"LandEditPage",children:i=>t.jsx(f,{land:i,title:d("edit_page.title"),subtitle:t.jsx(g,{id:"edit_page.subtitle",values:{name:t.jsx("strong",{children:i.name})}}),children:t.jsxs(o.Form,{onSubmit:()=>e(i,this.getName(i),this.getDescription(i)),children:[t.jsx(o.Field,{label:"Name",value:this.getName(i),onChange:this.handleNameChange}),t.jsx(o.Field,{label:"Description",value:this.getDescription(i),onChange:this.handleDescriptionChange}),t.jsxs(o.Row,{children:[t.jsx(u,{className:"cancel",to:x.landDetail(i.id),children:t.jsx(o.Button,{children:d("global.cancel")})}),t.jsx(E,{type:"submit",primary:!0,disabled:l||!this.getName(i)||i.role!==N.OWNER,network:b.Network.ETHEREUM,children:d("global.submit")})]})]})})})}};const P=a=>({onEdit:(s,e,n)=>a(L(s,e,n))}),F=j(null,P)(D);export{F as default};
1
+ var h=Object.defineProperty;var m=(a,s,e)=>s in a?h(a,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[s]=e;var r=(a,s,e)=>m(a,typeof s!="symbol"?s+"":s,e);import{J as p,N as t,M as d,b6 as g,S as o,Q as u,R as x,cq as E,bW as N,cr as b,T as j,ct as L}from"./index-B6_fsGNl.js";import{L as f}from"./LandAction-CiN-M5uK.js";import{L as v}from"./LandProviderPage-DoB5Gv7P.js";import"./Back-FYhl4raf.js";import"./NotFound-D_YPmEFv.js";import"./hooks-Dnsfitqh.js";let D=class extends p.PureComponent{constructor(){super(...arguments);r(this,"state",{});r(this,"handleNameChange",(e,n)=>{this.setState({name:n.value})});r(this,"handleDescriptionChange",(e,n)=>{this.setState({description:n.value})})}getName(e){return typeof this.state.name>"u"?e.name:this.state.name}getDescription(e){return typeof this.state.description>"u"?e.description||"":this.state.description}render(){const{onEdit:e}=this.props,{name:n,description:c}=this.state,l=!n&&!c;return t.jsx(v,{className:"LandEditPage",children:i=>t.jsx(f,{land:i,title:d("edit_page.title"),subtitle:t.jsx(g,{id:"edit_page.subtitle",values:{name:t.jsx("strong",{children:i.name})}}),children:t.jsxs(o.Form,{onSubmit:()=>e(i,this.getName(i),this.getDescription(i)),children:[t.jsx(o.Field,{label:"Name",value:this.getName(i),onChange:this.handleNameChange}),t.jsx(o.Field,{label:"Description",value:this.getDescription(i),onChange:this.handleDescriptionChange}),t.jsxs(o.Row,{children:[t.jsx(u,{className:"cancel",to:x.landDetail(i.id),children:t.jsx(o.Button,{children:d("global.cancel")})}),t.jsx(E,{type:"submit",primary:!0,disabled:l||!this.getName(i)||i.role!==N.OWNER,network:b.Network.ETHEREUM,children:d("global.submit")})]})]})})})}};const P=a=>({onEdit:(s,e,n)=>a(L(s,e,n))}),F=j(null,P)(D);export{F as default};
@@ -1 +1 @@
1
- import{b1 as Re,ak as te,a4 as ae,N as e,d0 as z,M as a,T as ye,d1 as me,a7 as ne,d2 as G,S as s,d3 as Y,d4 as Pe,d5 as M,cO as De,J as l,R as k,aG as le,bQ as Ae,aa as ge,ab as _,d6 as We,d7 as pe,d8 as Oe,bq as L,d9 as Ue,cU as xe,da as se,db as Ce,dc as je,dd as de,de as ue,df as K,dg as Q,P as be,a5 as he,cQ as Be,dh as Me,di as Ie,cR as He,dj as Fe,cc as $e,dk as ze,ac as Ke,aj as Qe,dl as Ge,dm as Ye,cV as Ve,a2 as J,dn as qe,cW as Xe,cX as Je,cd as Ze,dp as es}from"./index-D8smHxXz.js";import{a as we,N as ss}from"./Navigation.container-INpo5kYA.js";import{L as ts}from"./LoggedInDetailPage.container-CCL2zROi.js";import"./selectors-yGlOLvMK.js";import"./SignInRequired-CLAy0k4a.js";var B=(t=>(t.DESC="DESC",t.ASC="ASC",t))(B||{});const Ee="tab";var b=(t=>(t.DCL="dcl",t.ENS="ens",t.CONTRIBUTOR="contributor",t))(b||{});const Ne=()=>{const t=Re(),n=new URLSearchParams(t.search),d=n.get(Ee),m={urlSearchParams:n,pathname:t.pathname};switch(d){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},as=({isWorldContributorEnabled:t})=>{const{tab:n,pathname:d,urlSearchParams:m}=Ne(),c=ae(),g=o=>{const i=new URLSearchParams(m);i.set(Ee,o),c.push(`${d}?${i.toString()}`)};return!n||n===b.CONTRIBUTOR&&!t?(g(b.DCL),null):e.jsxs(z,{children:[e.jsx(z.Tab,{active:n===b.DCL,onClick:()=>g(b.DCL),children:a("worlds_list_page.name_tabs.dcl_names")}),e.jsx(z.Tab,{active:n===b.ENS,onClick:()=>g(b.ENS),children:a("worlds_list_page.name_tabs.ens_names")}),t&&e.jsx(z.Tab,{active:n===b.CONTRIBUTOR,onClick:()=>g(b.CONTRIBUTOR),children:a("worlds_list_page.name_tabs.contributor_names")})]})},ns=te.memo(as),ls=t=>({isWorldContributorEnabled:me(t)}),rs=ye(ls)(ns),os="_container_12bci_1",is="_used_12bci_7",cs="_description_12bci_13",ds="_link_12bci_20",us="_space_12bci_27",bs="_current_12bci_33",hs="_bar_12bci_38",T={container:os,used:is,description:cs,link:ds,space:us,current:bs,bar:hs},_s="worlds-storage-current-mbs",ms="worlds-storage-bar-front",gs="worlds-storage",ps=({maxBytes:t,currentBytes:n,className:d,onViewDetails:m})=>{const c=Y(t),g=Y(n),o=g*100/c;return e.jsxs("div",{"data-testid":gs,className:ne(T.container,d),children:[e.jsx("span",{className:T.used,children:a("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:T.description,children:[e.jsx("span",{children:a("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:T.link,onClick:m,children:a("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:T.space,children:[e.jsxs("div",{"data-testid":_s,children:[e.jsx("span",{className:T.current,children:G(g)})," / ",G(c)," Mb"]}),e.jsx(s.Progress,{"data-testid":ms,percent:Math.trunc(o),className:T.bar,size:"small"})]})]})},xs=te.memo(ps),Cs="_worldUrl_1sb6i_1",js="_rightContainer_1sb6i_7",ws="_copyUrn_1sb6i_13",Z={worldUrl:Cs,rightContainer:js,copyUrn:ws};function Se({ens:t,deploymentsByWorlds:n}){const d=Pe(t.subdomain);return M(n,t)?e.jsxs("div",{className:Z.worldUrl,children:[e.jsx("span",{children:d}),e.jsxs("div",{className:Z.rightContainer,children:[e.jsx(De,{role:"button",text:d,showPopup:!0,children:e.jsx(s.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ne("copy",Z.copyUrn),name:"copy outline"})}),e.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:e.jsx(s.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:a("worlds_list_page.table.empty_url")})}function Te({deploymentsByWorlds:t,ens:n,projects:d,onEditScene:m,onUnpublishScene:c,onPublishScene:g}){const o=t[n.subdomain];return M(t,n)?e.jsxs("div",{className:"publish-scene",children:[e.jsx(s.Popup,{content:o==null?void 0:o.name,on:"hover",trigger:e.jsx("span",{children:o==null?void 0:o.name})}),d.find(i=>i.id===(o==null?void 0:o.projectId))?m&&e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>m(n),children:a("worlds_list_page.table.edit_scene")}):c&&e.jsx(s.Popup,{content:a("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>c(n),children:a("worlds_list_page.table.unpublish_scene")})})]}):e.jsxs("div",{className:"publish-scene",children:[e.jsx("span",{children:"-"}),g&&e.jsx(s.Button,{primary:!0,size:"small",onClick:g,children:a("worlds_list_page.table.publish_scene")})]})}function Es({items:t,deploymentsByWorlds:n,projects:d,loading:m,error:c,onUnpublishWorld:g}){const o=ae(),i=l.useCallback(()=>{o.push(k.scenes())},[o]),E=l.useCallback(p=>{const{projectId:x}=n[p.subdomain];o.push(k.sceneDetail(x))},[n,k,o]),N=l.useCallback(p=>{var C;const x=(C=n[p.subdomain])==null?void 0:C.id;x&&g(x)},[n,g]);return c?e.jsx(s.Message,{error:!0,size:"tiny",visible:!0,content:c.message,header:a("worlds_list_page.error_title")}):m?e.jsx(s.Loader,{active:!0,size:"big"}):t.length?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.owner")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.permissions")})]})}),e.jsx(s.Table.Body,{children:t.map((p,x)=>{var v,R;const C=(v=p.userPermissions)==null?void 0:v.includes("deployment"),f=(R=p.userPermissions)==null?void 0:R.map(y=>a(`worlds_list_page.table.user_permissions.${y}`)).join("/");return e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:1,children:p.name}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Ae,{address:p.nftOwnerAddress||""})}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Se,{deploymentsByWorlds:n,ens:p})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Te,{deploymentsByWorlds:n,ens:p,projects:d,onEditScene:C?E:void 0,onPublishScene:C?i:void 0,onUnpublishScene:C?N:void 0})}),e.jsx(s.Table.Cell,{width:1,children:G(Y(Number(p.size)||0))}),e.jsx(s.Table.Cell,{width:1,children:f})]},x)})})]}):e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:"empty-icon dcl-icon"}),e.jsx("div",{className:"empty-title",children:a("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:a("worlds_list_page.empty_contributor_list.description",{b:p=>e.jsx("b",{children:p})})}),e.jsx(s.Button,{as:"a",href:`${le.get("MARKETPLACE_WEB_URL")}/names/claim`,target:"_blank",className:"empty-action",primary:!0,children:a("worlds_list_page.empty_list.cta")})]})}const Ns=()=>{const t=ge(),n=we(),d=_(We),m=_(pe),c=_(Oe),g=_(i=>L(xe(i),Ue)||L(Ce(i),se)),o=l.useCallback(i=>t(je(i)),[t]);return e.jsx(Es,{items:d,deploymentsByWorlds:m,projects:n,loading:g,error:c,onUnpublishWorld:o})},_e="Worlds List Page Action",Ss=le.get("ENS_DOMAINS_URL",""),Ts=le.get("MARKETPLACE_WEB_URL"),ee=12,Ls=t=>{const{ensList:n,externalNames:d,error:m,deploymentsByWorlds:c,isLoading:g,projects:o,worldsWalletStats:i,isConnected:E,isWorldContributorEnabled:N,ensTotal:p,onOpenYourStorageModal:x,onOpenWorldsForENSOwnersAnnouncementModal:C,onUnpublishWorld:f,onOpenPermissionsModal:v,onFetchContributableNames:R,onFetchENSList:y}=t,[I,P]=l.useState(B.DESC),[O,U]=l.useState(1),{tab:h}=Ne(),D=ae();l.useEffect(()=>{E&&N&&R()},[E,N]),l.useEffect(()=>{h===b.DCL&&y(ee,(O-1)*ee)},[y,O]);const A=l.useCallback(()=>{h===b.DCL?(de(_e,{action:"Click Claim NAME"}),window.open(`${Ts}/names/claim`,"_blank","noopener,noreferrer")):(de(_e,{action:"Click Claim ENS Domain"}),window.open(Ss,"_blank","noopener,noreferrer"))},[h]),V=l.useCallback(()=>{D.push(k.scenes())},[k,D]),q=l.useCallback(u=>{const{projectId:r}=c[u.subdomain];D.push(k.sceneDetail(r))},[c,k,D]),w=l.useCallback(u=>{var j;const r=(j=c[u.subdomain])==null?void 0:j.id;r&&f(r)},[c,f]),W=l.useCallback((u,r)=>{U(+r.activePage)},[]),re=l.useCallback(()=>e.jsx(s.Dropdown,{direction:"left",value:I,options:[{value:B.ASC,text:a("global.order.name_asc")},{value:B.DESC,text:a("global.order.name_desc")}],onChange:(u,{value:r})=>P(r)}),[I,P]),oe=l.useCallback(u=>{let r=M(c,u)?"active":"inactive";if(r==="active"&&i&&!ue(u.subdomain))switch(K(i).status){case Q.BLOCKED:{r="blocked";break}case Q.TO_BE_BLOCKED:r="warning"}return e.jsx("span",{className:`world-status ${r}`,children:a(`worlds_list_page.table.status_${r}`)})},[c,K,ue,M]),ie=l.useCallback((u,r)=>{var $;const j=h===b.DCL?r==null?void 0:r.dclNames:r==null?void 0:r.ensNames;if(!M(c,u)||!j)return"-";const S=($=j.find(ve=>ve.name===u.subdomain))==null?void 0:$.size,X=h===b.ENS?" / 25":"";return G(Y(Number(S)))+X},[h]),Le=l.useCallback((u,r)=>{v(r)},[]),H=l.useCallback(()=>{const u=h===b.DCL?p:d.length,r=Math.ceil(u/ee),j=h===b.DCL?n:d;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{children:e.jsx(s.Row,{children:e.jsx(s.Header,{sub:!0,className:"items-count",children:a("ens_list_page.items",{count:t.ensTotal.toLocaleString()})})})}),e.jsx(s.Column,{align:"right",children:e.jsx(s.Row,{children:re()})}),e.jsx(s.Column,{align:"right",grow:!1,shrink:!0,children:e.jsx(s.Row,{children:e.jsx("div",{className:"actions",children:e.jsx(s.Button,{basic:!0,onClick:A,children:e.jsx(be,{name:"add-active"})})})})})]})})}),e.jsx(s.Container,{children:e.jsxs(s.Section,{className:"table-section",children:[e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.status")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(s.Table.Body,{children:j.map((S,X)=>e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:2,children:S.name}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Se,{deploymentsByWorlds:c,ens:S})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Te,{deploymentsByWorlds:c,ens:S,projects:o,onEditScene:q,onPublishScene:V,onUnpublishScene:w})}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:ie(S,i)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:oe(S)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:e.jsx(s.Button,{basic:!0,onClick:$=>Le($,S.subdomain),children:a("worlds_list_page.table.permissions")})})]},X))})]}),r>1&&e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:r,activePage:O,onPageChange:W})]})})]})},[h,n,d,A,re,ie,oe,W,p]),F=l.useCallback(()=>e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ne("empty-icon",h===b.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:h===b.DCL?a("worlds_list_page.empty_list.title"):a("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:h===b.DCL?a("worlds_list_page.empty_list.description",{b:u=>e.jsx("b",{children:u})}):a("worlds_list_page.empty_list.description_ens",{b:u=>e.jsx("b",{children:u})})}),e.jsx(s.Button,{className:"empty-action",primary:!0,onClick:A,children:h===b.DCL?a("worlds_list_page.empty_list.cta"):a("worlds_list_page.empty_list.cta_ens")})]}),[h,A]),ce=l.useCallback(()=>{if(!i)return null;const u=K(i);if(u.status===Q.OK)return null;let r;return u.status===Q.TO_BE_BLOCKED?r=a("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:u.toBeBlockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}):r=a("worlds_list_page.worlds_warning_message.blocked",{blockedAt:u.blockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}),e.jsxs("div",{className:"insufficient-storage-message",children:[e.jsx("div",{children:e.jsx(be,{name:"alert-warning"})}),e.jsx("div",{children:r})]})},[i,K]),ke=l.useCallback(()=>n.length?e.jsxs("div",{children:[i?e.jsx(xs,{maxBytes:Number(i.maxAllowedSpace),currentBytes:Number(i.usedSpace),className:"worlds-storage",onViewDetails:()=>{x({stats:i})}}):null,ce(),H()]}):e.jsx("div",{children:F()}),[n,i,H,F,ce,x]),fe=l.useCallback(()=>e.jsx("div",{children:d.length>0?H():F()}),[d,F,H]);return l.useEffect(()=>{P(B.ASC),U(1)},[h,U,P]),l.useEffect(()=>{he()&&C()},[he,C]),e.jsx(ts,{className:"WorldListPage view",error:m,activeTab:ss.WORLDS,isLoading:g,isPageFullscreen:!0,children:e.jsxs(s.Container,{children:[e.jsx("h1",{children:a("worlds_list_page.title")}),e.jsx(rs,{}),h===b.DCL&&ke(),h===b.ENS&&fe(),h===b.CONTRIBUTOR&&N&&e.jsx(Ns,{})]})})},ks=te.memo(Ls),fs=()=>{const t=ge(),n=we(),d=_(Be),m=_(Me),c=_(pe),g=_(Ie),o=_(He),i=_(Fe),E=_(xe),N=_(Ce),p=_($e),x=_(ze),C=_(Ke),f=_(Qe),v=_(Ge),R=_(Ye),y=_(me),I=_(Ve),P=(o==null?void 0:o.message)??i??void 0,O=l.useMemo(()=>L(E,Je)||L(N,se)||L(p,Ze)||L(x,se)||L(E,es)||C,[E,N,p,x,C]),U=l.useCallback(w=>t(J("WorldsYourStorageModal",w)),[t]),h=l.useCallback((w,W)=>t(J("WorldPermissionsModal",{worldName:w,isCollaboratorsTabShown:W})),[t]),D=l.useCallback(()=>t(J("WorldsForENSOwnersAnnouncementModal")),[t]),A=l.useCallback(w=>t(je(w)),[t]),V=l.useCallback(()=>t(qe()),[t]),q=l.useCallback((w,W)=>t(Xe(w,W)),[t]);return e.jsx(ks,{ensList:d,externalNames:m,deploymentsByWorlds:c,projects:n,worldsPermissions:g,error:P,isLoading:O,isLoggedIn:f,worldsWalletStats:v,isConnected:R,isWorldContributorEnabled:y,ensTotal:I,onOpenYourStorageModal:U,onOpenPermissionsModal:h,onOpenWorldsForENSOwnersAnnouncementModal:D,onUnpublishWorld:A,onFetchContributableNames:V,onFetchENSList:q})},As=fs;export{As as default};
1
+ import{b1 as Re,ak as te,a4 as ae,N as e,d0 as z,M as a,T as ye,d1 as me,a7 as ne,d2 as G,S as s,d3 as Y,d4 as Pe,d5 as M,cO as De,J as l,R as k,aG as le,bQ as Ae,aa as ge,ab as _,d6 as We,d7 as pe,d8 as Oe,bq as L,d9 as Ue,cU as xe,da as se,db as Ce,dc as je,dd as de,de as ue,df as K,dg as Q,P as be,a5 as he,cQ as Be,dh as Me,di as Ie,cR as He,dj as Fe,cc as $e,dk as ze,ac as Ke,aj as Qe,dl as Ge,dm as Ye,cV as Ve,a2 as J,dn as qe,cW as Xe,cX as Je,cd as Ze,dp as es}from"./index-B6_fsGNl.js";import{a as we,N as ss}from"./Navigation.container-xyyd5mUr.js";import{L as ts}from"./LoggedInDetailPage.container-DbQebeQd.js";import"./selectors-BtqWSHNR.js";import"./SignInRequired-h6B_5gxX.js";var B=(t=>(t.DESC="DESC",t.ASC="ASC",t))(B||{});const Ee="tab";var b=(t=>(t.DCL="dcl",t.ENS="ens",t.CONTRIBUTOR="contributor",t))(b||{});const Ne=()=>{const t=Re(),n=new URLSearchParams(t.search),d=n.get(Ee),m={urlSearchParams:n,pathname:t.pathname};switch(d){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},as=({isWorldContributorEnabled:t})=>{const{tab:n,pathname:d,urlSearchParams:m}=Ne(),c=ae(),g=o=>{const i=new URLSearchParams(m);i.set(Ee,o),c.push(`${d}?${i.toString()}`)};return!n||n===b.CONTRIBUTOR&&!t?(g(b.DCL),null):e.jsxs(z,{children:[e.jsx(z.Tab,{active:n===b.DCL,onClick:()=>g(b.DCL),children:a("worlds_list_page.name_tabs.dcl_names")}),e.jsx(z.Tab,{active:n===b.ENS,onClick:()=>g(b.ENS),children:a("worlds_list_page.name_tabs.ens_names")}),t&&e.jsx(z.Tab,{active:n===b.CONTRIBUTOR,onClick:()=>g(b.CONTRIBUTOR),children:a("worlds_list_page.name_tabs.contributor_names")})]})},ns=te.memo(as),ls=t=>({isWorldContributorEnabled:me(t)}),rs=ye(ls)(ns),os="_container_12bci_1",is="_used_12bci_7",cs="_description_12bci_13",ds="_link_12bci_20",us="_space_12bci_27",bs="_current_12bci_33",hs="_bar_12bci_38",T={container:os,used:is,description:cs,link:ds,space:us,current:bs,bar:hs},_s="worlds-storage-current-mbs",ms="worlds-storage-bar-front",gs="worlds-storage",ps=({maxBytes:t,currentBytes:n,className:d,onViewDetails:m})=>{const c=Y(t),g=Y(n),o=g*100/c;return e.jsxs("div",{"data-testid":gs,className:ne(T.container,d),children:[e.jsx("span",{className:T.used,children:a("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:T.description,children:[e.jsx("span",{children:a("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:T.link,onClick:m,children:a("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:T.space,children:[e.jsxs("div",{"data-testid":_s,children:[e.jsx("span",{className:T.current,children:G(g)})," / ",G(c)," Mb"]}),e.jsx(s.Progress,{"data-testid":ms,percent:Math.trunc(o),className:T.bar,size:"small"})]})]})},xs=te.memo(ps),Cs="_worldUrl_1sb6i_1",js="_rightContainer_1sb6i_7",ws="_copyUrn_1sb6i_13",Z={worldUrl:Cs,rightContainer:js,copyUrn:ws};function Se({ens:t,deploymentsByWorlds:n}){const d=Pe(t.subdomain);return M(n,t)?e.jsxs("div",{className:Z.worldUrl,children:[e.jsx("span",{children:d}),e.jsxs("div",{className:Z.rightContainer,children:[e.jsx(De,{role:"button",text:d,showPopup:!0,children:e.jsx(s.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ne("copy",Z.copyUrn),name:"copy outline"})}),e.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:e.jsx(s.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:a("worlds_list_page.table.empty_url")})}function Te({deploymentsByWorlds:t,ens:n,projects:d,onEditScene:m,onUnpublishScene:c,onPublishScene:g}){const o=t[n.subdomain];return M(t,n)?e.jsxs("div",{className:"publish-scene",children:[e.jsx(s.Popup,{content:o==null?void 0:o.name,on:"hover",trigger:e.jsx("span",{children:o==null?void 0:o.name})}),d.find(i=>i.id===(o==null?void 0:o.projectId))?m&&e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>m(n),children:a("worlds_list_page.table.edit_scene")}):c&&e.jsx(s.Popup,{content:a("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>c(n),children:a("worlds_list_page.table.unpublish_scene")})})]}):e.jsxs("div",{className:"publish-scene",children:[e.jsx("span",{children:"-"}),g&&e.jsx(s.Button,{primary:!0,size:"small",onClick:g,children:a("worlds_list_page.table.publish_scene")})]})}function Es({items:t,deploymentsByWorlds:n,projects:d,loading:m,error:c,onUnpublishWorld:g}){const o=ae(),i=l.useCallback(()=>{o.push(k.scenes())},[o]),E=l.useCallback(p=>{const{projectId:x}=n[p.subdomain];o.push(k.sceneDetail(x))},[n,k,o]),N=l.useCallback(p=>{var C;const x=(C=n[p.subdomain])==null?void 0:C.id;x&&g(x)},[n,g]);return c?e.jsx(s.Message,{error:!0,size:"tiny",visible:!0,content:c.message,header:a("worlds_list_page.error_title")}):m?e.jsx(s.Loader,{active:!0,size:"big"}):t.length?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.owner")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.permissions")})]})}),e.jsx(s.Table.Body,{children:t.map((p,x)=>{var v,R;const C=(v=p.userPermissions)==null?void 0:v.includes("deployment"),f=(R=p.userPermissions)==null?void 0:R.map(y=>a(`worlds_list_page.table.user_permissions.${y}`)).join("/");return e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:1,children:p.name}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Ae,{address:p.nftOwnerAddress||""})}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Se,{deploymentsByWorlds:n,ens:p})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Te,{deploymentsByWorlds:n,ens:p,projects:d,onEditScene:C?E:void 0,onPublishScene:C?i:void 0,onUnpublishScene:C?N:void 0})}),e.jsx(s.Table.Cell,{width:1,children:G(Y(Number(p.size)||0))}),e.jsx(s.Table.Cell,{width:1,children:f})]},x)})})]}):e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:"empty-icon dcl-icon"}),e.jsx("div",{className:"empty-title",children:a("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:a("worlds_list_page.empty_contributor_list.description",{b:p=>e.jsx("b",{children:p})})}),e.jsx(s.Button,{as:"a",href:`${le.get("MARKETPLACE_WEB_URL")}/names/claim`,target:"_blank",className:"empty-action",primary:!0,children:a("worlds_list_page.empty_list.cta")})]})}const Ns=()=>{const t=ge(),n=we(),d=_(We),m=_(pe),c=_(Oe),g=_(i=>L(xe(i),Ue)||L(Ce(i),se)),o=l.useCallback(i=>t(je(i)),[t]);return e.jsx(Es,{items:d,deploymentsByWorlds:m,projects:n,loading:g,error:c,onUnpublishWorld:o})},_e="Worlds List Page Action",Ss=le.get("ENS_DOMAINS_URL",""),Ts=le.get("MARKETPLACE_WEB_URL"),ee=12,Ls=t=>{const{ensList:n,externalNames:d,error:m,deploymentsByWorlds:c,isLoading:g,projects:o,worldsWalletStats:i,isConnected:E,isWorldContributorEnabled:N,ensTotal:p,onOpenYourStorageModal:x,onOpenWorldsForENSOwnersAnnouncementModal:C,onUnpublishWorld:f,onOpenPermissionsModal:v,onFetchContributableNames:R,onFetchENSList:y}=t,[I,P]=l.useState(B.DESC),[O,U]=l.useState(1),{tab:h}=Ne(),D=ae();l.useEffect(()=>{E&&N&&R()},[E,N]),l.useEffect(()=>{h===b.DCL&&y(ee,(O-1)*ee)},[y,O]);const A=l.useCallback(()=>{h===b.DCL?(de(_e,{action:"Click Claim NAME"}),window.open(`${Ts}/names/claim`,"_blank","noopener,noreferrer")):(de(_e,{action:"Click Claim ENS Domain"}),window.open(Ss,"_blank","noopener,noreferrer"))},[h]),V=l.useCallback(()=>{D.push(k.scenes())},[k,D]),q=l.useCallback(u=>{const{projectId:r}=c[u.subdomain];D.push(k.sceneDetail(r))},[c,k,D]),w=l.useCallback(u=>{var j;const r=(j=c[u.subdomain])==null?void 0:j.id;r&&f(r)},[c,f]),W=l.useCallback((u,r)=>{U(+r.activePage)},[]),re=l.useCallback(()=>e.jsx(s.Dropdown,{direction:"left",value:I,options:[{value:B.ASC,text:a("global.order.name_asc")},{value:B.DESC,text:a("global.order.name_desc")}],onChange:(u,{value:r})=>P(r)}),[I,P]),oe=l.useCallback(u=>{let r=M(c,u)?"active":"inactive";if(r==="active"&&i&&!ue(u.subdomain))switch(K(i).status){case Q.BLOCKED:{r="blocked";break}case Q.TO_BE_BLOCKED:r="warning"}return e.jsx("span",{className:`world-status ${r}`,children:a(`worlds_list_page.table.status_${r}`)})},[c,K,ue,M]),ie=l.useCallback((u,r)=>{var $;const j=h===b.DCL?r==null?void 0:r.dclNames:r==null?void 0:r.ensNames;if(!M(c,u)||!j)return"-";const S=($=j.find(ve=>ve.name===u.subdomain))==null?void 0:$.size,X=h===b.ENS?" / 25":"";return G(Y(Number(S)))+X},[h]),Le=l.useCallback((u,r)=>{v(r)},[]),H=l.useCallback(()=>{const u=h===b.DCL?p:d.length,r=Math.ceil(u/ee),j=h===b.DCL?n:d;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{children:e.jsx(s.Row,{children:e.jsx(s.Header,{sub:!0,className:"items-count",children:a("ens_list_page.items",{count:t.ensTotal.toLocaleString()})})})}),e.jsx(s.Column,{align:"right",children:e.jsx(s.Row,{children:re()})}),e.jsx(s.Column,{align:"right",grow:!1,shrink:!0,children:e.jsx(s.Row,{children:e.jsx("div",{className:"actions",children:e.jsx(s.Button,{basic:!0,onClick:A,children:e.jsx(be,{name:"add-active"})})})})})]})})}),e.jsx(s.Container,{children:e.jsxs(s.Section,{className:"table-section",children:[e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.status")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(s.Table.Body,{children:j.map((S,X)=>e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:2,children:S.name}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Se,{deploymentsByWorlds:c,ens:S})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Te,{deploymentsByWorlds:c,ens:S,projects:o,onEditScene:q,onPublishScene:V,onUnpublishScene:w})}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:ie(S,i)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:oe(S)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:e.jsx(s.Button,{basic:!0,onClick:$=>Le($,S.subdomain),children:a("worlds_list_page.table.permissions")})})]},X))})]}),r>1&&e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:r,activePage:O,onPageChange:W})]})})]})},[h,n,d,A,re,ie,oe,W,p]),F=l.useCallback(()=>e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ne("empty-icon",h===b.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:h===b.DCL?a("worlds_list_page.empty_list.title"):a("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:h===b.DCL?a("worlds_list_page.empty_list.description",{b:u=>e.jsx("b",{children:u})}):a("worlds_list_page.empty_list.description_ens",{b:u=>e.jsx("b",{children:u})})}),e.jsx(s.Button,{className:"empty-action",primary:!0,onClick:A,children:h===b.DCL?a("worlds_list_page.empty_list.cta"):a("worlds_list_page.empty_list.cta_ens")})]}),[h,A]),ce=l.useCallback(()=>{if(!i)return null;const u=K(i);if(u.status===Q.OK)return null;let r;return u.status===Q.TO_BE_BLOCKED?r=a("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:u.toBeBlockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}):r=a("worlds_list_page.worlds_warning_message.blocked",{blockedAt:u.blockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}),e.jsxs("div",{className:"insufficient-storage-message",children:[e.jsx("div",{children:e.jsx(be,{name:"alert-warning"})}),e.jsx("div",{children:r})]})},[i,K]),ke=l.useCallback(()=>n.length?e.jsxs("div",{children:[i?e.jsx(xs,{maxBytes:Number(i.maxAllowedSpace),currentBytes:Number(i.usedSpace),className:"worlds-storage",onViewDetails:()=>{x({stats:i})}}):null,ce(),H()]}):e.jsx("div",{children:F()}),[n,i,H,F,ce,x]),fe=l.useCallback(()=>e.jsx("div",{children:d.length>0?H():F()}),[d,F,H]);return l.useEffect(()=>{P(B.ASC),U(1)},[h,U,P]),l.useEffect(()=>{he()&&C()},[he,C]),e.jsx(ts,{className:"WorldListPage view",error:m,activeTab:ss.WORLDS,isLoading:g,isPageFullscreen:!0,children:e.jsxs(s.Container,{children:[e.jsx("h1",{children:a("worlds_list_page.title")}),e.jsx(rs,{}),h===b.DCL&&ke(),h===b.ENS&&fe(),h===b.CONTRIBUTOR&&N&&e.jsx(Ns,{})]})})},ks=te.memo(Ls),fs=()=>{const t=ge(),n=we(),d=_(Be),m=_(Me),c=_(pe),g=_(Ie),o=_(He),i=_(Fe),E=_(xe),N=_(Ce),p=_($e),x=_(ze),C=_(Ke),f=_(Qe),v=_(Ge),R=_(Ye),y=_(me),I=_(Ve),P=(o==null?void 0:o.message)??i??void 0,O=l.useMemo(()=>L(E,Je)||L(N,se)||L(p,Ze)||L(x,se)||L(E,es)||C,[E,N,p,x,C]),U=l.useCallback(w=>t(J("WorldsYourStorageModal",w)),[t]),h=l.useCallback((w,W)=>t(J("WorldPermissionsModal",{worldName:w,isCollaboratorsTabShown:W})),[t]),D=l.useCallback(()=>t(J("WorldsForENSOwnersAnnouncementModal")),[t]),A=l.useCallback(w=>t(je(w)),[t]),V=l.useCallback(()=>t(qe()),[t]),q=l.useCallback((w,W)=>t(Xe(w,W)),[t]);return e.jsx(ks,{ensList:d,externalNames:m,deploymentsByWorlds:c,projects:n,worldsPermissions:g,error:P,isLoading:O,isLoggedIn:f,worldsWalletStats:v,isConnected:R,isWorldContributorEnabled:y,ensTotal:I,onOpenYourStorageModal:U,onOpenPermissionsModal:h,onOpenWorldsForENSOwnersAnnouncementModal:D,onUnpublishWorld:A,onFetchContributableNames:V,onFetchENSList:q})},As=fs;export{As as default};
@@ -1 +1 @@
1
- var E=Object.defineProperty;var _=(n,t,a)=>t in n?E(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a;var j=(n,t,a)=>_(n,typeof t!="symbol"?t+"":t,a);import{J as R,N as e,b6 as v,M as r,bN as T,S as s,R as k,bO as y,bP as D,bQ as I,bR as f,bS as S,T as O,bE as F,bT as $,bU as H,bV as h,bW as g,bD as C,bX as V,bY as B,bZ as G}from"./index-D8smHxXz.js";import{N as W}from"./Navigation.container-INpo5kYA.js";import{L as M}from"./LoggedInDetailPage.container-CCL2zROi.js";import{R as X}from"./RentalPeriod-DHBQzrUH.js";import"./selectors-yGlOLvMK.js";import"./SignInRequired-CLAy0k4a.js";import"./index-B786w02A.js";const Y=n=>n.ui.land,Z=n=>Y(n).view;class A extends R.PureComponent{render(){const{list:t}=this.props;switch(t.length){case 0:return r("global.none");case 1:return t[0];case 2:return e.jsx(v,{id:"list.two",values:{first:t[0],second:t[1]}});default:return e.jsx(v,{id:"list.two",values:{first:t[0],second:r("list.more",{count:t.length-1})}})}}}const q=(n,t)=>f(n,S)?1:f(t,S)?-1:n>t?1:-1;let z=class extends R.PureComponent{render(){const{land:t,deployments:a,rental:l,history:o}=this.props,{x:d,y:p}=T(t);return e.jsxs(s.Table.Row,{className:"TableRow",onClick:()=>o.push(k.landDetail(t.id)),children:[e.jsx(s.Table.Cell,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{width:67,grow:!1,shrink:!1,children:e.jsx(y,{landId:t.id,width:45,height:45,isDraggable:!1,size:9})}),e.jsx(s.Column,{className:"name",children:e.jsxs("div",{children:[t.name," ",e.jsx("span",{className:"secondary-text",children:D(d,p)})]})})]})}),e.jsx(s.Table.Cell,{children:e.jsxs("div",{children:[r(`roles.${t.role}`)," ",l?e.jsx(X,{land:t,rental:l}):null]})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:t.operators.sort(q).map(c=>e.jsx(I,{address:c}))})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:a.map(c=>c.name)})})]})}};const J=(n,t)=>{const{land:a}=t,o=$(n)[a.id]||[],d=H(n,a);return{deployments:o,rental:d}},Q=O(J)(F(z)),b=20;let U=class extends R.PureComponent{constructor(){super(...arguments);j(this,"state",{showOwner:!0,showOperator:!0,showLessor:!0,showTenant:!0,page:1,selectedLand:0});j(this,"handleNext",()=>{const{selectedLand:a}=this.state,l=this.getFilteredLands();a===l.length-1?this.setState({selectedLand:0}):this.setState({selectedLand:a+1})});j(this,"handlePrev",()=>{const{selectedLand:a}=this.state;if(a===0){const l=this.getFilteredLands();this.setState({selectedLand:l.length-1})}else this.setState({selectedLand:a-1})})}componentWillReceiveProps(a){a.lands!==this.props.lands&&this.setState({page:1})}renderLand(){const{view:a,onSetView:l}=this.props,{page:o,showOwner:d,showOperator:p,showTenant:c,showLessor:u,selectedLand:N}=this.state,i=this.getFilteredLands(),P=Math.ceil(i.length/b);let w,L;if(i.length>1&&N<i.length){const{x:m,y:x}=T(i[N]);w=m,L=x}else if(i.length===1){const{x:m,y:x}=T(i[0]);w=m,L=x}return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{height:30,children:[e.jsx(s.Column,{children:e.jsxs(s.Row,{children:[e.jsx(s.Header,{sub:!0,children:r("land_page.results",{count:i.length.toLocaleString()})}),a===h.ATLAS&&i.length>1?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"arrow prev",onClick:this.handlePrev}),e.jsx("div",{className:"arrow next",onClick:this.handleNext})]}):null]})}),e.jsx(s.Column,{align:"right",children:e.jsxs(s.Row,{children:[e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{value:"owner",checked:d,onClick:()=>this.setState({showOwner:!d}),label:r(`roles.${g.OWNER}`)}),content:r("land_page.owner_explanation")}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"operator-checkbox",value:"operator",checked:p,onClick:()=>this.setState({showOperator:!p}),label:r(`roles.${g.OPERATOR}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.operator_explanation")})}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"tenant-checkbox",value:"tentant",checked:c,onClick:()=>this.setState({showTenant:!c}),label:r(`roles.${g.TENANT}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.tenant_explanation")})}),e.jsx(C,{className:"grid",icon:"table",isActive:a===h.GRID,onClick:()=>l(h.GRID)}),e.jsx(C,{className:"atlas",icon:"pin",isActive:a===h.ATLAS,onClick:()=>l(h.ATLAS)})]})})]})})}),a===h.GRID?e.jsxs(s.Container,{children:[e.jsx(s.Section,{className:"table-section",children:i.length>0?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.name")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.role")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.operated_by")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.online_scenes")})]})}),e.jsx(s.Table.Body,{children:i.slice((o-1)*b,o*b).map((m,x)=>e.jsx(Q,{land:m},x))})]}):null}),P>1?e.jsx(s.Section,{className:"pagination-section",children:e.jsx(s.Pagination,{firstItem:null,lastItem:null,activePage:o,onPageChange:(m,x)=>this.setState({page:+x.activePage}),totalPages:P})}):null]}):e.jsx("div",{className:"atlas-wrapper",children:e.jsx(y,{className:"main",x:w,y:L,showOperator:p,showOwner:d,showTenant:c,showLessor:u,hasPopup:!0})})]})}getFilteredLands(){const{lands:a}=this.props,{showOwner:l,showOperator:o,showLessor:d,showTenant:p}=this.state;return a.filter(u=>!!(l&&u.roles.includes(g.OWNER)||o&&u.roles.includes(g.OPERATOR)||p&&u.roles.includes(g.TENANT)||d&&u.roles.includes(g.LESSOR)))}render(){const{isLoading:a,view:l}=this.props;return e.jsx(M,{className:`LandPage ${l}-view`,activeTab:W.LAND,isLoading:a,isPageFullscreen:!0,isFooterFullscreen:l===h.ATLAS,isNavigationFullscreen:l===h.ATLAS,children:this.renderLand()})}};const K=n=>({lands:V(n),view:Z(n),isLoading:B(n)}),ee=n=>({onSetView:t=>n(G(t))}),he=O(K,ee)(U);export{he as default};
1
+ var E=Object.defineProperty;var _=(n,t,a)=>t in n?E(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a;var j=(n,t,a)=>_(n,typeof t!="symbol"?t+"":t,a);import{J as R,N as e,b6 as v,M as r,bN as T,S as s,R as k,bO as y,bP as D,bQ as I,bR as f,bS as S,T as O,bE as F,bT as $,bU as H,bV as h,bW as g,bD as C,bX as V,bY as B,bZ as G}from"./index-B6_fsGNl.js";import{N as W}from"./Navigation.container-xyyd5mUr.js";import{L as M}from"./LoggedInDetailPage.container-DbQebeQd.js";import{R as X}from"./RentalPeriod-BkfdHTyn.js";import"./selectors-BtqWSHNR.js";import"./SignInRequired-h6B_5gxX.js";import"./index-V4kU507t.js";const Y=n=>n.ui.land,Z=n=>Y(n).view;class A extends R.PureComponent{render(){const{list:t}=this.props;switch(t.length){case 0:return r("global.none");case 1:return t[0];case 2:return e.jsx(v,{id:"list.two",values:{first:t[0],second:t[1]}});default:return e.jsx(v,{id:"list.two",values:{first:t[0],second:r("list.more",{count:t.length-1})}})}}}const q=(n,t)=>f(n,S)?1:f(t,S)?-1:n>t?1:-1;let z=class extends R.PureComponent{render(){const{land:t,deployments:a,rental:l,history:o}=this.props,{x:d,y:p}=T(t);return e.jsxs(s.Table.Row,{className:"TableRow",onClick:()=>o.push(k.landDetail(t.id)),children:[e.jsx(s.Table.Cell,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{width:67,grow:!1,shrink:!1,children:e.jsx(y,{landId:t.id,width:45,height:45,isDraggable:!1,size:9})}),e.jsx(s.Column,{className:"name",children:e.jsxs("div",{children:[t.name," ",e.jsx("span",{className:"secondary-text",children:D(d,p)})]})})]})}),e.jsx(s.Table.Cell,{children:e.jsxs("div",{children:[r(`roles.${t.role}`)," ",l?e.jsx(X,{land:t,rental:l}):null]})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:t.operators.sort(q).map(c=>e.jsx(I,{address:c}))})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:a.map(c=>c.name)})})]})}};const J=(n,t)=>{const{land:a}=t,o=$(n)[a.id]||[],d=H(n,a);return{deployments:o,rental:d}},Q=O(J)(F(z)),b=20;let U=class extends R.PureComponent{constructor(){super(...arguments);j(this,"state",{showOwner:!0,showOperator:!0,showLessor:!0,showTenant:!0,page:1,selectedLand:0});j(this,"handleNext",()=>{const{selectedLand:a}=this.state,l=this.getFilteredLands();a===l.length-1?this.setState({selectedLand:0}):this.setState({selectedLand:a+1})});j(this,"handlePrev",()=>{const{selectedLand:a}=this.state;if(a===0){const l=this.getFilteredLands();this.setState({selectedLand:l.length-1})}else this.setState({selectedLand:a-1})})}componentWillReceiveProps(a){a.lands!==this.props.lands&&this.setState({page:1})}renderLand(){const{view:a,onSetView:l}=this.props,{page:o,showOwner:d,showOperator:p,showTenant:c,showLessor:u,selectedLand:N}=this.state,i=this.getFilteredLands(),P=Math.ceil(i.length/b);let w,L;if(i.length>1&&N<i.length){const{x:m,y:x}=T(i[N]);w=m,L=x}else if(i.length===1){const{x:m,y:x}=T(i[0]);w=m,L=x}return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{height:30,children:[e.jsx(s.Column,{children:e.jsxs(s.Row,{children:[e.jsx(s.Header,{sub:!0,children:r("land_page.results",{count:i.length.toLocaleString()})}),a===h.ATLAS&&i.length>1?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"arrow prev",onClick:this.handlePrev}),e.jsx("div",{className:"arrow next",onClick:this.handleNext})]}):null]})}),e.jsx(s.Column,{align:"right",children:e.jsxs(s.Row,{children:[e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{value:"owner",checked:d,onClick:()=>this.setState({showOwner:!d}),label:r(`roles.${g.OWNER}`)}),content:r("land_page.owner_explanation")}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"operator-checkbox",value:"operator",checked:p,onClick:()=>this.setState({showOperator:!p}),label:r(`roles.${g.OPERATOR}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.operator_explanation")})}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"tenant-checkbox",value:"tentant",checked:c,onClick:()=>this.setState({showTenant:!c}),label:r(`roles.${g.TENANT}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.tenant_explanation")})}),e.jsx(C,{className:"grid",icon:"table",isActive:a===h.GRID,onClick:()=>l(h.GRID)}),e.jsx(C,{className:"atlas",icon:"pin",isActive:a===h.ATLAS,onClick:()=>l(h.ATLAS)})]})})]})})}),a===h.GRID?e.jsxs(s.Container,{children:[e.jsx(s.Section,{className:"table-section",children:i.length>0?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.name")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.role")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.operated_by")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.online_scenes")})]})}),e.jsx(s.Table.Body,{children:i.slice((o-1)*b,o*b).map((m,x)=>e.jsx(Q,{land:m},x))})]}):null}),P>1?e.jsx(s.Section,{className:"pagination-section",children:e.jsx(s.Pagination,{firstItem:null,lastItem:null,activePage:o,onPageChange:(m,x)=>this.setState({page:+x.activePage}),totalPages:P})}):null]}):e.jsx("div",{className:"atlas-wrapper",children:e.jsx(y,{className:"main",x:w,y:L,showOperator:p,showOwner:d,showTenant:c,showLessor:u,hasPopup:!0})})]})}getFilteredLands(){const{lands:a}=this.props,{showOwner:l,showOperator:o,showLessor:d,showTenant:p}=this.state;return a.filter(u=>!!(l&&u.roles.includes(g.OWNER)||o&&u.roles.includes(g.OPERATOR)||p&&u.roles.includes(g.TENANT)||d&&u.roles.includes(g.LESSOR)))}render(){const{isLoading:a,view:l}=this.props;return e.jsx(M,{className:`LandPage ${l}-view`,activeTab:W.LAND,isLoading:a,isPageFullscreen:!0,isFooterFullscreen:l===h.ATLAS,isNavigationFullscreen:l===h.ATLAS,children:this.renderLand()})}};const K=n=>({lands:V(n),view:Z(n),isLoading:B(n)}),ee=n=>({onSetView:t=>n(G(t))}),he=O(K,ee)(U);export{he as default};
@@ -0,0 +1 @@
1
+ import{aq as o}from"./index-B6_fsGNl.js";export{o as default};
@@ -1 +1 @@
1
- var B=Object.defineProperty;var D=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>D(e,typeof t!="symbol"?t+"":t,n);import{a4 as f,J as d,aF as $,aG as E,aH as v,M as _,N as s,S as o,P as g,O as U,T,ay as j,aI as O,aJ as V,aK as w,aL as y,a2 as k,aM as M,aj as A,aN as G,aO as J,aP as X,aQ as z}from"./index-D8smHxXz.js";import{S as H}from"./SignInRequired-CLAy0k4a.js";const K="_container_1abv2_1",q="_nameContainer_1abv2_8",F="_editNameBtn_1abv2_20",Y="_actions_1abv2_30",Q="_downloadBtn_1abv2_36",W="_button_1abv2_13",I={container:K,nameContainer:q,editNameBtn:F,actions:Y,downloadBtn:Q,button:W},Z=E.get("EXPLORER_URL",""),ee=E.get("BUILDER_SERVER_URL",""),se=E.get("PEER_TESTING_URL","");function te({currentProject:e,metrics:t,limits:n,areEntitiesOutOfBoundaries:r,isUploading:c,onOpenModal:l}){const b=f(),m=d.useCallback(()=>{l("ExportModal",{project:e})},[e,l]),u=d.useCallback(()=>{l("EditProjectModal")},[l]),a=d.useCallback(()=>{l("DeployModal",{view:$.NONE,projectId:e.id})},[l,e]),h=d.useMemo(()=>{if(!e)return"";const i=new URL(Z);return i.searchParams.set("skipSetup","true"),i.searchParams.set("realm",`${ee}/projects/${e.id}`),i.searchParams.set("DEBUG_MODE","true"),E.is(v.Env.DEVELOPMENT)?(i.searchParams.set("NETWORK","sepolia"),i.searchParams.set("DEBUG_SCENE_LOG","")):i.searchParams.set("CATALYST",se),i.toString()},[]),N=d.useMemo(()=>Object.keys(t).some(i=>t[i]>n[i]),[t]),x=d.useMemo(()=>c||r,[t,n,r,c]),C=d.useMemo(()=>c||!x,[c,x]),L=d.useCallback(()=>r?_("topbar.bounds_exceeded",{br:s.jsx("br",{})}):N?_("topbar.limits_exceeded"):null,[r,N]),S=d.useCallback(()=>{b.goBack()},[b]);return s.jsxs("div",{className:I.container,children:[s.jsxs("div",{className:I.nameContainer,children:[s.jsx(o.Button,{basic:!0,"aria-label":_("inspector.top_bar.back"),onClick:S,children:s.jsx(o.Icon,{name:"chevron left"})}),e&&s.jsxs(o.Button,{basic:!0,onClick:u,disabled:c,className:I.editNameBtn,children:[e.title,s.jsx(g,{name:"layout",className:"edit-project-icon"})]}),c&&s.jsx(g,{name:"cloud-upload",className:"cloud-upload-indicator is-uploading"})]}),s.jsxs("div",{className:I.actions,children:[e?s.jsx(U,{projectId:e.id}):null,s.jsx(o.Popup,{content:_("inspector.top_bar.download"),trigger:s.jsx(o.Button,{secondary:!0,"aria-label":_("inspector.top_bar.download"),size:"small",className:I.downloadBtn,disabled:c,onClick:m,children:s.jsx(o.Icon,{name:"download"})})}),s.jsxs(o.Button,{as:"a",href:h,target:"_blank",secondary:!0,size:"small",disabled:c,children:[s.jsx(o.Icon,{name:"eye"}),_("inspector.top_bar.preview")]}),s.jsx(o.Popup,{content:L(),position:"bottom center",disabled:C,trigger:s.jsx("span",{children:s.jsxs(o.Button,{primary:!0,size:"small",disabled:x,onClick:a,children:[s.jsx(o.Icon,{name:"globe"}),_("inspector.top_bar.publish")]})}),on:"hover"})]})]})}const ne=e=>({currentProject:j(e),metrics:O(e),limits:V(e),areEntitiesOutOfBoundaries:w(e)>0,isUploading:y(e)}),ae=e=>({onOpenModal:(t,n)=>e(k(t,n))}),oe=T(ne,ae)(te);var p={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.19.1"};const re=e=>e.replace(/\/$/,""),P=re(p.VITE_BASE_URL);let ce=class extends d.PureComponent{constructor(){super(...arguments);R(this,"state",{isLoaded:!1});R(this,"refIframe",n=>{const{onConnect:r}=this.props;n&&(n.onload=()=>{this.setState({isLoaded:!0})},r(n.id))})}componentDidMount(){const{onOpen:n}=this.props;n()}render(){const{scene:n,project:r,isLoggedIn:c,isReloading:l,address:b=""}=this.props;if(!c)return s.jsx(H,{});let m=`${P}/inspector-index.html`,u=`${P}/bin/index.js`;p.VITE_INSPECTOR_PORT&&(m=`http://localhost:${p.VITE_INSPECTOR_PORT}`,u=`${m}/bin/index.js`);let a=`?dataLayerRpcParentUrl=${window.location.origin}`;if(p.VITE_BIN_INDEX_JS_DEV_PORT&&p.VITE_BIN_INDEX_JS_DEV_PATH){const h=btoa(p.VITE_BIN_INDEX_JS_DEV_PATH);u=`http://localhost:${p.VITE_BIN_INDEX_JS_DEV_PORT}/content/contents/b64-${h}`}return a=a.concat(`&binIndexJsUrl=${u}`),a=a.concat(`&contentUrl=${E.get("INSPECTOR_CONTENT_URL")}`),a=a.concat(`&segmentKey=${E.get("INSPECTOR_SEGMENT_API_KEY")}`),a=a.concat(`&segmentAppId=${E.get("INSPECTOR_SEGMENT_APP_ID")}`),a=a.concat(`&segmentUserId=${b}`),r!=null&&r.id&&(a=a.concat(`&projectId=${r.id}`)),s.jsxs("div",{className:"InspectorPage",children:[(!this.state.isLoaded||l)&&s.jsx(o.Loader,{active:!0}),n&&!l&&s.jsxs(s.Fragment,{children:[s.jsx(oe,{}),s.jsx("iframe",{ref:this.refIframe,title:"inspector",id:"inspector",src:`${m}${a}`})]})]})}};const ie=e=>({address:M(e),isLoggedIn:A(e),scene:G(e),project:j(e),isReloading:J(e)}),de=e=>({onOpen:()=>e(X()),onConnect:t=>e(z(t))}),me=T(ie,de)(ce);export{me as default};
1
+ var B=Object.defineProperty;var D=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>D(e,typeof t!="symbol"?t+"":t,n);import{a4 as f,J as d,aF as $,aG as E,aH as v,M as _,N as s,S as o,P as g,O as U,T,ay as j,aI as O,aJ as V,aK as w,aL as y,a2 as k,aM as M,aj as A,aN as G,aO as J,aP as X,aQ as z}from"./index-B6_fsGNl.js";import{S as H}from"./SignInRequired-h6B_5gxX.js";const K="_container_1abv2_1",q="_nameContainer_1abv2_8",F="_editNameBtn_1abv2_20",Y="_actions_1abv2_30",Q="_downloadBtn_1abv2_36",W="_button_1abv2_13",I={container:K,nameContainer:q,editNameBtn:F,actions:Y,downloadBtn:Q,button:W},Z=E.get("EXPLORER_URL",""),ee=E.get("BUILDER_SERVER_URL",""),se=E.get("PEER_TESTING_URL","");function te({currentProject:e,metrics:t,limits:n,areEntitiesOutOfBoundaries:r,isUploading:c,onOpenModal:l}){const b=f(),m=d.useCallback(()=>{l("ExportModal",{project:e})},[e,l]),u=d.useCallback(()=>{l("EditProjectModal")},[l]),a=d.useCallback(()=>{l("DeployModal",{view:$.NONE,projectId:e.id})},[l,e]),h=d.useMemo(()=>{if(!e)return"";const i=new URL(Z);return i.searchParams.set("skipSetup","true"),i.searchParams.set("realm",`${ee}/projects/${e.id}`),i.searchParams.set("DEBUG_MODE","true"),E.is(v.Env.DEVELOPMENT)?(i.searchParams.set("NETWORK","sepolia"),i.searchParams.set("DEBUG_SCENE_LOG","")):i.searchParams.set("CATALYST",se),i.toString()},[]),N=d.useMemo(()=>Object.keys(t).some(i=>t[i]>n[i]),[t]),x=d.useMemo(()=>c||r,[t,n,r,c]),C=d.useMemo(()=>c||!x,[c,x]),L=d.useCallback(()=>r?_("topbar.bounds_exceeded",{br:s.jsx("br",{})}):N?_("topbar.limits_exceeded"):null,[r,N]),S=d.useCallback(()=>{b.goBack()},[b]);return s.jsxs("div",{className:I.container,children:[s.jsxs("div",{className:I.nameContainer,children:[s.jsx(o.Button,{basic:!0,"aria-label":_("inspector.top_bar.back"),onClick:S,children:s.jsx(o.Icon,{name:"chevron left"})}),e&&s.jsxs(o.Button,{basic:!0,onClick:u,disabled:c,className:I.editNameBtn,children:[e.title,s.jsx(g,{name:"layout",className:"edit-project-icon"})]}),c&&s.jsx(g,{name:"cloud-upload",className:"cloud-upload-indicator is-uploading"})]}),s.jsxs("div",{className:I.actions,children:[e?s.jsx(U,{projectId:e.id}):null,s.jsx(o.Popup,{content:_("inspector.top_bar.download"),trigger:s.jsx(o.Button,{secondary:!0,"aria-label":_("inspector.top_bar.download"),size:"small",className:I.downloadBtn,disabled:c,onClick:m,children:s.jsx(o.Icon,{name:"download"})})}),s.jsxs(o.Button,{as:"a",href:h,target:"_blank",secondary:!0,size:"small",disabled:c,children:[s.jsx(o.Icon,{name:"eye"}),_("inspector.top_bar.preview")]}),s.jsx(o.Popup,{content:L(),position:"bottom center",disabled:C,trigger:s.jsx("span",{children:s.jsxs(o.Button,{primary:!0,size:"small",disabled:x,onClick:a,children:[s.jsx(o.Icon,{name:"globe"}),_("inspector.top_bar.publish")]})}),on:"hover"})]})]})}const ne=e=>({currentProject:j(e),metrics:O(e),limits:V(e),areEntitiesOutOfBoundaries:w(e)>0,isUploading:y(e)}),ae=e=>({onOpenModal:(t,n)=>e(k(t,n))}),oe=T(ne,ae)(te);var p={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.19.2"};const re=e=>e.replace(/\/$/,""),P=re(p.VITE_BASE_URL);let ce=class extends d.PureComponent{constructor(){super(...arguments);R(this,"state",{isLoaded:!1});R(this,"refIframe",n=>{const{onConnect:r}=this.props;n&&(n.onload=()=>{this.setState({isLoaded:!0})},r(n.id))})}componentDidMount(){const{onOpen:n}=this.props;n()}render(){const{scene:n,project:r,isLoggedIn:c,isReloading:l,address:b=""}=this.props;if(!c)return s.jsx(H,{});let m=`${P}/inspector-index.html`,u=`${P}/bin/index.js`;p.VITE_INSPECTOR_PORT&&(m=`http://localhost:${p.VITE_INSPECTOR_PORT}`,u=`${m}/bin/index.js`);let a=`?dataLayerRpcParentUrl=${window.location.origin}`;if(p.VITE_BIN_INDEX_JS_DEV_PORT&&p.VITE_BIN_INDEX_JS_DEV_PATH){const h=btoa(p.VITE_BIN_INDEX_JS_DEV_PATH);u=`http://localhost:${p.VITE_BIN_INDEX_JS_DEV_PORT}/content/contents/b64-${h}`}return a=a.concat(`&binIndexJsUrl=${u}`),a=a.concat(`&contentUrl=${E.get("INSPECTOR_CONTENT_URL")}`),a=a.concat(`&segmentKey=${E.get("INSPECTOR_SEGMENT_API_KEY")}`),a=a.concat(`&segmentAppId=${E.get("INSPECTOR_SEGMENT_APP_ID")}`),a=a.concat(`&segmentUserId=${b}`),r!=null&&r.id&&(a=a.concat(`&projectId=${r.id}`)),s.jsxs("div",{className:"InspectorPage",children:[(!this.state.isLoaded||l)&&s.jsx(o.Loader,{active:!0}),n&&!l&&s.jsxs(s.Fragment,{children:[s.jsx(oe,{}),s.jsx("iframe",{ref:this.refIframe,title:"inspector",id:"inspector",src:`${m}${a}`})]})]})}};const ie=e=>({address:M(e),isLoggedIn:A(e),scene:G(e),project:j(e),isReloading:J(e)}),de=e=>({onOpen:()=>e(X()),onConnect:t=>e(z(t))}),me=T(ie,de)(ce);export{me as default};
@@ -1 +1 @@
1
- var x=Object.defineProperty;var j=(i,n,t)=>n in i?x(i,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[n]=t;var d=(i,n,t)=>j(i,typeof n!="symbol"?n+"":n,t);import{J as C,c6 as h,N as e,S as s,M as r,ej as b,cN as v,cO as y,b6 as u,bQ as S,co as A,T,ek as _,el as N,em as z}from"./index-D8smHxXz.js";import{L as P}from"./LoggedInDetailPage.container-CCL2zROi.js";import{S as f}from"./SignInRequired-CLAy0k4a.js";import"./Navigation.container-INpo5kYA.js";import"./selectors-yGlOLvMK.js";let L=class extends C.PureComponent{constructor(){super(...arguments);d(this,"timeoutId",null);d(this,"state",{hasCopiedText:!1,type:h.PARCEL,managerAddress:""});d(this,"handleOnCopy",()=>{this.timeoutId&&clearTimeout(this.timeoutId),this.setState({hasCopiedText:!0}),this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.setState({hasCopiedText:!1})},1200)});d(this,"handleAddressChange",(t,a)=>{this.setState({managerAddress:a.value})});d(this,"handleTypeChange",(t,a)=>{this.setState({type:a.value})});d(this,"handleAddAuthorization",()=>{const{onSetUpdateManager:t}=this.props,{managerAddress:a,type:c}=this.state;t(a,c,!0)})}renderPage(){const{authorizations:t,wallet:a,onSetUpdateManager:c}=this.props,{hasCopiedText:g,managerAddress:o,type:m}=this.state,p=A(o);return e.jsx(s.Grid,{children:a===null?e.jsx(s.Loader,{size:"big",active:!0}):e.jsxs(e.Fragment,{children:[e.jsxs(s.Grid.Row,{children:[e.jsx(s.Grid.Column,{computer:4,mobile:16,children:e.jsx("div",{className:"left-column secondary-text",children:r("global.address")})}),e.jsxs(s.Grid.Column,{computer:12,mobile:16,children:[e.jsx("div",{className:"blockie-container",children:e.jsx(s.Blockie,{seed:a.address,scale:12})}),e.jsxs("div",{className:"address-container",children:[e.jsx("div",{className:"address",children:b()?v(a.address):a.address}),e.jsx(y,{role:"button",text:a.address,onCopy:this.handleOnCopy,children:g?e.jsx("span",{children:r("settings_page.copied")}):e.jsx("span",{className:"link",children:r("settings_page.copy_address")})})]})]})]}),e.jsxs(s.Grid.Row,{children:[e.jsx(s.Grid.Column,{computer:4,mobile:16,children:e.jsx("div",{className:"left-column secondary-text",children:r("settings_page.authorizations")})}),e.jsxs(s.Grid.Column,{computer:12,mobile:16,children:[e.jsx(s.Section,{className:"authoziations-disclaimer",children:r("settings_page.disclaimer",{emphasis:e.jsx("strong",{children:r("settings_page.emphasis")})})}),e.jsxs(s.Row,{className:"authorization-action",children:[e.jsx(u,{id:"settings_page.authorization_action",values:{address:e.jsx(s.Field,{value:o,onChange:this.handleAddressChange,placeholder:"0x...",error:o.length>0&&!p}),type:e.jsx(s.Dropdown,{options:[{text:"Parcels",value:h.PARCEL},{text:"Estates",value:h.ESTATE}],value:m,onChange:this.handleTypeChange})}}),e.jsx(s.Button,{size:"small",primary:!0,disabled:o.length===0||!p,onClick:this.handleAddAuthorization,children:r("global.submit")})]}),t.length>0?e.jsxs(s.Section,{children:[e.jsx(s.Header,{sub:!0,children:r("settings_page.authorizations_title")}),t.map(l=>e.jsxs(s.Row,{className:"authorization",children:[e.jsx(u,{id:"settings_page.authorization",values:{address:e.jsx(S,{address:l.address}),type:e.jsxs("span",{children:[" ",e.jsx("strong",{children:r(`global.${l.type}_plural`)})," "]})}}),e.jsx(s.Button,{basic:!0,onClick:()=>c(l.address,l.type,!1),children:r("global.revoke")})]}))]}):null]})]})]})})}renderLogin(){return e.jsx(f,{})}renderLoading(){return e.jsx("div",{className:"center",children:e.jsx(s.Loader,{active:!0,size:"huge"})})}render(){return e.jsx(P,{className:"SettingsPage",children:this.renderPage()})}};const R=i=>({wallet:_(i),authorizations:N(i)}),E=i=>({onSetUpdateManager:(n,t,a)=>i(z(n,t,a))}),B=T(R,E)(L);export{B as default};
1
+ var x=Object.defineProperty;var j=(i,n,t)=>n in i?x(i,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[n]=t;var d=(i,n,t)=>j(i,typeof n!="symbol"?n+"":n,t);import{J as C,c6 as h,N as e,S as s,M as r,ej as b,cN as v,cO as y,b6 as u,bQ as S,co as A,T,ek as _,el as N,em as z}from"./index-B6_fsGNl.js";import{L as P}from"./LoggedInDetailPage.container-DbQebeQd.js";import{S as f}from"./SignInRequired-h6B_5gxX.js";import"./Navigation.container-xyyd5mUr.js";import"./selectors-BtqWSHNR.js";let L=class extends C.PureComponent{constructor(){super(...arguments);d(this,"timeoutId",null);d(this,"state",{hasCopiedText:!1,type:h.PARCEL,managerAddress:""});d(this,"handleOnCopy",()=>{this.timeoutId&&clearTimeout(this.timeoutId),this.setState({hasCopiedText:!0}),this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.setState({hasCopiedText:!1})},1200)});d(this,"handleAddressChange",(t,a)=>{this.setState({managerAddress:a.value})});d(this,"handleTypeChange",(t,a)=>{this.setState({type:a.value})});d(this,"handleAddAuthorization",()=>{const{onSetUpdateManager:t}=this.props,{managerAddress:a,type:c}=this.state;t(a,c,!0)})}renderPage(){const{authorizations:t,wallet:a,onSetUpdateManager:c}=this.props,{hasCopiedText:g,managerAddress:o,type:m}=this.state,p=A(o);return e.jsx(s.Grid,{children:a===null?e.jsx(s.Loader,{size:"big",active:!0}):e.jsxs(e.Fragment,{children:[e.jsxs(s.Grid.Row,{children:[e.jsx(s.Grid.Column,{computer:4,mobile:16,children:e.jsx("div",{className:"left-column secondary-text",children:r("global.address")})}),e.jsxs(s.Grid.Column,{computer:12,mobile:16,children:[e.jsx("div",{className:"blockie-container",children:e.jsx(s.Blockie,{seed:a.address,scale:12})}),e.jsxs("div",{className:"address-container",children:[e.jsx("div",{className:"address",children:b()?v(a.address):a.address}),e.jsx(y,{role:"button",text:a.address,onCopy:this.handleOnCopy,children:g?e.jsx("span",{children:r("settings_page.copied")}):e.jsx("span",{className:"link",children:r("settings_page.copy_address")})})]})]})]}),e.jsxs(s.Grid.Row,{children:[e.jsx(s.Grid.Column,{computer:4,mobile:16,children:e.jsx("div",{className:"left-column secondary-text",children:r("settings_page.authorizations")})}),e.jsxs(s.Grid.Column,{computer:12,mobile:16,children:[e.jsx(s.Section,{className:"authoziations-disclaimer",children:r("settings_page.disclaimer",{emphasis:e.jsx("strong",{children:r("settings_page.emphasis")})})}),e.jsxs(s.Row,{className:"authorization-action",children:[e.jsx(u,{id:"settings_page.authorization_action",values:{address:e.jsx(s.Field,{value:o,onChange:this.handleAddressChange,placeholder:"0x...",error:o.length>0&&!p}),type:e.jsx(s.Dropdown,{options:[{text:"Parcels",value:h.PARCEL},{text:"Estates",value:h.ESTATE}],value:m,onChange:this.handleTypeChange})}}),e.jsx(s.Button,{size:"small",primary:!0,disabled:o.length===0||!p,onClick:this.handleAddAuthorization,children:r("global.submit")})]}),t.length>0?e.jsxs(s.Section,{children:[e.jsx(s.Header,{sub:!0,children:r("settings_page.authorizations_title")}),t.map(l=>e.jsxs(s.Row,{className:"authorization",children:[e.jsx(u,{id:"settings_page.authorization",values:{address:e.jsx(S,{address:l.address}),type:e.jsxs("span",{children:[" ",e.jsx("strong",{children:r(`global.${l.type}_plural`)})," "]})}}),e.jsx(s.Button,{basic:!0,onClick:()=>c(l.address,l.type,!1),children:r("global.revoke")})]}))]}):null]})]})]})})}renderLogin(){return e.jsx(f,{})}renderLoading(){return e.jsx("div",{className:"center",children:e.jsx(s.Loader,{active:!0,size:"huge"})})}render(){return e.jsx(P,{className:"SettingsPage",children:this.renderPage()})}};const R=i=>({wallet:_(i),authorizations:N(i)}),E=i=>({onSetUpdateManager:(n,t,a)=>i(z(n,t,a))}),B=T(R,E)(L);export{B as default};
@@ -1 +1 @@
1
- import{c0 as h,c1 as s}from"./index-D8smHxXz.js";var N={};function O(){return N}function D(e){var a=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return a.setUTCFullYear(e.getFullYear()),e.getTime()-a.getTime()}function b(e,a){h(2,arguments);var t=s(e),n=s(a),i=t.getTime()-n.getTime();return i<0?-1:i>0?1:i}function A(e,a){h(2,arguments);var t=s(e),n=s(a),i=t.getFullYear()-n.getFullYear(),o=t.getMonth()-n.getMonth();return i*12+o}function X(e,a){return h(2,arguments),s(e).getTime()-s(a).getTime()}var T={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(a){return a<0?Math.ceil(a):Math.floor(a)}},_="trunc";function I(e){return e?T[e]:T[_]}function R(e){h(1,arguments);var a=s(e);return a.setHours(23,59,59,999),a}function Y(e){h(1,arguments);var a=s(e),t=a.getMonth();return a.setFullYear(a.getFullYear(),t+1,0),a.setHours(23,59,59,999),a}function E(e){h(1,arguments);var a=s(e);return R(a).getTime()===Y(a).getTime()}function j(e,a){h(2,arguments);var t=s(e),n=s(a),i=b(t,n),o=Math.abs(A(t,n)),r;if(o<1)r=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-i*o);var l=b(t,n)===-i;E(s(e))&&o===1&&b(e,n)===1&&(l=!1),r=i*(o-Number(l))}return r===0?0:r}function q(e,a,t){h(2,arguments);var n=X(e,a)/1e3;return I(void 0)(n)}var V={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},z=function(a,t,n){var i,o=V[a];return typeof o=="string"?i=o:t===1?i=o.one:i=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function w(e){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=a.width?String(a.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var H={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},J={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},L={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},U={date:w({formats:H,defaultWidth:"full"}),time:w({formats:J,defaultWidth:"full"}),dateTime:w({formats:L,defaultWidth:"full"})},Q={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$=function(a,t,n,i){return Q[a]};function g(e){return function(a,t){var n=t!=null&&t.context?String(t.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,r=t!=null&&t.width?String(t.width):o;i=e.formattingValues[r]||e.formattingValues[o]}else{var l=e.defaultWidth,u=t!=null&&t.width?String(t.width):e.defaultWidth;i=e.values[u]||e.values[l]}var m=e.argumentCallback?e.argumentCallback(a):a;return i[m]}}var B={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},K={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},G={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Z={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ee={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},te={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ae=function(a,t){var n=Number(a),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ne={ordinalNumber:ae,era:g({values:B,defaultWidth:"wide"}),quarter:g({values:K,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:g({values:G,defaultWidth:"wide"}),day:g({values:Z,defaultWidth:"wide"}),dayPeriod:g({values:ee,defaultWidth:"wide",formattingValues:te,defaultFormattingWidth:"wide"})};function M(e){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=a.match(i);if(!o)return null;var r=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?ie(l,function(f){return f.test(r)}):re(l,function(f){return f.test(r)}),m;m=e.valueCallback?e.valueCallback(u):u,m=t.valueCallback?t.valueCallback(m):m;var c=a.slice(r.length);return{value:m,rest:c}}}function re(e,a){for(var t in e)if(e.hasOwnProperty(t)&&a(e[t]))return t}function ie(e,a){for(var t=0;t<e.length;t++)if(a(e[t]))return t}function oe(e){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.match(e.matchPattern);if(!n)return null;var i=n[0],o=a.match(e.parsePattern);if(!o)return null;var r=e.valueCallback?e.valueCallback(o[0]):o[0];r=t.valueCallback?t.valueCallback(r):r;var l=a.slice(i.length);return{value:r,rest:l}}}var ue=/^(\d+)(th|st|nd|rd)?/i,se=/\d+/i,le={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},de={any:[/^b/i,/^(a|c)/i]},me={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fe={any:[/1/i,/2/i,/3/i,/4/i]},he={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ce={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ve={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ge={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Me={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},be={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ye={ordinalNumber:oe({matchPattern:ue,parsePattern:se,valueCallback:function(a){return parseInt(a,10)}}),era:M({matchPatterns:le,defaultMatchWidth:"wide",parsePatterns:de,defaultParseWidth:"any"}),quarter:M({matchPatterns:me,defaultMatchWidth:"wide",parsePatterns:fe,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:M({matchPatterns:he,defaultMatchWidth:"wide",parsePatterns:ce,defaultParseWidth:"any"}),day:M({matchPatterns:ve,defaultMatchWidth:"wide",parsePatterns:ge,defaultParseWidth:"any"}),dayPeriod:M({matchPatterns:Me,defaultMatchWidth:"any",parsePatterns:be,defaultParseWidth:"any"})},we={code:"en-US",formatDistance:z,formatLong:U,formatRelative:$,localize:ne,match:ye,options:{weekStartsOn:0,firstWeekContainsDate:1}};function W(e,a){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t]);return e}function Pe(e){return W({},e)}var S=1440,pe=2520,P=43200,De=86400;function Se(e,a,t){var n,i;h(2,arguments);var o=O(),r=(n=(i=t==null?void 0:t.locale)!==null&&i!==void 0?i:o.locale)!==null&&n!==void 0?n:we;if(!r.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=b(e,a);if(isNaN(l))throw new RangeError("Invalid time value");var u=W(Pe(t),{addSuffix:!!(t!=null&&t.addSuffix),comparison:l}),m,c;l>0?(m=s(a),c=s(e)):(m=s(e),c=s(a));var f=q(c,m),k=(D(c)-D(m))/1e3,d=Math.round((f-k)/60),v;if(d<2)return t!=null&&t.includeSeconds?f<5?r.formatDistance("lessThanXSeconds",5,u):f<10?r.formatDistance("lessThanXSeconds",10,u):f<20?r.formatDistance("lessThanXSeconds",20,u):f<40?r.formatDistance("halfAMinute",0,u):f<60?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",1,u):d===0?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",d,u);if(d<45)return r.formatDistance("xMinutes",d,u);if(d<90)return r.formatDistance("aboutXHours",1,u);if(d<S){var F=Math.round(d/60);return r.formatDistance("aboutXHours",F,u)}else{if(d<pe)return r.formatDistance("xDays",1,u);if(d<P){var x=Math.round(d/S);return r.formatDistance("xDays",x,u)}else if(d<De)return v=Math.round(d/P),r.formatDistance("aboutXMonths",v,u)}if(v=j(c,m),v<12){var C=Math.round(d/P);return r.formatDistance("xMonths",C,u)}else{var p=v%12,y=Math.floor(v/12);return p<3?r.formatDistance("aboutXYears",y,u):p<9?r.formatDistance("overXYears",y,u):r.formatDistance("almostXYears",y+1,u)}}export{g as a,w as b,oe as c,M as d,D as e,Se as f,O as g,we as l};
1
+ import{c0 as h,c1 as s}from"./index-B6_fsGNl.js";var N={};function O(){return N}function D(e){var a=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return a.setUTCFullYear(e.getFullYear()),e.getTime()-a.getTime()}function b(e,a){h(2,arguments);var t=s(e),n=s(a),i=t.getTime()-n.getTime();return i<0?-1:i>0?1:i}function A(e,a){h(2,arguments);var t=s(e),n=s(a),i=t.getFullYear()-n.getFullYear(),o=t.getMonth()-n.getMonth();return i*12+o}function X(e,a){return h(2,arguments),s(e).getTime()-s(a).getTime()}var T={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(a){return a<0?Math.ceil(a):Math.floor(a)}},_="trunc";function I(e){return e?T[e]:T[_]}function R(e){h(1,arguments);var a=s(e);return a.setHours(23,59,59,999),a}function Y(e){h(1,arguments);var a=s(e),t=a.getMonth();return a.setFullYear(a.getFullYear(),t+1,0),a.setHours(23,59,59,999),a}function E(e){h(1,arguments);var a=s(e);return R(a).getTime()===Y(a).getTime()}function j(e,a){h(2,arguments);var t=s(e),n=s(a),i=b(t,n),o=Math.abs(A(t,n)),r;if(o<1)r=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-i*o);var l=b(t,n)===-i;E(s(e))&&o===1&&b(e,n)===1&&(l=!1),r=i*(o-Number(l))}return r===0?0:r}function q(e,a,t){h(2,arguments);var n=X(e,a)/1e3;return I(void 0)(n)}var V={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},z=function(a,t,n){var i,o=V[a];return typeof o=="string"?i=o:t===1?i=o.one:i=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function w(e){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=a.width?String(a.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var H={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},J={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},L={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},U={date:w({formats:H,defaultWidth:"full"}),time:w({formats:J,defaultWidth:"full"}),dateTime:w({formats:L,defaultWidth:"full"})},Q={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$=function(a,t,n,i){return Q[a]};function g(e){return function(a,t){var n=t!=null&&t.context?String(t.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,r=t!=null&&t.width?String(t.width):o;i=e.formattingValues[r]||e.formattingValues[o]}else{var l=e.defaultWidth,u=t!=null&&t.width?String(t.width):e.defaultWidth;i=e.values[u]||e.values[l]}var m=e.argumentCallback?e.argumentCallback(a):a;return i[m]}}var B={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},K={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},G={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Z={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ee={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},te={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ae=function(a,t){var n=Number(a),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ne={ordinalNumber:ae,era:g({values:B,defaultWidth:"wide"}),quarter:g({values:K,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:g({values:G,defaultWidth:"wide"}),day:g({values:Z,defaultWidth:"wide"}),dayPeriod:g({values:ee,defaultWidth:"wide",formattingValues:te,defaultFormattingWidth:"wide"})};function M(e){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=a.match(i);if(!o)return null;var r=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?ie(l,function(f){return f.test(r)}):re(l,function(f){return f.test(r)}),m;m=e.valueCallback?e.valueCallback(u):u,m=t.valueCallback?t.valueCallback(m):m;var c=a.slice(r.length);return{value:m,rest:c}}}function re(e,a){for(var t in e)if(e.hasOwnProperty(t)&&a(e[t]))return t}function ie(e,a){for(var t=0;t<e.length;t++)if(a(e[t]))return t}function oe(e){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.match(e.matchPattern);if(!n)return null;var i=n[0],o=a.match(e.parsePattern);if(!o)return null;var r=e.valueCallback?e.valueCallback(o[0]):o[0];r=t.valueCallback?t.valueCallback(r):r;var l=a.slice(i.length);return{value:r,rest:l}}}var ue=/^(\d+)(th|st|nd|rd)?/i,se=/\d+/i,le={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},de={any:[/^b/i,/^(a|c)/i]},me={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fe={any:[/1/i,/2/i,/3/i,/4/i]},he={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ce={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ve={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ge={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Me={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},be={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ye={ordinalNumber:oe({matchPattern:ue,parsePattern:se,valueCallback:function(a){return parseInt(a,10)}}),era:M({matchPatterns:le,defaultMatchWidth:"wide",parsePatterns:de,defaultParseWidth:"any"}),quarter:M({matchPatterns:me,defaultMatchWidth:"wide",parsePatterns:fe,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:M({matchPatterns:he,defaultMatchWidth:"wide",parsePatterns:ce,defaultParseWidth:"any"}),day:M({matchPatterns:ve,defaultMatchWidth:"wide",parsePatterns:ge,defaultParseWidth:"any"}),dayPeriod:M({matchPatterns:Me,defaultMatchWidth:"any",parsePatterns:be,defaultParseWidth:"any"})},we={code:"en-US",formatDistance:z,formatLong:U,formatRelative:$,localize:ne,match:ye,options:{weekStartsOn:0,firstWeekContainsDate:1}};function W(e,a){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t]);return e}function Pe(e){return W({},e)}var S=1440,pe=2520,P=43200,De=86400;function Se(e,a,t){var n,i;h(2,arguments);var o=O(),r=(n=(i=t==null?void 0:t.locale)!==null&&i!==void 0?i:o.locale)!==null&&n!==void 0?n:we;if(!r.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=b(e,a);if(isNaN(l))throw new RangeError("Invalid time value");var u=W(Pe(t),{addSuffix:!!(t!=null&&t.addSuffix),comparison:l}),m,c;l>0?(m=s(a),c=s(e)):(m=s(e),c=s(a));var f=q(c,m),k=(D(c)-D(m))/1e3,d=Math.round((f-k)/60),v;if(d<2)return t!=null&&t.includeSeconds?f<5?r.formatDistance("lessThanXSeconds",5,u):f<10?r.formatDistance("lessThanXSeconds",10,u):f<20?r.formatDistance("lessThanXSeconds",20,u):f<40?r.formatDistance("halfAMinute",0,u):f<60?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",1,u):d===0?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",d,u);if(d<45)return r.formatDistance("xMinutes",d,u);if(d<90)return r.formatDistance("aboutXHours",1,u);if(d<S){var F=Math.round(d/60);return r.formatDistance("aboutXHours",F,u)}else{if(d<pe)return r.formatDistance("xDays",1,u);if(d<P){var x=Math.round(d/S);return r.formatDistance("xDays",x,u)}else if(d<De)return v=Math.round(d/P),r.formatDistance("aboutXMonths",v,u)}if(v=j(c,m),v<12){var C=Math.round(d/P);return r.formatDistance("xMonths",C,u)}else{var p=v%12,y=Math.floor(v/12);return p<3?r.formatDistance("aboutXYears",y,u):p<9?r.formatDistance("overXYears",y,u):r.formatDistance("almostXYears",y+1,u)}}export{g as a,w as b,oe as c,M as d,D as e,Se as f,O as g,we as l};