@sarafapp/iron_core 1.0.17

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 (136) hide show
  1. package/dist/IronCore.js +2469 -0
  2. package/dist/IronCore.umd.cjs +2 -0
  3. package/dist/index.d.ts +29 -0
  4. package/dist/src/BaseModel.d.ts +45 -0
  5. package/dist/src/Utils.d.ts +4 -0
  6. package/dist/src/accessHandling/AccessControl.d.ts +10 -0
  7. package/dist/src/accessHandling/AccessLevel.d.ts +13 -0
  8. package/dist/src/accessHandling/Accessible.d.ts +3 -0
  9. package/dist/src/accessHandling/EveryDirectiveAccess.d.ts +4 -0
  10. package/dist/src/accessHandling/SSO/AuthorizationDirective.d.ts +17 -0
  11. package/dist/src/accessHandling/SSO/AuthorizationService.d.ts +17 -0
  12. package/dist/src/accessHandling/SSO/EveryLevelAuthorizationDirective.d.ts +4 -0
  13. package/dist/src/accessHandling/SSO/SomeLevelsAuthorizationDirective.d.ts +4 -0
  14. package/dist/src/accessHandling/SomeDirectiveAccess.d.ts +4 -0
  15. package/dist/src/accessHandling/index.d.ts +9 -0
  16. package/dist/src/baseDirective/BeforeMountDirective.d.ts +3 -0
  17. package/dist/src/baseDirective/BeforeUnMountDirective.d.ts +3 -0
  18. package/dist/src/baseDirective/BeforeUpdateDirective.d.ts +3 -0
  19. package/dist/src/baseDirective/CreatedDirective.d.ts +3 -0
  20. package/dist/src/baseDirective/MountedDirective.d.ts +3 -0
  21. package/dist/src/baseDirective/UnMountedDirective.d.ts +3 -0
  22. package/dist/src/baseDirective/UpdateDirective.d.ts +3 -0
  23. package/dist/src/baseDirective/index.d.ts +7 -0
  24. package/dist/src/baseForm/FormManager.d.ts +17 -0
  25. package/dist/src/baseForm/InputControl.d.ts +36 -0
  26. package/dist/src/baseForm/InputControlBuilder.d.ts +14 -0
  27. package/dist/src/baseForm/InputControlData.d.ts +13 -0
  28. package/dist/src/baseForm/TouchSensitiveForm.d.ts +9 -0
  29. package/dist/src/baseForm/UseForm.d.ts +5 -0
  30. package/dist/src/baseForm/index.d.ts +6 -0
  31. package/dist/src/baseSchedule/Schedule.d.ts +3 -0
  32. package/dist/src/baseSchedule/Scheduler.d.ts +8 -0
  33. package/dist/src/baseSchedule/index.d.ts +2 -0
  34. package/dist/src/baseTable/BaseTable.d.ts +46 -0
  35. package/dist/src/baseTable/Constants.d.ts +12 -0
  36. package/dist/src/baseTable/OnDestory.d.ts +3 -0
  37. package/dist/src/baseTable/RowActionSource.d.ts +4 -0
  38. package/dist/src/baseTable/RowClick.d.ts +3 -0
  39. package/dist/src/baseTable/RowDoubleClick.d.ts +3 -0
  40. package/dist/src/baseTable/RowMetaClick.d.ts +3 -0
  41. package/dist/src/baseTable/SelectableTable.d.ts +19 -0
  42. package/dist/src/baseTable/TableAction.d.ts +8 -0
  43. package/dist/src/baseTable/TableHeaderSchema.d.ts +27 -0
  44. package/dist/src/baseTable/TableLoader.d.ts +3 -0
  45. package/dist/src/baseTable/TablePaginate.d.ts +3 -0
  46. package/dist/src/baseTable/TableService.d.ts +9 -0
  47. package/dist/src/baseTable/TableSort.d.ts +4 -0
  48. package/dist/src/baseTable/TableSummarySchema.d.ts +9 -0
  49. package/dist/src/baseTable/index.d.ts +15 -0
  50. package/dist/src/baseTable/moduleConnection/Action.d.ts +3 -0
  51. package/dist/src/baseTable/moduleConnection/Column.d.ts +3 -0
  52. package/dist/src/baseTable/moduleConnection/Table.d.ts +4 -0
  53. package/dist/src/baseTable/moduleConnection/TableDestroy.d.ts +2 -0
  54. package/dist/src/baseTable/moduleConnection/TableRowClick.d.ts +2 -0
  55. package/dist/src/composables/UseCrud.d.ts +10 -0
  56. package/dist/src/composables/UseData.d.ts +14 -0
  57. package/dist/src/composables/UseLoadingStatus.d.ts +15 -0
  58. package/dist/src/composables/UseParams.d.ts +15 -0
  59. package/dist/src/composables/UseRepository.d.ts +63 -0
  60. package/dist/src/composables/UseStaticTableService.d.ts +4 -0
  61. package/dist/src/composables/index.d.ts +6 -0
  62. package/dist/src/constants/Constants.d.ts +108 -0
  63. package/dist/src/constants/index.d.ts +1 -0
  64. package/dist/src/crudService/CrudService.d.ts +22 -0
  65. package/dist/src/crudService/index.d.ts +1 -0
  66. package/dist/src/dateHandling/Constants.d.ts +5 -0
  67. package/dist/src/dateHandling/Converter.d.ts +5 -0
  68. package/dist/src/dateHandling/JalaliDateSetup.d.ts +1 -0
  69. package/dist/src/dateHandling/Model.d.ts +12 -0
  70. package/dist/src/dateHandling/Utils.d.ts +8 -0
  71. package/dist/src/dateHandling/index.d.ts +5 -0
  72. package/dist/src/debounce/DebounceAction.d.ts +4 -0
  73. package/dist/src/debounce/DebounceService.d.ts +9 -0
  74. package/dist/src/debounce/index.d.ts +2 -0
  75. package/dist/src/deviceManagement/Constants.d.ts +4 -0
  76. package/dist/src/deviceManagement/Visibility.d.ts +4 -0
  77. package/dist/src/deviceManagement/VisibilityManager.d.ts +6 -0
  78. package/dist/src/deviceManagement/index.d.ts +3 -0
  79. package/dist/src/errorHandling/ErrorHandler.d.ts +3 -0
  80. package/dist/src/errorHandling/HandleError.d.ts +2 -0
  81. package/dist/src/errorHandling/index.d.ts +2 -0
  82. package/dist/src/feedbackHandling/FailureFeedback.d.ts +3 -0
  83. package/dist/src/feedbackHandling/Feedback.d.ts +11 -0
  84. package/dist/src/feedbackHandling/HandleFeedback.d.ts +2 -0
  85. package/dist/src/feedbackHandling/InfoFeedback.d.ts +3 -0
  86. package/dist/src/feedbackHandling/SuccessFeedback.d.ts +3 -0
  87. package/dist/src/feedbackHandling/WarningFeedback.d.ts +3 -0
  88. package/dist/src/feedbackHandling/index.d.ts +6 -0
  89. package/dist/src/httpClient/ApiBuilder.d.ts +14 -0
  90. package/dist/src/httpClient/ErrorHandlerRegistry.d.ts +10 -0
  91. package/dist/src/httpClient/HttpClient.d.ts +14 -0
  92. package/dist/src/httpClient/Interceptor.d.ts +4 -0
  93. package/dist/src/httpClient/index.d.ts +4 -0
  94. package/dist/src/initializer/ApplicationInitializer.d.ts +6 -0
  95. package/dist/src/initializer/Initializer.d.ts +3 -0
  96. package/dist/src/initializer/index.d.ts +2 -0
  97. package/dist/src/json/JsonMapper.d.ts +18 -0
  98. package/dist/src/json/index.d.ts +1 -0
  99. package/dist/src/layout/Constants.d.ts +10 -0
  100. package/dist/src/layout/DialogService.d.ts +1 -0
  101. package/dist/src/layout/DrawerService.d.ts +1 -0
  102. package/dist/src/layout/Toast.d.ts +8 -0
  103. package/dist/src/layout/index.d.ts +4 -0
  104. package/dist/src/lib/Constants.d.ts +20 -0
  105. package/dist/src/lib/Formatter.d.ts +10 -0
  106. package/dist/src/lib/Util.d.ts +11 -0
  107. package/dist/src/lib/index.d.ts +3 -0
  108. package/dist/src/observables/AbstractSubject.d.ts +7 -0
  109. package/dist/src/observables/BehaviorSubject.d.ts +15 -0
  110. package/dist/src/observables/Observer.d.ts +3 -0
  111. package/dist/src/observables/Subject.d.ts +6 -0
  112. package/dist/src/observables/index.d.ts +4 -0
  113. package/dist/src/process/Proccess.d.ts +9 -0
  114. package/dist/src/process/ProcessManager.d.ts +10 -0
  115. package/dist/src/process/index.d.ts +2 -0
  116. package/dist/src/repository/Params.d.ts +11 -0
  117. package/dist/src/repository/Repository.d.ts +38 -0
  118. package/dist/src/repository/SyncDetail.d.ts +5 -0
  119. package/dist/src/repository/index.d.ts +4 -0
  120. package/dist/src/repository/model.d.ts +5 -0
  121. package/dist/src/routeGuard/RouteGuard.d.ts +6 -0
  122. package/dist/src/routeGuard/index.d.ts +1 -0
  123. package/dist/src/search/client/ClientArraySearch.d.ts +4 -0
  124. package/dist/src/search/client/ClientSearch.d.ts +3 -0
  125. package/dist/src/search/index.d.ts +2 -0
  126. package/dist/src/sort/SortDetail.d.ts +6 -0
  127. package/dist/src/sort/client/Sorter.d.ts +6 -0
  128. package/dist/src/sort/index.d.ts +4 -0
  129. package/dist/src/sort/strategies/SimpleSort.d.ts +5 -0
  130. package/dist/src/sort/strategies/SortStrategy.d.ts +4 -0
  131. package/dist/src/types/Global.d.ts +1 -0
  132. package/dist/src/types/index.d.ts +1 -0
  133. package/dist/src/validators/Validator.d.ts +4 -0
  134. package/dist/src/validators/index.d.ts +1 -0
  135. package/dist/vite.config.d.ts +2 -0
  136. package/package.json +38 -0
@@ -0,0 +1,2 @@
1
+ (function(a,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("dayjs"),require("vue"),require("json2typescript"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","dayjs","vue","json2typescript","pinia"],_):(a=typeof globalThis<"u"?globalThis:a||self,_(a.IronCore={},a.dayjs,a.Vue,a.json2typescript,a.pinia))})(this,function(a,_,g,M,Fe){"use strict";var re=(t=>(t.BankCard="####-####-####-####",t.Iban="##-####-####-####-####-####-##",t))(re||{}),H=(t=>(t.FullDate="jYYYY/jM/jD HH:mm",t.SimpleDate="jYYYY/jM/jD",t.CompactGregorianDate="YYYYMMDD",t.ShortJalaliDate="YYMM",t.JustHour="HH:mm:ss",t))(H||{});const Be=[{62198619:{persian:"بلو",english:"blue"}},{603799:{persian:"بانک ملی ایران",english:"melli"}},{589210:{persian:"بانک سپه",english:"sepah"}},{627648:{persian:"بانک توسعه صادرات",english:"export-development"}},{627961:{persian:"بانک صنعت و معدن",english:"industry-mine"}},{603770:{persian:"بانک کشاورزی",english:"agriculture"}},{628023:{persian:"بانک مسکن",english:"housing"}},{627760:{persian:"پست بانک ایران",english:"post"}},{502908:{persian:"بانک توسعه تعاون",english:"development-cooperation"}},{627412:{persian:"بانک اقتصاد نوین",english:"eghtesad-novin"}},{622106:{persian:"بانک پارسیان",english:"parsian"}},{502229:{persian:"بانک پاسارگاد",english:"pasargad"}},{639599:{persian:"بانک قوامین",english:"ghavamin"}},{627488:{persian:"بانک کارآفرین",english:"karafarin"}},{621986:{persian:"بانک سامان",english:"saman"}},{639346:{persian:"بانک سینا",english:"sina"}},{639607:{persian:"بانک سرمایه",english:"sarmayeh"}},{504706:{persian:"بانک شهر",english:"shahr"}},{502806:{persian:"بانک شهر",english:"shahr"}},{502938:{persian:"بانک دی",english:"day"}},{603769:{persian:"بانک صادرات",english:"saderat"}},{610433:{persian:"بانک ملت",english:"mellat"}},{627353:{persian:"بانک تجارت",english:"tejarat"}},{585983:{persian:"بانک تجارت",english:"tejarat"}},{589463:{persian:"بانک رفاه",english:"refah"}},{627381:{persian:"بانک انصار",english:"ansar"}},{639370:{persian:"بانک مهر اقتصاد",english:"mehr-eqtesad"}},{505801:{persian:"موسسه اعتباری کوثر",english:"kosar"}},{606373:{persian:"بانک قرض الحسنه مهرایرانیان",english:"mehr"}},{186214:{persian:"بانک آینده",english:"ayandeh"}},{504172:{persian:"بانک قرض الحسنه رسالت",english:"resalat"}},{505416:{persian:"بانک گردشگری",english:"tourism"}},{505785:{persian:"بانک ایران‌زمین",english:"iran-zamin"}},{505809:{persian:"بانک خاورمیانه",english:"middle-east"}},{585947:{persian:"بانک خاورمیانه",english:"middle-east"}},{604932:{persian:"بانک سپه",english:"sepah"}},{627961:{persian:"بانک صنعت و معدن",english:"industry-mine"}},{636214:{persian:"بانک آینده",english:"ayandeh"}},{636795:{persian:"بانک مرکزی",english:"markazi"}},{636949:{persian:"بانک حکمت ایرانیان",english:"hekmat-iranian"}},{639217:{persian:"بانک کشاورزی",english:"agriculture"}}],Ne=[{"010":{persian:"بانک مرکزی",english:"markazi"}},{"011":{persian:"بانک صنعت و معدن",english:"industry-mine"}},{"012":{persian:"بانک ملت",english:"mellat"}},{"013":{persian:"بانک رفاه",english:"refah"}},{"014":{persian:"بانک مسکن",english:"housing"}},{"015":{persian:"بانک سپه",english:"sepah"}},{"016":{persian:"بانک کشاورزی",english:"agriculture"}},{"017":{persian:"بانک ملّی ایران",english:"melli"}},{"018":{persian:"بانک تجارت",english:"tejarat"}},{"019":{persian:"بانک صادرات",english:"saderat"}},{"020":{persian:"بانک توسعه صادرات",english:"export-development"}},{"021":{persian:"پست بانک",english:"post"}},{"053":{persian:"بانک کارآفرین",english:"karafarin"}},{"054":{persian:"بانک پارسیان",english:"parsian"}},{"055":{persian:"بانک اقتصاد نوین",english:"eghtesad-novin"}},{"056":{persian:"بانک سامان",english:"saman"}},{"057":{persian:"بانک پاسارگاد",english:"pasargad"}},{"058":{persian:"بانک سرمایه",english:"sarmayeh"}},{"059":{persian:"بانک سینا",english:"sina"}},{"060":{persian:"بانک قرض الحسنه مهرایرانیان",english:"mehr"}},{"061":{persian:"بانک شهر",english:"shahr"}},{"062":{persian:"بانک آینده",english:"ayandeh"}},{"065":{persian:"بانک حکمت ایرانیان",english:"hekmat-iranian"}},{"066":{persian:"بانک دی",english:"day"}},{"069":{persian:"بانک ایران زمین",english:"iran-zamin"}},{"070":{persian:"بانک قرض الحسنه رسالت",english:"resalat"}},{"078":{persian:"بانک خاورمیانه",english:"middle-east"}}];var Ye=(t=>(t.Normal="YYYY-MM-DD",t.ContainsHour="YYYY-MM-DD HH:mm",t.OnlyHour="HH:mm",t))(Ye||{});function ae(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ie={exports:{}},lt=ie.exports,Ue;function ct(){return Ue||(Ue=1,function(t,e){(function(s,r){t.exports=r()})(lt,function(){return function(s,r){r.prototype.weekday=function(i){var n=this.$locale().weekStart||0,o=this.$W,d=(o<n?o+7:o)-n;return this.$utils().u(i)?d:this.subtract(d,"day").add(i,"day")}}})}(ie)),ie.exports}var ut=ct();const ht=ae(ut);var ne={exports:{}},dt=ne.exports,Ve;function ft(){return Ve||(Ve=1,function(t,e){(function(s,r){t.exports=r()})(dt,function(){var s="week",r="year";return function(i,n,o){var d=n.prototype;d.week=function(u){if(u===void 0&&(u=null),u!==null)return this.add(7*(u-this.week()),"day");var y=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var m=o(this).startOf(r).add(1,r).date(y),h=o(this).endOf(s);if(m.isBefore(h))return 1}var v=o(this).startOf(r).date(y).startOf(s).subtract(1,"millisecond"),S=this.diff(v,s,!0);return S<0?o(this).startOf("week").week():Math.ceil(S)},d.weeks=function(u){return u===void 0&&(u=null),this.week(u)}}})}(ne)),ne.exports}var mt=ft();const vt=ae(mt);var oe={exports:{}},gt=oe.exports,je;function pt(){return je||(je=1,function(t,e){(function(s,r){t.exports=r()})(gt,function(){return function(s,r){r.prototype.weekYear=function(){var i=this.month(),n=this.week(),o=this.year();return n===1&&i===11?o+1:i===0&&n>=52?o-1:o}}})}(oe)),oe.exports}var yt=pt();const St=ae(yt);var le={exports:{}},It=le.exports,He;function wt(){return He||(He=1,function(t,e){(function(s,r){t.exports=r(_)})(It,function(s){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var i=r(s),n={name:"fa",weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekStart:6,months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),ordinal:function(o){return o},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"}};return i.default.locale(n,null,!0),n})}(le)),le.exports}var Dt=wt();const At=ae(Dt);function ce(t,e){return bt(t)||_t(t,e)||Mt()}function bt(t){if(Array.isArray(t))return t}function _t(t,e){var s=[],r=!0,i=!1,n=void 0;try{for(var o=t[Symbol.iterator](),d;!(r=(d=o.next()).done)&&(s.push(d.value),!(e&&s.length===e));r=!0);}catch(u){i=!0,n=u}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw n}}return s}function Mt(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function qe(t,e,s){e<=2&&(t-=1,e+=12);var r=Math.floor(t/100),i=2-r+Math.floor(r/4),n=Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+s+i-1524.5;return n}function Ct(t){t=t+.5;var e=Math.floor(t),s=t-e,r=e;if(e>=2299161){var i=Math.floor((e-186721625e-2)/36524.25);r=e+1+i-Math.floor(i/4)}var n=r+1524,o=Math.floor((n-122.1)/365.25),d=Math.floor(365.25*o),u=Math.floor((n-d)/30.6001),y=n-d-Math.floor(30.6001*u)+s,m=u<14?u-1:u-13,h=m>2?o-4716:o-4715;return Tt(h,m,y)}function Lt(t){t=t+.5;var e=Math.floor(t),s=t-e,r=e;if(e>=2299161){var i=Math.floor((e-186721625e-2)/36524.25);r=e+1+i-Math.floor(i/4)}var n=r+1524,o=Math.floor((n-122.1)/365.25),d=Math.floor(365.25*o),u=Math.floor((n-d)/30.6001),y=n-d-Math.floor(30.6001*u)+s,m=u<14?u-1:u-13,h=m>2?o-4716:o-4715;return[Math.floor(h),Math.floor(m),Math.floor(y)]}function Rt(t,e,s){var r=[31,28,31,30,31,30,31,31,30,31,30,31],i=[31,31,31,31,31,31,30,30,30,30,30,29];function n(S,A){return Math.floor(S/A)}t-=979;for(var o=365*t+n(t,33)*8+n(t%33+3,4),d=0;d<e-1;++d)o+=i[d];o+=s-1;var u=o+79,y=1600+400*n(u,146097);u=u%146097;var m=!0;for(u>=36525&&(u--,y+=100*n(u,36524),u=u%36524,u>=365?u++:m=!1),y+=4*n(u,1461),u%=1461,u>=366&&(m=!1,u--,y+=n(u,365),u=u%365),d=0;u>=r[d]+(d==1&&m);d++)u-=r[d]+(d==1&&m);var h=d+1,v=u+1;return qe(y,h,v)}function Tt(t,e,s){var r=[31,28,31,30,31,30,31,31,30,31,30,31],i=[31,31,31,31,31,31,30,30,30,30,30,29];function n(W,x){return Math.floor(W/x)}for(var o=t-1600,d=e-1,u=s-1,y=365*o+n(o+3,4)-n(o+99,100)+n(o+399,400),m=0;m<d;++m)y+=r[m];d>1&&(t%4==0&&t%100!=0||t%400==0)&&y++,y+=u;var h=y-79,v=n(h,12053);h%=12053;var S=979+33*v+4*n(h,1461);h%=1461,h>=366&&(S+=n(h-1,365),h=(h-1)%365);for(var A=0;A<11&&h>=i[A];++A)h-=i[A];var J=A+1,G=h+1;return[S,J,G]}var ue={J:function(e,s,r){return Ct(qe(e,s,r))},G:function(e,s,r){return Lt(Rt(e,s,r))}},Et=/^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/,Ot=/\[.*?\]|jY{2,4}|jM{1,4}|jD{1,2}|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Ie="date",q="day",P="month",$="year",ze="week",kt="YYYY-MM-DDTHH:mm:ssZ",Pt={jmonths:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_")},$t=function(t,e,s){var r=e.prototype,i=r.$utils(),n=function(c){return c.$C==="jalali"},o=i.prettyUnit||i.p,d=i.isUndefined||i.u,u=i.padStart||i.s,y=i.monthDiff||i.m,m=i.absFloor||i.a,h=function(c){return function(){var f=c.bind(this).apply(void 0,arguments);return f.$C=this.$C,f.isJalali()&&f.InitJalali(),f}};r.startOf=h(r.startOf),r.endOf=h(r.endOf),r.add=h(r.add),r.subtract=h(r.subtract),r.set=h(r.set);var v=r.parse,S=r.init,A=r.startOf,J=r.$set,G=r.add,W=r.format,x=r.diff,ke=r.year,Pe=r.month,ge=r.date,$e=r.daysInMonth,te=r.toArray;s.$C="gregory",s.$fdow=6,s.calendar=function(l){return s.$C=l,s},r.calendar=function(l){var c=this.clone();return c.$C=l,c.isJalali()&&c.InitJalali(),c},r.isJalali=function(){return n(this)},s.en.jmonths="Farvardin_Ordibehesht_Khordaad_Tir_Mordaad_Shahrivar_Mehr_Aabaan_Aazar_Dey_Bahman_Esfand".split("_"),s.locale("fa",Object.assign({},At,{},Pt),!0);var K=function(c,f){return s(c,{locale:f.$L,utc:f.$u,calendar:f.$C})};r.init=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};S.bind(this)(l),this.isJalali()&&this.InitJalali()},r.parse=function(l){var c;if(this.$C=l.calendar||this.$C||s.$C,l.jalali&&typeof l.date=="string"&&/.*[^Z]$/i.test(l.date)&&(c=l.date.match(Et))){var f=ue.G(parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3]||1,10)),w=ce(f,3),D=w[0],I=w[1],b=w[2];l.date="".concat(D,"-").concat(I,"-").concat(b).concat(c[4]||"")}return v.bind(this)(l)},r.InitJalali=function(){var l=ue.J(this.$y,this.$M+1,this.$D),c=ce(l,3),f=c[0],w=c[1],D=c[2];this.$jy=f,this.$jM=w-1,this.$jD=D},r.startOf=function(l,c){var f=this;if(!n(this))return A.bind(this)(l,c);var w=d(c)?!0:c,D=o(l),I=function(Z,V){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.$jy,ye=ue.G(T,V+1,Z),j=ce(ye,3),se=j[0],Se=j[1],Ps=j[2],ot=K(new Date(se,Se-1,Ps),f);return(w?ot:ot.endOf(q)).$set("hour",1)},b=(this.$W+(7-s.$fdow))%7;switch(D){case $:return w?I(1,0):I(0,0,this.$jy+1);case P:return w?I(1,this.$jM):I(0,(this.$jM+1)%12,this.$jy+parseInt((this.$jM+1)/12,10));case ze:return w?I(this.$jD-b,this.$jM):I(this.$jD+(6-b),this.$jM);default:return A.bind(this)(l,c)}},r.$set=function(l,c){var f=this;if(!n(this))return J.bind(this)(l,c);var w=o(l),D=function(b,pe){var Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.$jy,V=ue.G(Z,pe+1,b),T=ce(V,3),ye=T[0],j=T[1],se=T[2];return f.$d.setFullYear(ye),f.$d.setMonth(j-1),f.$d.setDate(se),f};switch(w){case Ie:case q:D(c,this.$jM);break;case P:D(this.$jD,c);break;case $:D(this.$jD,this.$jM,c);break;default:return J.bind(this)(l,c)}return this.init(),this},r.add=function(l,c){var f=this;if(!n(this))return G.bind(this)(l,c);l=Number(l);var w=c&&(c.length===1||c==="ms")?c:o(c),D=function(j,se){var Se=f.set(Ie,1).set(j,se+l);return Se.set(Ie,Math.min(f.$jD,Se.daysInMonth()))};if(["M",P].indexOf(w)>-1){var I=this.$jM+l,b=I<0?-Math.ceil(-I/12):Math.floor(I/12),pe=this.$jD,Z=this.set(q,1).add(b,$).set(P,I-b*12);return Z.set(q,Math.min(Z.daysInMonth(),pe))}if(["y",$].indexOf(w)>-1)return D($,this.$jy);if(["d",q].indexOf(w)>-1){var V=new Date(this.$d);return V.setDate(V.getDate()+l),K(V,this)}if(["w",ze].indexOf(w)>-1){var T=new Date(this.$d);return T.setDate(T.getDate()+l*7),K(T,this)}return G.bind(this)(l,c)},r.format=function(l,c){var f=this;if(!n(this))return W.bind(this)(l,c);var w=l||kt,D=c||this.$locale(),I=D.jmonths;return w.replace(Ot,function(b){if(b.indexOf("[")>-1)return b.replace(/\[|\]/g,"");switch(b){case"YY":return String(f.$jy).slice(-2);case"YYYY":return String(f.$jy);case"M":return String(f.$jM+1);case"MM":return u(f.$jM+1,2,"0");case"MMM":return I[f.$jM].slice(0,3);case"MMMM":return I[f.$jM];case"D":return String(f.$jD);case"DD":return u(f.$jD,2,"0");default:return W.bind(f)(b,c)}})},r.diff=function(l,c,f){if(!n(this))return x.bind(this)(l,c,f);var w=o(c),D=s(l),I=y(this,D);switch(w){case $:I/=12;break;case P:break;default:return x.bind(this)(l,c,f)}return f?I:m(I)},r.$g=function(l,c,f){return d(l)?this[c]:this.set(f,l)},r.year=function(l){return n(this)?this.$g(l,"$jy",$):ke.bind(this)(l)},r.month=function(l){return n(this)?this.$g(l,"$jM",P):Pe.bind(this)(l)},r.date=function(l){return n(this)?this.$g(l,"$jD",q):ge.bind(this)(l)},r.daysInMonth=function(){return n(this)?this.endOf(P).$jD:$e.bind(this)()},te&&(r.toArray=function(){return n(this)?[this.$jy,this.$jM,this.$jD,this.$H,this.$m,this.$s,this.$ms]:te.bind(this)()}),r.clone=function(){return K(this.toDate(),this)}};const Ft={ordinal(t){},relativeTime:void 0,name:"fa",weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),months:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),monthsShort:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),weekStart:6,formats:{L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};function Je(){_.extend($t),_.calendar("jalali"),_.extend(ht),_.extend(vt),_.extend(St),_.locale(Ft,{},!0)}class Bt{constructor(e,s){this.start=e,this.end=s}}class Nt{constructor(e,s,r){this.maxDate=e,this.minDate=s,this.disabledDates=r}}class F{static standardToUnix(e){return Math.floor(new Date(e).getTime()/1e3)}static unixToStandard(e){return new Date(e*1e3).toString()}static getUnixEndOfDayInUnix(e){return _.unix(e).endOf("day").unix()}}class X{static isDateDisabled(e,s){for(const r of e.disabledDates)if(X.areUnixesInSameDate(r,s.unix()))return!0;return!!(e.maxDate&&X.isDateGraterOrSame(e.maxDate,s.unix())||e.minDate&&X.isDateLowerOrSame(e.minDate,s.unix()))}static areUnixesInSameDate(e,s){return F.getUnixEndOfDayInUnix(e)===F.getUnixEndOfDayInUnix(s)}static isDateGraterOrSame(e,s){return F.getUnixEndOfDayInUnix(s)>=F.getUnixEndOfDayInUnix(e)}static isDateLowerOrSame(e,s){return F.getUnixEndOfDayInUnix(s)<=F.getUnixEndOfDayInUnix(e)}}Je();class C{static toCurrency(e,s){return e.toLocaleString("en-US",s)}static toCurrencyWithDotSeparator(e){return C.toCurrency(e).replaceAll(",",".")}static applyMask(e,s){let r="",i=0,n=0;for(;i<e.length;){if(e[i]==="#"){if(n>=s.length)throw new Error("Value length does not match the format.");r+=s[n],n++}else r+=e[i];i++}if(n!==s.length)throw new Error("Value length does not match the format.");return r}static applyBankCardMask(e){return C.applyMask(re.BankCard,String(e))}static applyIbanMask(e){return C.applyMask(re.Iban,String(e))}static toEnglishDigits(e){const s=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],r=["١","٢","٣","٤","٥","٦","٧","٨","٩","٠"],i=["1","2","3","4","5","6","7","8","9","0"];return e.split("").map(n=>i[s.indexOf(n)]||i[r.indexOf(n)]||n).join("")}static mapUnixToDate(e,s){return _(new Date(e)).subtract(1,"day").format(s)}}var p=(t=>(t.FetchList="fetchList",t.AutoRefresh="autoRefresh",t.FetchItem="fetchItem",t.FetchLastItems="fetchLastItems",t.FetchPreviousItems="fetchPreviousItems",t.Create="CREATE",t.Update="UPDATE",t.Delete="DELETE",t.Search="SEARCH",t.Sort="SORT",t.Success="SUCCESS",t.Error="ERROR",t.Idle="IDLE",t))(p||{}),E=(t=>(t.Width="width",t.Height="height",t[t.DefaultWidth=500]="DefaultWidth",t[t.DefaultHeight=350]="DefaultHeight",t[t.MinimalAvailableSize=0]="MinimalAvailableSize",t))(E||{}),O=(t=>(t.ASC="ASC",t.DESC="DESC",t))(O||{}),Ge=(t=>(t.ASC="ascend",t.DESC="descend",t))(Ge||{}),he=(t=>(t.Left="left",t.Right="right",t.Center="center",t))(he||{}),de=(t=>(t.Text="text",t))(de||{}),fe=(t=>(t.Text="text",t.ACTION="action",t.Tag="tag",t.Iban="iban",t.BankCard="bankCard",t.Symbol="symbol",t.TradeDetail="tradeDetail",t.SymbolPrice="symbolPrice",t.TradeSymbol="tradeSymbol",t.Price="price",t.DynamicCurrencyPrice="dynamicCurrencyPrice",t.TradeDate="tradeDate",t.RequestResponseIdentity="requestResponseIdentity",t.Image="image",t))(fe||{}),we=(t=>(t[t.MINIMAL_LOADABLE_HEADER_COUNT=0]="MINIMAL_LOADABLE_HEADER_COUNT",t[t.DEFAULT_ITEM_COUNT_PER_PAGE=20]="DEFAULT_ITEM_COUNT_PER_PAGE",t.PAGINATION_POSITION="bottomCenter",t))(we||{});a.ApplicationTheme=(t=>(t.FontFamily="IRANSansX",t))(a.ApplicationTheme||{});var z=(t=>(t.Open="open",t.Close="close",t))(z||{}),We=(t=>(t[t.NotFound=404]="NotFound",t[t.Unauthorized=401]="Unauthorized",t[t.ServerError=500]="ServerError",t))(We||{}),Q=(t=>(t[t.Invalid=0]="Invalid",t[t.Valid=1]="Valid",t))(Q||{}),k=(t=>(t.Theme="theme",t.AccessList="accessList",t.Token="token",t.SSO_ACCESS_LIST="ssoAccessList",t))(k||{});a.ApplicationTheme=(t=>(t.Light="light",t.Dark="dark",t))(a.ApplicationTheme||{});var me=(t=>(t.Dialog="dialog",t.Drawer="drawer",t.Module="module",t.Toast="toast",t))(me||{});class B{static getBankImageBaseOnCardInfo(e,s){return e===void 0?"/img/banks/shetab.png":s==="IBAN"?(e=C.toEnglishDigits(e.replace(/IR/g,"").split(" ").join("")),`/img/banks/${B.iban(e).english}.png`):(e=C.toEnglishDigits(e.replace(/ /g,"")),`/img/banks/${B.card(e).english}.png`)}static card(e){const s={persian:"نامشخص",english:"shetab"};if(e==null)return s;e=e.substring(0,6);try{const r=Be.find(i=>Object.keys(i)[0]===e);return r===void 0?s:Object.values(r)[0]}catch{return s}}static iban(e){const s={persian:"نامشخص",english:"shetab"};if(e==null)return s;e=e.substring(2,5);try{const r=Ne.find(i=>Object.keys(i)[0]===e);return r===void 0?s:Object.values(r)[0]}catch{return s}}static async copyValueToClipboard(e){await navigator.clipboard.writeText(String(e))}static downloadBlob(e,s=B.extractFileNameFromHeader(e)){const r=document.createElement("a");r.href=URL.createObjectURL(e.data),r.download=s,r.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0})),r.remove()}static extractFileNameFromHeader(e){var r,i,n,o;return((o=(r=e.headers["content-disposition"])==null?void 0:r.split("filename=")[1])==null?void 0:o.slice(1,((n=(i=e.headers["content-disposition"])==null?void 0:i.split("filename="))==null?void 0:n[1].length)-1))||"Saraf-File"}static removeSpacesFromString(e){return e&&typeof e.normalize=="function"&&(e=e.normalize("NFC")),e.replace(/[\s\u00A0\u1680\u180E\u2000-\u200A\u200B-\u200D\u2060\uFEFF\u2028\u2029\u202F\u205F\u3000]+/g,"")}static isArraySorted(e,s=i=>i,r=O.ASC){return e.every((i,n)=>e.length-1===n?!0:r===O.ASC?s(i)<=s(e[n+1]):s(i)>=s(e[n+1]))}}const N=class N{constructor(){this.availableAccesses=new Set}setAvailableAccesses(e){this.setAccessListToStorage(e);for(const s of e)this.availableAccesses.add(s)}setAccessListToStorage(e){localStorage.setItem(k.AccessList,JSON.stringify(e))}everyAccess(e){return e.every(s=>this.availableAccesses.has(s))}someAccess(e){return e.some(s=>this.availableAccesses.has(s))}clearAvailableAccesses(){this.availableAccesses.clear(),localStorage.removeItem(k.AccessList)}initialize(){const e=localStorage.getItem(k.AccessList);e!==null&&this.setAvailableAccesses(JSON.parse(e))}static GetInstance(){return N.Instance||(N.Instance=new N),N.Instance}};N.Instance=null;let ee=N;class De{constructor(){this.mounted=(e,s)=>{this.checkAccess(e,s.value)},this.updated=(e,s)=>{this.checkAccess(e,s.value)},this.checkAccess=(e,s)=>{this.hasAccess(s)||e.remove()},this.accessService=ee.GetInstance()}}class Yt extends De{hasAccess(e){return this.accessService.everyAccess(e)}}class Ut extends De{hasAccess(e){return this.accessService.someAccess(e)}}const Y=class Y{constructor(){this._accessLevels=new Map}initialize(){this.setAccessLevelFromStorage()}setAccessLevels(e){for(const s in e)this._accessLevels.set(s,new Set(e[s]));this.setAccessLevelsToStorage(e)}setAccessLevelsToStorage(e){localStorage.setItem(k.SSO_ACCESS_LIST,JSON.stringify(e))}getAccessLevelsFromStorage(){let e=localStorage.getItem(k.SSO_ACCESS_LIST);return e!==null?JSON.parse(e):e}getAccessLevelsOfScope(e){if(this._accessLevels.has(e))return this._accessLevels.get(e);throw new Error(`The scope is not exists ${e}`)}setAccessLevelFromStorage(){const e=this.getAccessLevelsFromStorage();e&&this.setAccessLevels(e)}everyAccess(e,s){const r=this.getAccessLevelsOfScope(e);return r?s.every(i=>r.has(i)):!1}someAccess(e,s){const r=this.getAccessLevelsOfScope(e);return r?s.some(i=>r.has(i)):!1}hasScope(e){return this._accessLevels.has(e)}clear(){localStorage.removeItem(k.SSO_ACCESS_LIST),this._accessLevels=new Map}static GetInstance(){return Y._instance||(Y._instance=new Y),Y._instance}};Y._instance=null;let ve=Y;class Ae{constructor(){this._authorizationService=ve.GetInstance(),this.mounted=this.mounted.bind(this),this.updated=this.updated.bind(this),this.hasAccess=this.hasAccess.bind(this),this.manageElement=this.manageElement.bind(this)}mounted(e,s,r){this.manageElement(e,s.arg,s.modifiers)}updated(e,s,r){this.manageElement(e,s.arg,s.modifiers)}manageElement(e,s,r){if(!this._authorizationService.hasScope(s)){e.remove();return}const i=this.getAccessLevels(s,r);this.hasAccess(s,i)||e.remove()}getAccessLevels(e,s){var i;let r=Object.keys(s);return r.length||(r=Array.from(((i=this._authorizationService.getAccessLevelsOfScope(e))==null?void 0:i.values())??[])),r}}class Vt extends Ae{hasAccess(e,s){return this._authorizationService.everyAccess(e,s)}}class jt extends Ae{hasAccess(e,s){return this._authorizationService.someAccess(e,s)}}class xe{constructor(){this.value=null,this.initialValue=null,this.name="",this.isValid=!1,this.isBlurSensitive=!1,this.isRequired=!1,this.isIncludeInRequestBody=!0,this.isChangeSensitive=!1,this.notValidMessage="",this.isEmptySensitive=!0}}function Ht(t){return t===1}function qt(t,e){return t-1===e}function Ke(t){return String(t).length===0||t===null||t===void 0}function zt(t){t()}class Jt{constructor(e,s){this.initialData=null,this.data=new xe,this._validators=[],this._id=Math.random(),this.data.value=s,this.data.name=e,this.shouldRunValidation()&&this.runValidation(!0)}shouldRunValidation(){return this.data.isRequired?!0:!Ke(this.data.value)}runValidation(e=!1){for(const s of this._validators){const r=s.validate(this.data.value);if(r){this.setFormToInvalidState(e,r);return}}this.setFormToValidState()}setFormToInvalidState(e,s){this.data.isValid=!1,(this.data.isChangeSensitive||e)&&this.setNotValidMessage(s)}setFormToValidState(){this.data.isValid=!0,this.setNotValidMessage("")}reset(){this.initialData?this.data=structuredClone(g.toRaw(this.initialData)):console.warn("The "+this.data.name+`input control has no initial data,
2
+ the initial data will be available after calling the [markAsInitial] method on this instance`)}markAsInitial(){this.initialData=structuredClone(g.toRaw(this.data))}setValidators(e){this._validators=e}getChangeSensitive(){return this.data.isChangeSensitive}setChangeSensitive(e){this.data.isChangeSensitive=e}getIsBlurSensitive(){return this.data.isBlurSensitive}setIsBlurSensitive(e){this.data.isBlurSensitive=e}getIsRequired(){return this.data.isRequired}setIsRequired(e){this.data.isRequired=e}getIsValid(){return this.data.isValid}setIsValid(e){this.data.isValid=e}getIsIncludeInRequestBody(){return this.data.isIncludeInRequestBody}setIsIncludeInRequestBody(e){this.data.isIncludeInRequestBody=e}getNotValidMessage(){return this.data.notValidMessage}setNotValidMessage(e){this.data.notValidMessage=e}getName(){return this.data.name}setName(e){this.data.name=e}setId(e){this._id=e}getId(){return this._id}getIsEmptySensitive(){return this.data.isEmptySensitive}setIsEmptySensitive(e){this.data.isEmptySensitive=e}set value(e){this.data.value=e,this.shouldRunValidation()&&this.runValidation()}get value(){return this.data.value}}class Gt{constructor(e){this._inputControl=e}setValidators(e){return this._inputControl.setValidators(e),this}setChangeSensitive(){return this._inputControl.setChangeSensitive(!0),this}setRequired(){return this._inputControl.setIsRequired(!0),this}setValid(){return this._inputControl.setIsValid(!0),this}setBlurSensitive(){return this._inputControl.setIsBlurSensitive(!0),this}setId(e){return this._inputControl.setId(e),this}removeEmptySensitive(){return this._inputControl.setIsEmptySensitive(!1),this}build(){return this._inputControl}}class Wt{constructor(){this.mounted=(e,s)=>{s.value&&s.value.getIsBlurSensitive()&&(e.addEventListener("click",this.handleFocus.bind(this,s.value)),e.addEventListener("blur",this.handleBlur.bind(this,s.value),!0))},this.beforeUnMount=(e,s)=>{e.removeEventListener("blur",this.handleBlur.bind(this,s.value)),e.removeEventListener("click",this.handleFocus.bind(this,s.value))}}handleBlur(e){e.runValidation(!0)}handleFocus(e){e.value||e.getIsEmptySensitive()||e.setNotValidMessage("")}}class xt{constructor(){this._inputControls=new Map,this._isValid=!1,this._id=Math.random()}getInputControlsAsArray(){return Array.from(this._inputControls.values())}runValidation(){for(const e of this.getInputControlsAsArray())if(!e.getIsValid()){this._isValid=!1;return}this._isValid=!0}addInputControls(e){for(const s of e)this._inputControls.set(s.getName(),s)}getInputControl(e){const s=this._inputControls.get(e);if(!s)throw new Error(`The provided input name (${e}}) has no controls.`);return s}resetControls(e){for(const s of e){const r=this._inputControls.get(s);r?r.reset():console.warn(`Provided input name ${s} has no controllers in this form`)}}resetAll(){for(const e of this.getInputControlsAsArray())e.reset()}createRequestBody(){const e={};for(const s of this.getInputControlsAsArray())s.getIsIncludeInRequestBody()&&(e[s.getName()]=s.value);return e}setIsValid(e){this._isValid=e}getIsValid(){return this._isValid}setId(e){this._id=e}getId(){return this._id}}function Kt(t){const e=g.reactive(t),s=g.ref(Q.Invalid);return g.watch(()=>e.getInputControlsAsArray(),()=>{e.runValidation(),e.getIsValid()?s.value=Q.Valid:s.value=Q.Invalid},{immediate:!0,deep:!0}),{reactiveForm:e,validationStatus:s}}class be{constructor(e){this.timerId=null,this.setupInterval=this.setupInterval.bind(this),this.schedule=e}setupInterval(e){const s=this;this.timerId=setTimeout(async function r(){await s.schedule.runAction(),s.timerId=setTimeout(()=>{r()},e)},e)}clearInterval(){this.timerId&&clearInterval(this.timerId)}}const _e="150px",Me=2,Zt={path:"id",key:"id",title:"عملیات",colspan:Me,width:_e,cellType:fe.ACTION,align:he.Center,headerType:de.Text,accessLevel:null},Ze={width:_e,align:he.Center,headerType:de.Text,cellType:fe.Text,colspan:Me};class Ce{constructor(e,s){this.key=e,this.order=s}}class Le{aSort(e,s){return e.sort((r,i)=>{const n=r[s]??r,o=i[s]??i;if(typeof n=="string"&&typeof o=="string")return n.localeCompare(o);if(typeof n=="number"&&typeof o=="number")return n-o;throw new Error("Not supported data type")})}bSort(e,s){return e.sort((r,i)=>{const n=r[s]??r,o=i[s]??i;if(typeof n=="string"&&typeof o=="string")return o.localeCompare(n);if(typeof n=="number"&&typeof o=="number")return o-n;throw new Error("Not supported data type")})}}class Xt{arrayOfObjectSort(e,s,r,i=new Le){return r===O.ASC?i.aSort(e,s):i.bSort(e,s)}arraySort(e,s,r=new Le){return s===O.ASC?r.aSort(e):r.bSort(e)}}class Xe{constructor(e){this.currentPage=1,this.currentPageSize=20,this.currentSortDetail=new Ce("id",O.DESC),this.loadedRows=[],this.headerSchema=[],this.service=e,this.accessService=ee.GetInstance()}addHeader(e){this.headerSchema.push(e)}async load(){this.headerSchema=this.filterItemsBaseOnAccessLevel(await this.loadHeader()),await this.loadRows()}filterItemsBaseOnAccessLevel(e){return e.filter(s=>s.hasAccess?s.hasAccess():!0)}async sort(e){this.shouldSendSortRequest(e)&&(this.currentSortDetail=e,this.loadedRows=(await this.handleSort(this.currentSortDetail)).items)}shouldSendSortRequest(e){return e.key!==this.currentSortDetail.key||e.order!==this.currentSortDetail.order}async paginate(e,s){this.shouldSendPaginationRequest(e,s)&&(this.currentPage=e,this.currentPageSize=s,this.loadedRows=(await this.handlePagination(this.currentPage,this.currentPageSize)).items)}shouldSendPaginationRequest(e,s){return this.currentPage!==e||this.currentPageSize!==s}async loadRows(){return this.loadedRows=(await this.service.fetchRows()).items,this.loadedRows}getData(){return this.service.getData()}async handleSort(e){return await this.service.sort(e)}async handlePagination(e,s){return await this.service.paginate(e,s)}getItemCountPerPage(){return we.DEFAULT_ITEM_COUNT_PER_PAGE}isLoading(){const e=this.getLoadingStatuses();return e.has(p.Search)||e.has(p.FetchList)||e.has(p.Sort)||e.has(p.FetchLastItems)||e.has(p.FetchPreviousItems)}getLoadingStatuses(){return this.getData().loadingStatus}hasAnyAction(){for(const e of this.loadedRows)if(this.getAccessedActions(e).length)return!0;return!1}getAccessedActions(e){return this.filterItemsBaseOnAccessLevel(this.getActions(e))}getActions(e){return[]}getScrollDetail(){return null}isExpandable(){return!1}async handleClick(e){}async handleMetaClick(e){}async handleDoubleClick(e){}async onDestroy(){}async loadHeader(){throw new Error("No header provided for the table.")}loadSummarySchema(){return{summaryTitle:"",summaryItems:[]}}}class Qe{constructor(e){this.observers=[],this.next(e)}attach(e){this.observers.push(e)}detach(e){this.observers=this.observers.filter(s=>s!==e)}notify(){for(const e of this.observers)typeof e=="function"?e(this._value):e.update(this._value)}next(e){typeof e=="function"?this._value=e(this._value):this._value=e,this.notify()}getValue(){return this._value}}class Qt extends Xe{constructor(e){super(e),this.selectedRows=new Qe(new Map),this.rowSelect=this.rowSelect.bind(this),this.selectAll=this.selectAll.bind(this),this.isEveryRowSelected=this.isEveryRowSelected.bind(this),this.handlePagination=this.handlePagination.bind(this),this.clearAllSelectedItems=this.clearAllSelectedItems.bind(this),this.getSelectedRows=this.getSelectedRows.bind(this),this.getSelectedRowsAsArray=this.getSelectedRowsAsArray.bind(this),this.getSelectedRowIds=this.getSelectedRowIds.bind(this)}rowSelect(e){this.getSelectedRowsValue().has(e.id)?(this.getSelectedRowsValue().delete(e.id),this.selectedRows.next(this.selectedRows.getValue())):(this.selectedRows.getValue().set(e.id,e),this.selectedRows.next(this.selectedRows.getValue()))}selectAll(){if(this.isEveryRowSelected())this.clearAllSelectedItems();else for(const e of this.loadedRows)this.selectedRows.getValue().set(e.id,e),this.selectedRows.next(this.selectedRows.getValue())}isEveryRowSelected(){return this.getSelectedRowsValue().size===this.currentPageSize||this.loadedRows.length===this.getSelectedRowsValue().size}async handlePagination(e,s){return this.clearAllSelectedItems(),await super.handlePagination(e,s)}async handleSort(e){return this.clearAllSelectedItems(),await super.handleSort(e)}clearAllSelectedItems(){this.selectedRows.getValue().clear(),this.selectedRows.next(this.selectedRows.getValue())}getSelectedRows(){return this.selectedRows}getSelectedRowsAsArray(){return Array.from(this.selectedRows.getValue().values())}getSelectedRowIds(){return Array.from(this.selectedRows.getValue().keys())}getSelectedRowsValue(){return this.selectedRows.getValue()}}function es(t){return{...Ze,...t}}function ts(t){return function(s,r){s.constructor.prototype.headers||(s.constructor.prototype.headers=[]),s.constructor.prototype.headers.push({path:r,...t})}}function ss(t){return function(s){async function r(){return s.prototype._table=this,s.prototype.headers}function i(d){const u=[],y=s.prototype.actions||[];for(const m of y){if(!m.isAvailable(d))continue;const h={handler:m.handler.bind(d),accessLevel:m.accessLevel,actionName:m.actionName};u.push(h)}return u}async function n(d){s.prototype.rowClick&&await s.prototype.rowClick.call(d)}async function o(){s.prototype.tableDestroy&&await s.prototype.tableDestroy()}t.prototype.loadHeader=r,t.prototype.getActions=i,t.prototype.handleClick=n,t.prototype.onDestroy=o}}function rs(t){return function(s,r,i){s.constructor.prototype.actions||(s.constructor.prototype.actions=[]),t.handler=i.value,s.constructor.prototype.actions.push(t)}}function as(){return function(e,s,r){e.constructor.prototype.tableDestroy=r.value}}function is(){return function(e,s,r){e.constructor.prototype.rowClick=r.value}}function et(){const t=g.ref(new Map),e=g.ref(0),s=g.ref(null),r=g.computed(()=>Array.from(t.value.values()));function i(v){e.value=v}function n(v){for(const S of v)o(S)}function o(v){t.value.set(v.id,v)}function d(v){return s.value=t.value.get(v)||null,s.value}function u(v){const S=d(v);return S&&t.value.delete(v),!!S}function y(){t.value.clear()}function m(v){s.value=v}function h(){s.value=null}return{itemsAsArray:r,totalCount:e,currentItem:s,setTotalCount:i,addOrReplaceItems:n,getById:d,removeById:u,clearItems:y,setCurrentItem:m,clearCurrentItem:h}}class tt{constructor(){this.pageNumber=1,this.itemCount=20,this.sortDetail=new Ce("id",O.DESC),this.filters=[]}}class ns{constructor(e,s){this.items=e,this.totalItems=s}}class os{constructor(e,s){this.shouldKeepSync=e,this.intervalInMillisecond=s}}const st=new tt;function rt(){const t=g.ref(structuredClone(st));function e(){t.value.pageNumber=t.value.pageNumber+1}function s(){t.value.pageNumber=t.value.pageNumber-1}function r(h){t.value.pageNumber=h}function i(h){t.value.itemCount=h}function n(h){t.value.sortDetail.key=h.key,t.value.sortDetail.order=h.order}function o(h){for(const v in h)d(v,h[v])}function d(h,v){const S=t.value.filters.findIndex(A=>A.key===h);S>-1?t.value.filters[S].value=v:t.value.filters.push({key:h,value:v})}function u(h){let v=t.value.filters;v=v.filter(S=>S.key!==h),t.value.filters=v}function y(){const h={page:t.value.pageNumber,count:t.value.itemCount};t.value.sortDetail&&(h.by=t.value.sortDetail.key,h.order=t.value.sortDetail.order);for(const v of t.value.filters)if(v.value)if(typeof v.value=="string"||typeof v.value=="number")h[v.key]=v.value;else{const S=JSON.stringify(v.value);S!=="[]"&&S!=="{}"&&(h[v.key]=S)}return h}function m(){t.value=structuredClone(st)}return{params:t,setNextPage:e,setPreventPage:s,setPageNumber:r,setItemCount:i,setSortDetail:n,setFilter:d,removeFilter:u,getRequestParams:y,clearParam:m,setFiltersBaseOnRequestBody:o}}function at(){const t=g.ref(new Set),e=g.computed(()=>t.value.has(p.FetchList)),s=g.computed(()=>t.value.has(p.FetchItem)),r=g.computed(()=>t.value.has(p.FetchLastItems)),i=g.computed(()=>t.value.has(p.FetchPreviousItems)),n=g.computed(()=>t.value.has(p.Create)),o=g.computed(()=>t.value.has(p.Update)),d=g.computed(()=>t.value.has(p.Delete)),u=g.computed(()=>t.value.has(p.Search)),y=g.computed(()=>t.value.has(p.Sort));function m(v){t.value.add(v)}function h(v){t.value.delete(v)}return{loadingStatus:t,isFetchingList:e,isFetchingItem:s,isFetchingLastItems:r,isFetchingPreviousItems:i,isCreating:n,isUpdating:o,isDeleting:d,isSearching:u,isSorting:y,setStatus:m,removeStatus:h}}function ls(t){const e=et(),s=rt(),r=at(),i=new be({runAction:async()=>h(p.AutoRefresh)}),n=g.computed(()=>{const l=s.params.value.pageNumber,c=s.params.value.itemCount,f=l*c-c,w=l*c-1,D=[];for(let I=f;I<=w&&e.itemsAsArray.value[I];I++)D.push(e.itemsAsArray.value[I]);return D}),o=g.computed(()=>({totalItems:e.totalCount.value,currentPage:s.params.value.pageNumber,rows:e.itemsAsArray.value,loadingStatus:r.loadingStatus.value,currentPageItems:n.value})),d=g.computed(()=>({getData:y,sort:te,paginate:ge,fetchRows:h})),u=g.computed(()=>t.getSyncDetail());function y(){return o.value}async function m(l){const c=await t.fetchList(l);return e.clearItems(),e.addOrReplaceItems(c.items),e.setTotalCount(c.totalItems),c}async function h(l=p.FetchList){r.setStatus(l);const c=await m(s.getRequestParams());return r.removeStatus(l),c}async function v(){S(),await h()}function S(){if(!u.value.shouldKeepSync)throw new Error("The provided repository does not support auto refresh");i.setupInterval(u.value.intervalInMillisecond)}function A(){i.clearInterval()}async function J(l,c=!0){r.setStatus(p.FetchItem),c&&e.clearCurrentItem();const f=await t.fetchItemById(l);return e.setCurrentItem(f),r.removeStatus(p.FetchItem),f}async function G(l){r.setStatus(p.Create);const c=await t.createItem(l);return c&&e.addOrReplaceItems([c]),r.removeStatus(p.Create),c}async function W(l,c){r.setStatus(p.Update);const f=await t.updateItem(l,c);return f&&e.addOrReplaceItems([f]),r.removeStatus(p.Update),f}async function x(l){return r.setStatus(p.Delete),await t.deleteItem(l),r.removeStatus(p.Delete),e.removeById(l)}async function ke(){s.setNextPage(),r.setStatus(p.FetchLastItems);const l=await m(s.getRequestParams());return r.removeStatus(p.FetchLastItems),l}async function Pe(){s.setPreventPage(),r.setStatus(p.FetchPreviousItems);const l=await m(s.getRequestParams());return r.removeStatus(p.FetchPreviousItems),l}async function ge(l){s.setPageNumber(l),r.setStatus(p.FetchList);const c=await m(s.getRequestParams());return r.removeStatus(p.FetchList),c}async function $e(l){s.setFilter("search",l),r.setStatus(p.Search),e.clearItems();const c=await m(s.getRequestParams());return r.removeStatus(p.Search),c}async function te(l){s.setSortDetail(l),r.setStatus(p.Sort),e.clearItems();const c=await m(s.getRequestParams());return r.removeStatus(p.Sort),c}async function K(){return s.clearParam(),await h()}return g.onBeforeUnmount(()=>{A()}),{loadingStatusManager:r,dataManger:e,paramsManager:s,tableRenderingData:o,fetchList:h,fetchWithAutoRefresh:v,setupAutoRefresh:S,stopAutoRefresh:A,fetchItemById:J,createItem:G,updateItem:W,deleteItem:x,fetchLastItems:ke,fetchPreviousItems:Pe,fetchItemsByPageNumber:ge,search:$e,sort:te,clearFilters:K,tableService:d,currentPageItems:n}}function cs(t){const e=g.ref(t),s=g.computed(()=>({getData(){return{totalItems:e.value.length,currentPageItems:e.value,loadingStatus:new Set,rows:e.value,currentPage:1}},async sort(r){return{totalItems:e.value.length,items:e.value}},async fetchRows(){return{totalItems:e.value.length,items:e.value}},async paginate(r,i){return{totalItems:e.value.length,items:e.value}}}));return{tableRows:e,staticTableService:s}}function us(){const t=g.ref(new Map),e=g.ref(0),s=g.computed(()=>e.value),r=g.computed(()=>Array.from(t.value.values()));function i(m){e.value=m}function n(m){for(const h of m)o(h)}function o(m){t.value.set(String(m.id),m)}function d(m){const h=u(m);return t.value.delete(String(m)),h}function u(m){return t.value.get(String(m))||null}function y(){t.value.clear()}return{entityItemsAsArray:r,addOrReplaceItems:n,removeById:d,getItemById:u,clearItems:y,setTotalCount:i,getTotalCount:s}}class hs{constructor(e,s=500){this.timerId=null,this.debounceTimeout=s,this.action=e}runAction(){this.cancelDebounce(),this.action.runImmediate(),this.timerId=setTimeout(()=>{this.action.runDebounce()},this.debounceTimeout)}cancelDebounce(){this.timerId&&clearTimeout(this.timerId)}}function ds(t){return function(e,s,r){const i=r.value;r.value=async function(...n){try{return await i.apply(this,n)}catch(o){for(const d of t)await d.handleError(o)}}}}function fs(t){return function(e,s,r){const i=r.value;r.value=async function(...n){try{const o=await i.apply(this,n);for(const d of t)d.shouldResolveSuccess(o)&&await d.handleSuccess(o);return o}catch(o){for(const d of t)d.shouldResolveFailure(o)&&await d.handleFailure(o)}}}}class ms{constructor(e,s,r=()=>!0,i=()=>!0){this.successMessageResolver=e,this.failureMessageResolver=s,this.shouldResolveSuccess=r,this.shouldResolveFailure=i}async handleSuccess(e){}async handleFailure(e){}async handleInfo(){}async handleWarning(){}}const R=class R{constructor(){}static GetInstance(){return R.instance||(R.instance=new R),R.instance}static registerHandler(e,s){R.handlers.set(e,s)}handle(e){var i;const s=((i=e.response)==null?void 0:i.status)??0,r=R.handlers.get(s);r&&r.handleError(e)}};R.handlers=new Map,R.instance=null;let Re=R;class vs{constructor(e){this.axiosInstance=e}setBaseURL(e){return this.axiosInstance.defaults.baseURL=e,this}setTimeout(e){return this.axiosInstance.defaults.timeout=e,this}setHeaders(e){return this.axiosInstance.defaults.headers.common=e,this}attachRequestInterceptors(e){return this.axiosInstance.interceptors.request.use(s=>{for(const r of e)r.intercept(s);return s},s=>Promise.reject(s)),this}attachResponseInterceptors(e){return this.axiosInstance.interceptors.response.use(s=>s,s=>{throw e.handle(s),s}),this}build(){return this.axiosInstance}}class gs{constructor(e){this.axiosInstance=e}async get(e,s){return await this.axiosInstance.get(e,s)}async post(e,s,r){return await this.axiosInstance.post(e,s,r)}async patch(e,s,r){return await this.axiosInstance.patch(e,s,r)}async put(e,s,r){return await this.axiosInstance.put(e,s,r)}async delete(e,s){return await this.axiosInstance.delete(e,s)}}class ps{constructor(){this._initializer=[]}setupInitializers(e){this._initializer.push(...e)}initialize(){for(const e of this._initializer)e.initialize()}}const U=class U{constructor(){this.jsonConverter=new M.JsonConvert}serializeObject(e,s){return this.jsonConverter.serializeObject(e,s)}deserializeObject(e,s){return this.jsonConverter.deserializeObject(e,s)}deserializeArray(e,s){return this.jsonConverter.deserializeArray(e,s)}tryDeserialize(e,s){for(const r of s)try{return this.deserializeObject(e,r)}catch{}throw new Error("Unable to deserialize object")}static GetInstance(){return U.Instance||(U.Instance=new U),U.Instance}};U.Instance=null;let Te=U;var it=(t=>(t.Success="success",t.Failure="error",t.Info="info",t.Warning="warning",t))(it||{}),Ee=(t=>(t.BottomLeft="bottomLeft",t.TopLeft="topLeft",t))(Ee||{});class ys{constructor(e,s,r){this.placement=Ee.BottomLeft,this.type=e,this.message=s,this.description=r}}const Ss=Fe.defineStore(me.Dialog,()=>{const t=g.reactive({dialogComponent:null,width:E.DefaultWidth,height:E.DefaultHeight,props:null,header:""}),e=g.computed(()=>!!t.dialogComponent),s=g.computed(()=>!!t.header);function r(u){t.dialogComponent=u}function i(u){t.header=u}function n(u){if(!e.value)throw new Error("there is no dialog to set props on");t.props=u}function o(u,y){if(!e.value)throw new Error("there is no dialog to set size on");if(u<E.MinimalAvailableSize)throw new Error("negative size not supported");y===E.Width?t.width=u:t.height=u}function d(){t.props=null,t.height=E.DefaultHeight,t.width=E.DefaultWidth,t.header="",t.dialogComponent=null}return{dialogData:t,openDialog:r,clearDialog:d,setSize:o,setDialogHeader:i,setProps:n,isDialogExists:e,hasDefaultHeader:s}}),Is=Fe.defineStore(me.Drawer,()=>{const t=g.ref(z.Close),e=g.computed(()=>t.value===z.Open);function s(){t.value=z.Close}function r(){t.value=z.Open}return{closeDrawer:s,openDrawer:r,isDrawerOpen:e}});class ws{constructor(){this.observers=[]}attach(e){this.observers.push(e)}detach(e){this.observers=this.observers.filter(s=>s!==e)}notify(){for(const e of this.observers)e.update(this)}}class Ds{constructor(e){this.mapProcesses=new Map,this.processes=e,this.assignProcessManager()}assignProcessManager(){this.processes.addToManager(this)}setProcessToMap(e){this.mapProcesses.set(e.name,e)}async start(){await this.processes.execute()}async startFrom(e){const s=this.mapProcesses.get(e);if(!s)throw new Error(`Process ${e} not found`);await s.execute()}}class As{constructor(e,s){this.next=null,this.name=e,this.next=s}addToManager(e){e.setProcessToMap(this),this.next&&this.next.addToManager(e)}}class bs{constructor(){this.checkAccessibility=this.checkAccessibility.bind(this),this.isAccessible=this.isAccessible.bind(this),this.getDestinationRouteName=this.getDestinationRouteName.bind(this)}async checkAccessibility(e,s,r){if(await this.isAccessible(e,s)){r();return}if(await this.getDestinationRouteName()){r({name:await this.getDestinationRouteName()});return}r(!1)}async getDestinationRouteName(){return""}}class _s{constructor(e,s,r){this.scheduler=new be({runAction:async()=>{await this.fetchList()}}),this.repository=e,this.crudDataManagement=s,this.syncDetail=this.repository.getSyncDetail(),this.paramManager=r,this.syncListWithApi()}async fetchList(){const e=await this.repository.fetchList(this.paramManager.getRequestParams());return this.crudDataManagement.addOrReplaceItems(e.items),this.crudDataManagement.setTotalCount(e.totalItems),e}async fetchItemById(e){const s=await this.repository.fetchItemById(e);return s&&this.crudDataManagement.addOrReplaceItems([s]),s}async createItem(e){const s=await this.repository.createItem(e);return s&&!this.shouldRefreshListAfterCreate()&&this.crudDataManagement.addOrReplaceItems([s]),s&&this.shouldRefreshListAfterCreate()&&await this.fetchList(),s}shouldRefreshListAfterCreate(){return!0}async deleteItem(e){return await this.repository.deleteItem(e)?this.crudDataManagement.removeById(e):null}async updateItem(e,s){const r=await this.repository.updateItem(e,s);return this.shouldRefreshListAfterUpdate()&&r?(await this.fetchList(),this.crudDataManagement.getItemById(e)):r}shouldRefreshListAfterUpdate(){return!0}async removeItem(e){const s=await this.repository.deleteItem(e);return s&&this.shouldRefreshListAfterDelete()&&await this.fetchList(),s?this.crudDataManagement.removeById(e):null}shouldRefreshListAfterDelete(){return!1}syncListWithApi(){this.scheduler.clearInterval(),this.syncDetail.shouldKeepSync&&this.scheduler.setupInterval(this.syncDetail.intervalInMillisecond)}onDestroy(){this.crudDataManagement.clearItems(),this.clearInterval()}clearInterval(){this.scheduler.clearInterval()}}class nt{}class Ms extends nt{search(e,s,r){const i=[];e:for(const n of e)for(const o of r(n))if(B.removeSpacesFromString(String(o).toLowerCase()).indexOf(B.removeSpacesFromString(String(s).toLowerCase()))>-1){i.push(n);continue e}return i}}var Oe=(t=>(t.Hidden="hidden",t.Visible="visible",t))(Oe||{});class Cs{constructor(e){this._visibilityControl=e,this.mangeVisibilityEvent()}mangeVisibilityEvent(){document.addEventListener("visibilitychange",e=>{document.visibilityState===Oe.Hidden?this._visibilityControl.screenInvisible(e):this._visibilityControl.screenVisible(e)})}}var Ls=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,L=(t,e,s,r)=>{for(var i=r>1?void 0:r?Rs(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ls(e,s,i),i};a.Amount=class{constructor(){this.value="",this.symbol=""}get tradeValueInNumber(){return Number(this.value)}get truncatedValue(){return this.tradeValueInNumber.toLocaleString("en-US",{maximumFractionDigits:8})}},L([M.JsonProperty("value",String,!0)],a.Amount.prototype,"value",2),L([M.JsonProperty("symbol",String)],a.Amount.prototype,"symbol",2),a.Amount=L([M.JsonObject("Amount")],a.Amount),a.BaseModel=class{getTable(){const e=Object.getPrototypeOf(this)._table;if(!e)throw new Error("No Table found for the model. are you sure decorated the model with @Table() ?");return e}},L([M.JsonProperty("id",Number)],a.BaseModel.prototype,"id",2),a.BaseModel=L([M.JsonObject("BaseModel")],a.BaseModel),a.MinifiedSymbolModel=class extends a.BaseModel{},L([M.JsonProperty("symbol",String)],a.MinifiedSymbolModel.prototype,"symbol",2),L([M.JsonProperty("enName",String)],a.MinifiedSymbolModel.prototype,"enName",2),L([M.JsonProperty("faName",String)],a.MinifiedSymbolModel.prototype,"faName",2),L([M.JsonProperty("image",String)],a.MinifiedSymbolModel.prototype,"image",2),a.MinifiedSymbolModel=L([M.JsonObject("MinifiedSymbolModel")],a.MinifiedSymbolModel);class Ts{constructor(e,s){this.requestedDate=e,this.executedDate=s}get requestedDateInJalali(){return C.mapUnixToDate(this.requestedDate,H.SimpleDate)}get requestedTime(){return C.mapUnixToDate(this.requestedDate,H.JustHour)}get executedDateInJalali(){return C.mapUnixToDate(this.executedDate,H.SimpleDate)}get executedDateTime(){return C.mapUnixToDate(this.executedDate,H.JustHour)}}class Es{constructor(e,s){this.requestedAmount=e,this.executedAmount=s}}class Os{constructor(e,s,r,i,n){this.symbolPrice=e,this.USDTPrice=s,this.symobl=r,this.symbolImage=i,this.USDTImage=n}get truncatedSymbolPrice(){return this.symbolPrice.toLocaleString("en-US",{maximumFractionDigits:8})}get truncatedUSDTPrice(){return this.USDTPrice.toLocaleString("en-US",{maximumFractionDigits:8})}}class ks{constructor(e,s){this.soldSymbol=e,this.buySymbol=s}}a.APIErrorHandlerRegistry=Re,a.AbstractSubject=ws,a.AccessControl=De,a.AccessLevel=ee,a.Action=rs,a.ApiBuilder=vs,a.ApplicationDrawerStatus=z,a.ApplicationInitializer=ps,a.AuthorizationDirective=Ae,a.AuthorizationService=ve,a.BaseTable=Xe,a.BehaviorSubject=Qe,a.CellType=fe,a.ClientArraySearch=Ms,a.ClientSearch=nt,a.Column=ts,a.CommonMaskFormats=re,a.CrudService=_s,a.DateConverter=F,a.DateDisabledOptions=Nt,a.DateFormat=H,a.DateFormats=Ye,a.DateTools=X,a.DebounceService=hs,a.DialogDimensions=E,a.EveryAccess=Yt,a.EveryLevelAuthorizationDirective=Vt,a.Feedback=ms,a.FetchListResponse=ns,a.FormManager=xt,a.FormValidationStatus=Q,a.Formatter=C,a.HandleError=ds,a.HandleFeedback=fs,a.HeaderType=de,a.HttpClient=gs,a.InputControl=Jt,a.InputControlBuilder=Gt,a.InputControlData=xe,a.JsonMapper=Te,a.LoadingStatus=p,a.Params=tt,a.Process=As,a.ProcessManager=Ds,a.RangeValue=Bt,a.RouteGuard=bs,a.Scheduler=be,a.SelectableTable=Qt,a.SimpleSort=Le,a.SomeAccess=Ut,a.SomeLevelsAuthorizationDirective=jt,a.SortDetail=Ce,a.SortOrder=O,a.SortOrderTableHeader=Ge,a.Sorter=Xt,a.StatusCode=We,a.StorageKeys=k,a.StoreNames=me,a.SymbolInTrade=ks,a.SymbolPriceInTrade=Os,a.SyncDetail=os,a.TABLE_ACTION_COLUMN=Zt,a.TABLE_COLUMN_DEFAULT_COLSPAN=Me,a.TABLE_COLUMN_DEFAULT_VALUES=Ze,a.TABLE_COLUMN_DEFAULT_WIDTH=_e,a.Table=ss,a.TableConstants=we,a.TableDestroy=as,a.TableHeaderAlign=he,a.TableRowClick=is,a.ToastLocation=Ee,a.ToastMessage=ys,a.ToastType=it,a.TouchSensitiveControl=Wt,a.TradeAmount=Es,a.TradeDate=Ts,a.Util=B,a.VisibilityManager=Cs,a.VisibilityState=Oe,a.cards=Be,a.generateHeader=es,a.ibans=Ne,a.isEmpty=Ke,a.isLastItem=qt,a.isOnlyOneItem=Ht,a.setupJalaliDate=Je,a.setupStore=zt,a.useCrud=us,a.useData=et,a.useDialogService=Ss,a.useDrawerService=Is,a.useForm=Kt,a.useLoadingStatus=at,a.useParams=rt,a.useRepository=ls,a.useStaticTableService=cs,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,29 @@
1
+ export * from './src/lib';
2
+ export * from './src/accessHandling';
3
+ export * from './src/baseDirective';
4
+ export * from './src/baseForm';
5
+ export * from './src/baseSchedule';
6
+ export * from './src/baseTable';
7
+ export * from './src/composables';
8
+ export * from './src/constants';
9
+ export * from './src/dateHandling';
10
+ export * from './src/debounce';
11
+ export * from './src/errorHandling';
12
+ export * from './src/feedbackHandling';
13
+ export * from './src/httpClient';
14
+ export * from './src/initializer';
15
+ export * from './src/json';
16
+ export { useDialogService, ToastType, useDrawerService, ToastLocation, ToastMessage } from './src/layout';
17
+ export * from './src/lib';
18
+ export * from './src/observables';
19
+ export * from './src/process';
20
+ export * from './src/repository';
21
+ export * from './src/routeGuard';
22
+ export * from './src/sort';
23
+ export * from './src/types';
24
+ export * from './src/validators';
25
+ export * from './src/Utils';
26
+ export * from './src/crudService';
27
+ export * from './src/search';
28
+ export * from './src/deviceManagement';
29
+ export * from './src/BaseModel';
@@ -0,0 +1,45 @@
1
+ export declare class Amount {
2
+ value: string;
3
+ symbol: string;
4
+ get tradeValueInNumber(): number;
5
+ get truncatedValue(): string;
6
+ }
7
+ export declare class BaseModel {
8
+ id: number;
9
+ protected getTable<Table>(): Table;
10
+ }
11
+ export declare class MinifiedSymbolModel extends BaseModel {
12
+ symbol: string;
13
+ enName: string;
14
+ faName: string;
15
+ image: string;
16
+ }
17
+ export declare class TradeDate {
18
+ requestedDate: number;
19
+ executedDate: number;
20
+ constructor(requestedDate: number, executedDate: number);
21
+ get requestedDateInJalali(): any;
22
+ get requestedTime(): any;
23
+ get executedDateInJalali(): any;
24
+ get executedDateTime(): any;
25
+ }
26
+ export declare class TradeAmount {
27
+ requestedAmount: Amount;
28
+ executedAmount: Amount;
29
+ constructor(requestedAmount: Amount, executedAmount: Amount);
30
+ }
31
+ export declare class SymbolPriceInTrade {
32
+ symobl: string;
33
+ symbolPrice: number;
34
+ USDTPrice: number;
35
+ symbolImage: string;
36
+ USDTImage: string;
37
+ constructor(symbolPrice: number, USDTPrice: number, symbol: string, symbolImage: string, USDTImage: string);
38
+ get truncatedSymbolPrice(): string;
39
+ get truncatedUSDTPrice(): string;
40
+ }
41
+ export declare class SymbolInTrade {
42
+ soldSymbol: MinifiedSymbolModel;
43
+ buySymbol: MinifiedSymbolModel;
44
+ constructor(soldSymbol: MinifiedSymbolModel, buySymbol: MinifiedSymbolModel);
45
+ }
@@ -0,0 +1,4 @@
1
+ export declare function isOnlyOneItem(total: number): boolean;
2
+ export declare function isLastItem(total: number, index: number): boolean;
3
+ export declare function isEmpty(value: unknown): boolean;
4
+ export declare function setupStore(initializer: () => void): void;
@@ -0,0 +1,10 @@
1
+ import { DirectiveBinding } from 'vue';
2
+ import { MountedDirective, UpdateDirective } from '../baseDirective';
3
+ export declare abstract class AccessControl implements MountedDirective, UpdateDirective {
4
+ protected accessService: any;
5
+ constructor();
6
+ mounted: (element: HTMLElement, binding: DirectiveBinding<string[]>) => void;
7
+ updated: (element: HTMLElement, binding: DirectiveBinding<string[]>) => void;
8
+ private checkAccess;
9
+ protected abstract hasAccess(accessLevels: string[]): boolean;
10
+ }
@@ -0,0 +1,13 @@
1
+ import { Initializer } from '../initializer/Initializer';
2
+ export declare class AccessLevel implements Initializer {
3
+ private static Instance;
4
+ private availableAccesses;
5
+ private constructor();
6
+ setAvailableAccesses(accessToAdd: string[]): void;
7
+ private setAccessListToStorage;
8
+ everyAccess(accessesToCheck: string[]): boolean;
9
+ someAccess(accessesToCheck: string[]): boolean;
10
+ clearAvailableAccesses(): void;
11
+ initialize(): void;
12
+ static GetInstance(): AccessLevel;
13
+ }
@@ -0,0 +1,3 @@
1
+ export interface Accessible {
2
+ hasAccess(): boolean;
3
+ }
@@ -0,0 +1,4 @@
1
+ import { AccessControl } from './AccessControl';
2
+ export declare class EveryAccess extends AccessControl {
3
+ protected hasAccess(accessLevels: string[]): boolean;
4
+ }
@@ -0,0 +1,17 @@
1
+ import { MountedDirective, UpdateDirective } from '../../baseDirective';
2
+ import { AuthorizationService } from './AuthorizationService';
3
+ export declare abstract class AuthorizationDirective implements MountedDirective, UpdateDirective {
4
+ protected _authorizationService: AuthorizationService;
5
+ constructor();
6
+ mounted(element: HTMLElement, binding: {
7
+ arg: string;
8
+ modifiers: Record<PropertyKey, boolean>;
9
+ }, _vnode: unknown): void;
10
+ updated(element: HTMLElement, binding: {
11
+ arg: string;
12
+ modifiers: Record<PropertyKey, boolean>;
13
+ }, _vnode: unknown): void;
14
+ private manageElement;
15
+ private getAccessLevels;
16
+ protected abstract hasAccess(scope: string, levels: string[]): boolean;
17
+ }
@@ -0,0 +1,17 @@
1
+ import { Initializer } from '../../initializer/Initializer';
2
+ export declare class AuthorizationService implements Initializer {
3
+ private static _instance;
4
+ private _accessLevels;
5
+ private constructor();
6
+ initialize(): void;
7
+ setAccessLevels(levels: Record<PropertyKey, string[]>): void;
8
+ private setAccessLevelsToStorage;
9
+ private getAccessLevelsFromStorage;
10
+ getAccessLevelsOfScope(scope: string): Set<string>;
11
+ private setAccessLevelFromStorage;
12
+ everyAccess(scope: string, levels: string[]): boolean;
13
+ someAccess(scope: string, levels: string[]): boolean;
14
+ hasScope(scope: string): boolean;
15
+ clear(): void;
16
+ static GetInstance(): AuthorizationService;
17
+ }
@@ -0,0 +1,4 @@
1
+ import { AuthorizationDirective } from './AuthorizationDirective';
2
+ export declare class EveryLevelAuthorizationDirective extends AuthorizationDirective {
3
+ protected hasAccess(scope: string, levels: string[]): boolean;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { AuthorizationDirective } from './AuthorizationDirective';
2
+ export declare class SomeLevelsAuthorizationDirective extends AuthorizationDirective {
3
+ protected hasAccess(scope: string, levels: string[]): boolean;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { AccessControl } from './AccessControl';
2
+ export declare class SomeAccess extends AccessControl {
3
+ protected hasAccess(accessLevels: string[]): boolean;
4
+ }
@@ -0,0 +1,9 @@
1
+ export { AccessLevel } from './AccessLevel';
2
+ export { AccessControl } from './AccessControl';
3
+ export type { Accessible } from './Accessible';
4
+ export { EveryAccess } from './EveryDirectiveAccess';
5
+ export { SomeAccess } from './SomeDirectiveAccess';
6
+ export * from './SSO/AuthorizationDirective';
7
+ export * from './SSO/AuthorizationService';
8
+ export * from './SSO/EveryLevelAuthorizationDirective';
9
+ export * from './SSO/SomeLevelsAuthorizationDirective';
@@ -0,0 +1,3 @@
1
+ export interface BeforeMountDirective {
2
+ beforeMount(el: unknown, binding: unknown, vnode: unknown): void;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface BeforeUnMountDirective {
2
+ beforeUnMount(element: unknown, binding: unknown, vnode: unknown): void;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface BeforeUpdateDirective {
2
+ beforeUpdate(element: unknown, binding: unknown, vnode: unknown): void;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface CreatedDirective {
2
+ created(element: unknown, binding: unknown, vnode: unknown): void;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface MountedDirective {
2
+ mounted(element: unknown, binding: unknown, vnode: unknown): void;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface UnMountedDirective {
2
+ unMounted(element: unknown, binding: unknown, vnode: unknown): void;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface UpdateDirective {
2
+ updated(element: unknown, binding: unknown, vnode: unknown): void;
3
+ }
@@ -0,0 +1,7 @@
1
+ export type { BeforeMountDirective } from './BeforeMountDirective';
2
+ export type { BeforeUnMountDirective } from './BeforeUnMountDirective';
3
+ export type { BeforeUpdateDirective } from './BeforeUpdateDirective';
4
+ export type { CreatedDirective } from './CreatedDirective';
5
+ export type { MountedDirective } from './MountedDirective';
6
+ export type { UnMountedDirective } from './UnMountedDirective';
7
+ export type { UpdateDirective } from './UpdateDirective';
@@ -0,0 +1,17 @@
1
+ import { InputControl } from './InputControl';
2
+ export declare class FormManager {
3
+ private _inputControls;
4
+ private _isValid;
5
+ private _id;
6
+ getInputControlsAsArray(): InputControl<unknown>[];
7
+ runValidation(): void;
8
+ addInputControls(inputControls: InputControl<unknown>[]): void;
9
+ getInputControl<T>(inputControlName: string): InputControl<T>;
10
+ resetControls(inputControlNames: string[]): void;
11
+ resetAll(): void;
12
+ createRequestBody<T>(): T;
13
+ setIsValid(isValid: boolean): void;
14
+ getIsValid(): boolean;
15
+ setId(id: number): void;
16
+ getId(): number;
17
+ }
@@ -0,0 +1,36 @@
1
+ import { Nullable } from '../types';
2
+ import { Validator } from '../validators';
3
+ export declare class InputControl<T> {
4
+ private initialData;
5
+ private data;
6
+ private _validators;
7
+ private _id;
8
+ constructor(name: string, value: Nullable<T>);
9
+ private shouldRunValidation;
10
+ runValidation(isBlur?: boolean): void;
11
+ private setFormToInvalidState;
12
+ private setFormToValidState;
13
+ reset(): void;
14
+ markAsInitial(): void;
15
+ setValidators(validators: Validator<T>[]): void;
16
+ getChangeSensitive(): boolean;
17
+ setChangeSensitive(isChangeSensitive: boolean): void;
18
+ getIsBlurSensitive(): boolean;
19
+ setIsBlurSensitive(isBlurSensitive: boolean): void;
20
+ getIsRequired(): boolean;
21
+ setIsRequired(isRequired: boolean): void;
22
+ getIsValid(): boolean;
23
+ setIsValid(isValid: boolean): void;
24
+ getIsIncludeInRequestBody(): boolean;
25
+ setIsIncludeInRequestBody(isIncludeInRequestBody: boolean): void;
26
+ getNotValidMessage(): string;
27
+ setNotValidMessage(notValidMessage: string): void;
28
+ getName(): string;
29
+ setName(name: string): void;
30
+ setId(id: number): void;
31
+ getId(): number;
32
+ getIsEmptySensitive(): boolean;
33
+ setIsEmptySensitive(value: boolean): void;
34
+ set value(value: Nullable<T>);
35
+ get value(): Nullable<T>;
36
+ }
@@ -0,0 +1,14 @@
1
+ import { InputControl } from './InputControl';
2
+ import { Validator } from '../validators';
3
+ export declare class InputControlBuilder<T> {
4
+ private _inputControl;
5
+ constructor(inputControl: InputControl<T>);
6
+ setValidators(validators: Validator<T>[]): this;
7
+ setChangeSensitive(): this;
8
+ setRequired(): this;
9
+ setValid(): this;
10
+ setBlurSensitive(): this;
11
+ setId(id: number): this;
12
+ removeEmptySensitive(): this;
13
+ build(): InputControl<T>;
14
+ }
@@ -0,0 +1,13 @@
1
+ import { Nullable } from '../types';
2
+ export declare class InputControlData<T> {
3
+ value: Nullable<T>;
4
+ initialValue: Nullable<T>;
5
+ name: string;
6
+ isValid: boolean;
7
+ isBlurSensitive: boolean;
8
+ isRequired: boolean;
9
+ isIncludeInRequestBody: boolean;
10
+ isChangeSensitive: boolean;
11
+ notValidMessage: string;
12
+ isEmptySensitive: boolean;
13
+ }
@@ -0,0 +1,9 @@
1
+ import { DirectiveBinding } from 'vue';
2
+ import { MountedDirective, BeforeUnMountDirective } from '../baseDirective';
3
+ import { InputControl } from './InputControl';
4
+ export declare class TouchSensitiveControl implements MountedDirective, BeforeUnMountDirective {
5
+ mounted: (element: HTMLInputElement, binding: DirectiveBinding<InputControl<unknown>>) => void;
6
+ beforeUnMount: (element: HTMLInputElement, binding: DirectiveBinding<InputControl<unknown>>) => void;
7
+ private handleBlur;
8
+ private handleFocus;
9
+ }
@@ -0,0 +1,5 @@
1
+ import { FormManager } from './FormManager';
2
+ export declare function useForm(form: FormManager): {
3
+ reactiveForm: any;
4
+ validationStatus: any;
5
+ };
@@ -0,0 +1,6 @@
1
+ export { InputControl } from './InputControl';
2
+ export { InputControlBuilder } from './InputControlBuilder';
3
+ export { InputControlData } from './InputControlData';
4
+ export { TouchSensitiveControl } from './TouchSensitiveForm';
5
+ export { FormManager } from './FormManager';
6
+ export { useForm } from './UseForm';
@@ -0,0 +1,3 @@
1
+ export interface Schedule {
2
+ runAction: () => Promise<unknown>;
3
+ }
@@ -0,0 +1,8 @@
1
+ import { Schedule } from './Schedule';
2
+ export declare class Scheduler {
3
+ private timerId;
4
+ private readonly schedule;
5
+ constructor(scheduler: Schedule);
6
+ setupInterval(intervalInMilliseconds: number): void;
7
+ clearInterval(): void;
8
+ }
@@ -0,0 +1,2 @@
1
+ export { type Schedule } from './Schedule';
2
+ export { Scheduler } from './Scheduler';
@@ -0,0 +1,46 @@
1
+ import { SortDetail } from '../sort';
2
+ import { BaseModel } from '../BaseModel';
3
+ import { Accessible } from '../accessHandling';
4
+ import { TableHeaderSchema } from './TableHeaderSchema';
5
+ import { TableService } from './TableService';
6
+ import { TableAction } from './TableAction';
7
+ import { Nullable } from '../types';
8
+ import { TableSummarySchema } from './TableSummarySchema.ts';
9
+ export declare abstract class BaseTable<Model extends BaseModel> {
10
+ protected service: TableService<Model>;
11
+ private accessService;
12
+ protected currentPage: number;
13
+ protected currentPageSize: number;
14
+ private currentSortDetail;
15
+ protected loadedRows: Model[];
16
+ headerSchema: TableHeaderSchema<Model>[];
17
+ protected constructor(service: TableService<Model>);
18
+ addHeader(schema: TableHeaderSchema<Model>): void;
19
+ load(): Promise<void>;
20
+ protected filterItemsBaseOnAccessLevel<T>(items: Accessible[]): T[];
21
+ sort(sortDetail: SortDetail<Model>): Promise<void>;
22
+ private shouldSendSortRequest;
23
+ paginate(nextPage: number, pageSize: number): Promise<void>;
24
+ private shouldSendPaginationRequest;
25
+ protected loadRows(): Promise<Model[]>;
26
+ getData(): import('./TableHeaderSchema').TableRenderingData<Model>;
27
+ protected handleSort(sortDetail: SortDetail<Model>): Promise<import('../repository/model').FetchListResponse<Model>>;
28
+ protected handlePagination(nextPage: number, pageSize: number): Promise<import('../repository/model').FetchListResponse<Model>>;
29
+ getItemCountPerPage(): number;
30
+ isLoading(): boolean;
31
+ protected getLoadingStatuses(): Set<LoadingStatus>;
32
+ hasAnyAction(): boolean;
33
+ getAccessedActions(row: Model): TableAction<Model>[];
34
+ protected getActions(row: Model): TableAction<Model>[];
35
+ getScrollDetail(): Nullable<boolean | {
36
+ x?: number;
37
+ y?: number;
38
+ }>;
39
+ isExpandable(): boolean;
40
+ handleClick(row: Model): Promise<void>;
41
+ handleMetaClick(row: Model): Promise<void>;
42
+ handleDoubleClick(row: Model): Promise<void>;
43
+ onDestroy(): Promise<void>;
44
+ loadHeader(): Promise<TableHeaderSchema<Model>[]>;
45
+ loadSummarySchema(): TableSummarySchema;
46
+ }
@@ -0,0 +1,12 @@
1
+ import { TableHeaderSchema } from './TableHeaderSchema';
2
+ import { BaseModel } from '../BaseModel';
3
+ export declare const TABLE_COLUMN_DEFAULT_WIDTH = "150px";
4
+ export declare const TABLE_COLUMN_DEFAULT_COLSPAN = 2;
5
+ export declare const TABLE_ACTION_COLUMN: TableHeaderSchema<BaseModel>;
6
+ export declare const TABLE_COLUMN_DEFAULT_VALUES: {
7
+ width: string;
8
+ align: any;
9
+ headerType: any;
10
+ cellType: any;
11
+ colspan: number;
12
+ };
@@ -0,0 +1,3 @@
1
+ export interface Destroy {
2
+ onDestroy(): Promise<void>;
3
+ }
@@ -0,0 +1,4 @@
1
+ import { TableAction } from './TableAction';
2
+ export interface RowActionSource<Model, A> {
3
+ getActions(): TableAction<Model, A>[];
4
+ }
@@ -0,0 +1,3 @@
1
+ export interface RowClick<Model> {
2
+ handleClick(row: Model): Promise<void>;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface RowDoubleClick<Model> {
2
+ handleDoubleClick(row: Model): Promise<void>;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface RowMetaClick<Model> {
2
+ handleMetaClick(row: Model): Promise<void>;
3
+ }
@@ -0,0 +1,19 @@
1
+ import { BaseTable } from './BaseTable';
2
+ import { BehaviorSubject } from '../observables/BehaviorSubject';
3
+ import { SortDetail } from '../sort';
4
+ import { BaseModel } from '../BaseModel';
5
+ import { TableService } from './TableService';
6
+ export declare abstract class SelectableTable<Model extends BaseModel> extends BaseTable<Model> {
7
+ selectedRows: BehaviorSubject<Map<number, Model>>;
8
+ constructor(service: TableService<Model>);
9
+ rowSelect(row: Model): void;
10
+ selectAll(): void;
11
+ private isEveryRowSelected;
12
+ protected handlePagination(nextPage: number, pageSize: number): Promise<import('../repository/model').FetchListResponse<Model>>;
13
+ protected handleSort(sortDetail: SortDetail<Model>): Promise<import('../repository/model').FetchListResponse<Model>>;
14
+ clearAllSelectedItems(): void;
15
+ getSelectedRows(): BehaviorSubject<Map<number, Model>>;
16
+ getSelectedRowsAsArray(): Model[];
17
+ getSelectedRowIds(): number[];
18
+ getSelectedRowsValue(): Map<number, Model>;
19
+ }
@@ -0,0 +1,8 @@
1
+ import { Accessible } from '../accessHandling';
2
+ export interface TableAction<Model> extends Accessible {
3
+ readonly actionName: string;
4
+ handler(row: Model): Promise<void>;
5
+ }
6
+ export interface ActionDecorator<Model> extends TableAction<Model> {
7
+ isAvailable(model: Model): boolean;
8
+ }