isite 2021.12.5 → 2021.12.15

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.
@@ -1,113 +1,139 @@
1
1
  .print-only {
2
- visibility: collapse;
2
+ visibility: collapse;
3
3
  }
4
4
 
5
5
  .page-a4 {
6
- height: 297mm !important;
7
- padding: 2mm !important;
8
- margin: 0mm !important;
9
- background: white !important;
10
- color: #000 !important;
11
- page-break-before: always !important;
12
- page-break-after: always !important;
13
- page-break-inside: avoid !important;
6
+ display: inline-block;
7
+ height: 297mm !important;
8
+ width: 210mm !important;
9
+ padding: 2mm !important;
10
+ margin: 0mm !important;
11
+ background: white !important;
12
+ color: #000 !important;
13
+ page-break-before: always !important;
14
+ page-break-after: always !important;
15
+ page-break-inside: avoid !important;
16
+ }
17
+ .width-15-mm {
18
+ min-width: 15mm !important;
19
+ width: 15mm !important;
20
+ white-space: normal;
21
+ max-width: 15mm !important;
22
+ }
23
+ .width-30-mm {
24
+ min-width: 30mm !important;
25
+ width: 30mm !important;
26
+ white-space: normal;
27
+ max-width: 30mm !important;
28
+ }
29
+ .width-60-mm {
30
+ min-width: 60mm !important;
31
+ width: 60mm !important;
32
+ white-space: normal;
33
+ max-width: 60mm !important;
34
+ }
35
+ .width-90-mm {
36
+ min-width: 90mm !important;
37
+ width: 90mm !important;
38
+ white-space: normal;
39
+ max-width: 90mm !important;
14
40
  }
15
41
 
16
42
  .page-width-a4 {
17
- padding: 2mm;
18
- margin: 0mm;
43
+ padding: 2mm;
44
+ margin: 0mm;
19
45
  }
20
46
 
21
47
  body.a4 {
22
- background: white;
23
- color: #000;
48
+ background: white;
49
+ color: #000;
24
50
  }
25
51
  body.a4 {
26
- height: 297mm;
52
+ height: 297mm;
27
53
  }
28
- body.print-mode{
29
- padding: 0px !important;
30
- margin: 2mm !important;
54
+ body.print-mode {
55
+ padding: 0px !important;
56
+ margin: 2mm !important;
31
57
  }
32
58
  body.print-mode .hide {
33
- visibility: visible;
59
+ visibility: visible;
34
60
  }
35
61
  body.print-mode .not-print,
36
62
  body.print-mode .dont-print {
37
- display: none;
63
+ display: none;
38
64
  }
39
65
  body.print-mode .print-only {
40
- visibility: visible;
66
+ visibility: visible;
41
67
  }
42
68
  body.print-mode .table {
43
- table-layout: fixed;
44
- border-collapse: collapse;
45
- border: 1px solid black;
46
- font-size: 8pt;
47
- page-break-inside: avoid;
69
+ table-layout: fixed;
70
+ border-collapse: collapse;
71
+ border: 1px solid black;
72
+ font-size: 8pt;
73
+ page-break-inside: avoid;
48
74
  }
49
75
  body.print-mode .table.wide {
50
- min-width: 206mm !important;
51
- width: 206mm !important;
76
+ min-width: 206mm !important;
77
+ width: 206mm !important;
52
78
  }
53
79
  body.print-mode .table th {
54
- color: #000 !important;
55
- background: #fff !important;
56
- border-collapse: collapse;
80
+ color: #000 !important;
81
+ background: #fff !important;
82
+ border-collapse: collapse;
57
83
  }
58
84
  body.print-mode .table td {
59
- color: #000 !important;
60
- background: #fff !important;
61
- border-collapse: collapse;
85
+ color: #000 !important;
86
+ background: #fff !important;
87
+ border-collapse: collapse;
62
88
  }
63
89
  body.print-mode input,
64
90
  body.print-mode textarea {
65
- font-size: 8pt;
91
+ font-size: 8pt;
66
92
  }
67
93
  body.print-mode .small {
68
- font-size: 6pt;
94
+ font-size: 6pt;
69
95
  }
70
96
 
71
97
  .page {
72
- page-break-before: always;
73
- page-break-after: always;
74
- page-break-inside: avoid !important;
75
- }
76
- @media print {
77
- :root {
78
- --legend-color: #000;
79
- --legend-text-shadow: none;
80
- }
81
-
82
- .page {
83
- /* this section always occupies it's own page or pages. */
84
98
  page-break-before: always;
85
99
  page-break-after: always;
86
100
  page-break-inside: avoid !important;
87
- }
101
+ }
102
+ @media print {
103
+ :root {
104
+ --legend-color: #000;
105
+ --legend-text-shadow: none;
106
+ }
88
107
 
89
- .print-break {
90
- page-break-after: always;
91
- }
108
+ .page {
109
+ /* this section always occupies it's own page or pages. */
110
+ page-break-before: always;
111
+ page-break-after: always;
112
+ page-break-inside: avoid !important;
113
+ }
92
114
 
93
- .print-start {
94
- /* elements always start on the top of a new page. */
95
- page-break-before: always;
96
- }
115
+ .print-break {
116
+ page-break-after: always;
117
+ }
97
118
 
98
- .print-content {
99
- page-break-inside: avoid;
100
- }
119
+ .print-start {
120
+ /* elements always start on the top of a new page. */
121
+ page-break-before: always;
122
+ }
101
123
 
102
- h1,
103
- h2,
104
- h3,
105
- h4,
106
- h5 {
107
- page-break-after: avoid;
108
- }
124
+ .print-content {
125
+ page-break-inside: avoid;
126
+ }
109
127
 
110
- /* @page: first {
128
+ h1,
129
+ h2,
130
+ h3,
131
+ h4,
132
+ h5 {
133
+ page-break-after: avoid;
134
+ }
135
+
136
+ /* @page: first {
111
137
  margin: 0;
112
138
  }
113
139
  @page: blank {
@@ -116,44 +142,44 @@ body.print-mode .small {
116
142
  }
117
143
  } */
118
144
 
119
- @page {
120
- size: A4;
121
- }
145
+ @page {
146
+ size: A4;
147
+ }
122
148
 
123
- @page: right {
124
- @top-right {
125
- content: "";
149
+ @page: right {
150
+ @top-right {
151
+ content: '';
152
+ }
126
153
  }
127
- }
128
154
 
129
- @page: right {
130
- @bottom-right {
131
- content: "";
155
+ @page: right {
156
+ @bottom-right {
157
+ content: '';
158
+ }
132
159
  }
133
- }
134
160
 
135
- @page: left {
136
- @top-left {
137
- content: "";
161
+ @page: left {
162
+ @top-left {
163
+ content: '';
164
+ }
138
165
  }
139
- }
140
166
 
141
- @page: left {
142
- @bottom-left {
143
- content: "Page " counter(page) " of " counter(pages);
167
+ @page: left {
168
+ @bottom-left {
169
+ content: 'Page ' counter(page) ' of ' counter(pages);
170
+ }
144
171
  }
145
- }
146
172
 
147
- a {
148
- font-weight: bolder;
149
- text-decoration: none;
150
- }
173
+ a {
174
+ font-weight: bolder;
175
+ text-decoration: none;
176
+ }
151
177
 
152
- a[href^="http"]:after {
153
- content: " [ " attr(href) " ] ";
154
- }
178
+ a[href^='http']:after {
179
+ content: ' [ ' attr(href) ' ] ';
180
+ }
155
181
 
156
- a[href^="#"]:after {
157
- content: "";
158
- }
182
+ a[href^='#']:after {
183
+ content: '';
184
+ }
159
185
  }
@@ -42,6 +42,7 @@
42
42
  padding: 5px;
43
43
  text-align: center;
44
44
  font-weight: bold;
45
+ white-space: nowrap;
45
46
  }
46
47
 
47
48
  .table.center {
@@ -74,10 +75,3 @@
74
75
  border: none !important;
75
76
  }
76
77
 
77
- @media print {
78
-
79
- table.details {
80
- font-size: 85%;
81
- }
82
-
83
- }
@@ -318,10 +318,8 @@
318
318
  op.url = site.handle_url(op.url);
319
319
 
320
320
  if (window.SOCIALBROWSER && window.SOCIALBROWSER.fetchJson) {
321
- console.log(' ( SOCIALBROWSER.fetchJson ) ', op);
322
321
  SOCIALBROWSER.fetchJson(op, (data) => {
323
322
  callback(data);
324
- console.log(' ( SOCIALBROWSER.fetchJson callback ) ', data);
325
323
  });
326
324
  } else {
327
325
  fetch(op.url, {
@@ -408,6 +406,39 @@
408
406
  return parseFloat(n);
409
407
  };
410
408
 
409
+ site.to_money = site.toMoney = function (_num, fixed) {
410
+ let n = 0;
411
+ if (_num) {
412
+ _num = _num.toFixed(2).split('.');
413
+ let n1 = _num[0];
414
+ let n2 = _num[1];
415
+ if (n2) {
416
+ let n3 = n2[0];
417
+ let n4 = n2[1];
418
+ if (n4 && parseInt(n4) > 5) {
419
+ n3 = parseInt(n3) + 1;
420
+ n3 = n3 * 10;
421
+ if (n3 == 100) {
422
+ n3 = 0;
423
+ _num[0] = parseInt(_num[0]) + 1;
424
+ _num[1] = '';
425
+ } else {
426
+ _num[1] = n3;
427
+ }
428
+ } else if (n4 && parseInt(n4) == 5) {
429
+ _num[1] = n2;
430
+ } else if (n4 && parseInt(n4) > 2) {
431
+ n4 = 5;
432
+ _num[1] = n3 + n4;
433
+ } else {
434
+ _num[1] = n3;
435
+ }
436
+ }
437
+ n = _num.join('.');
438
+ }
439
+ return parseFloat(n);
440
+ };
441
+
411
442
  site.to_float = site.toFloat = function (_num) {
412
443
  if (_num) {
413
444
  return parseFloat(_num);
@@ -1 +1 @@
1
- (function(e,t,n,r){function o(e){return e?("string"!=typeof e&&(e=e.toString()),e.replace(/[\/\\^$*+?.()\[\]{}]/g,"\\$&")):""}function a(e,t){let n="";return d.forEach(r=>{r.n==e&&(n=r.i0[t])}),n}function l(e,t){let n="";return 11==e?d.forEach(r=>{r.n==e&&(n=r.i0[t])}):12==e?d.forEach(r=>{r.n==e&&(n=r.i0[t])}):(d.forEach(r=>{r.n==e[1]&&(n=r.i0[t])}),d.forEach(r=>{r.n==e[0]&&(e[1]>0&&e[0]>1?n+=f.strings.space[t]+f.strings.and[t]:n+="",n+=r.i1[t])})),n}function s(e,t){let n="";d.forEach(r=>{r.n==e[0]&&(n=r.i2[t]+f.strings.space[t])});let r=l(e.substring(1),t);return r&&(n&&(n+=f.strings.and[t]),n+=r),n}function c(e,t){let n="";d.forEach(r=>{r.n==e[0]&&(n=r.i3[t]+f.strings.space[t])});let r=s(e.substring(1),t);return r&&(n&&(n+=f.strings.and[t]),n+=r),n}function u(e,t){let n=l(e.substring(0,2),t)+f.strings.space[t];1==e[0]?n+=f.strings[10][t]+f.strings.space[t]:n+=f.strings[20][t]+f.strings.space[t];let r=s(e.substring(2),t);return r&&(n+=f.strings.and[t]+r),n}if(String.prototype.test||(String.prototype.test=function(e,t="gium"){try{return new RegExp(e,t).test(this)}catch(e){return!1}}),String.prototype.like||(String.prototype.like=function(e){if(!e)return!1;let t=!1;return e.split("|").forEach(e=>{e=e.split("*"),e.forEach((t,n)=>{e[n]=o(t)}),e=e.join(".*"),this.test("^"+e+"$","gium")&&(t=!0)}),t}),String.prototype.contains||(String.prototype.contains=function(e){let t=!1;return e?(e.split("|").forEach(e=>{e&&this.test("^.*"+o(e)+".*$","gium")&&(t=!0)}),t):t}),"object"==typeof SOCIALBROWSER){if(SOCIALBROWSER.var=SOCIALBROWSER.var||{},SOCIALBROWSER.var.white_list=SOCIALBROWSER.var.white_list||[],t.location.hostname){let e=`*${t.location.hostname}*`,n=!1;SOCIALBROWSER.var.white_list.forEach(t=>{t.url==e&&(n=!0)}),n||(SOCIALBROWSER.var.white_list.push({url:e}),SOCIALBROWSER.call("set_var",{name:"white_list",data:SOCIALBROWSER.var.white_list}))}SOCIALBROWSER.var.blocking=SOCIALBROWSER.var.blocking||{},SOCIALBROWSER.var.blocking.block_ads=!1,SOCIALBROWSER.var.blocking.block_empty_iframe=!1,SOCIALBROWSER.var.blocking.remove_external_iframe=!1,SOCIALBROWSER.var.blocking.skip_video_ads=!1,SOCIALBROWSER.var.blocking.popup=SOCIALBROWSER.var.blocking.popup||{},SOCIALBROWSER.var.blocking.popup.allow_external=!0,SOCIALBROWSER.var.blocking.popup.allow_internal=!0,SOCIALBROWSER.var.blocking.javascript=SOCIALBROWSER.var.blocking.javascript||{},SOCIALBROWSER.var.blocking.javascript.block_window_open=!1,SOCIALBROWSER.var.blocking.javascript.block_eval=!1,SOCIALBROWSER.var.blocking.javascript.block_console_output=!1}let f={render:function(e,n){let r=t.querySelector(e);return r?Mustache.render(r.innerHTML,n):""},html:function(e,t){return Mustache.render(e,t)},getUniqueObjects:function(e,t){const n=e.map(e=>e[t]).map((e,t,n)=>n.indexOf(e)===t&&t).filter(t=>e[t]).map(t=>e[t]);return n},$:function(e){let n=t.querySelectorAll(e);return n}},p=999999;f.showModal=function(t){r(t).click(()=>{r("popup").hide()}),p++;let n=f.$(t);if(0===n.length)return;n[0].style.zIndex=p,n[0].style.display="block";let o=n[0].getAttribute("fixed");""!==o&&n[0].addEventListener("click",function(){f.hideModal(t)});let a=f.$(t+" i-control input");a.length>0&&a[0].focus(),f.$(t+" .close").forEach(e=>{e.addEventListener("click",function(){f.hideModal(t)})}),f.$(t+" .modal-header").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),f.$(t+" .modal-body").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),f.$(t+" .modal-footer").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})})},f.hideModal=function(e){r("popup").hide();let t=f.$(e);t.length>0&&(t[0].style.display="none")},f.eventList=[],f.on=function(e,t){t=t||function(){},f.eventList.push({name:e,callback:t})},f.call=function(e,t){for(var n=0;n<f.eventList.length;n++){var r=f.eventList[n];r.name==e&&r.callback(t)}},f.translate=function(e,t){"string"==typeof e&&(e={text:e,lang:"ar"}),e.url=`https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=${e.lang}&dt=t&dt=bd&dj=1&q=${e.text}`,f.getData(e,t)},f.getData=function(e,t,n){t=t||function(){},n=n||function(){},"string"==typeof e&&(e={url:e}),e.headers=e.headers||{Accept:"application/json","Content-Type":"application/json"},e.url=f.handle_url(e.url),fetch(e.url,{mode:"cors",method:"get",headers:e.headers}).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{n(e)})},f.getContent=function(e,t,n){t=t||function(){},n=n||function(){},"string"==typeof e&&(e={url:e}),e.url=f.handle_url(e.url),fetch(e.url,{mode:"cors",method:"get"}).then(function(e){return e.text()}).then(function(e){t(e)})},f.handle_url=function(t){if("string"!=typeof t)return t;if(t=t.trim(),t.like("http*")||0===t.indexOf("//")||0===t.indexOf("data:"))t=t;else if(0===t.indexOf("/"))t=e.location.origin+t;else if(t.split("?")[0].split(".").length<3){let n=e.location.pathname.split("/").pop();t=e.location.origin+e.location.pathname.replace(n,"")+t}return t},f.postData=function(n,r,o){r=r||function(){},o=o||function(){},"string"==typeof n&&(n={url:n}),n.data=n.data||n.body,delete n.body,n.data&&"object"==typeof n.data&&(n.data=JSON.stringify(n.data)),n.headers=n.headers||{Accept:"application/json","Content-Type":"application/json"},n.data&&"string"==typeof n.data&&(n.headers["Content-Length"]=n.data.length.toString());try{n.headers.Cookie=t.cookie}catch(o){console.log(o)}n.method="post",n.redirect="follow",n.mode="cors",n.url=f.handle_url(n.url),e.SOCIALBROWSER&&e.SOCIALBROWSER.fetchJson?(console.log(" ( SOCIALBROWSER.fetchJson ) ",n),SOCIALBROWSER.fetchJson(n,e=>{r(e),console.log(" ( SOCIALBROWSER.fetchJson callback ) ",e)})):fetch(n.url,{mode:n.mode,method:n.method,headers:n.headers,body:n.data,redirect:n.redirect}).then(e=>e.json()).then(e=>{r(e)}).catch(e=>{o(e)})},f.typeOf=function(e){return Object.prototype.toString.call(e).slice(8,-1)},f.toDateTime=function(e){return e?new Date(e):new Date},f.toDateX=function(e){let t=f.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()},f.toDateXT=function(e){let t=f.toDateTime(e);return t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},f.toDateXF=function(e){let t=f.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},f.toDateOnly=function(e){let t=f.toDateTime(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)},f.toDateT=function(e){return f.toDateOnly(e).getTime()},f.toDateF=function(e){return f.toDateTime(e).getTime()},f.addZero=function(e,t){let n=t-e.toString().length;for(let t=0;t<n;t++)e="0"+e.toString();return e},f.addSubZero=function(e,t){let n=t;if(2==e.toString().split(".").length){e.toString().split(".")[1].length;e=e.toString()}else e=e.toString()+".";for(let t=0;t<n;t++)e=e.toString()+0;return e},f.fixed=2,f.to_number=f.toNumber=function(e,t){let n=t||f.fixed,r=0;return e&&(r=parseFloat(e).toFixed(n)),parseFloat(r)},f.to_float=f.toFloat=function(e){return e?parseFloat(e):0},f.to_int=f.toInt=function(e){return e?parseInt(e):0},f.$base64Letter="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f.$base64Numbers=[];for(let e=11;e<99;e++)e%10!=0&&e%11!=0&&f.$base64Numbers.push(e);f.toJson=(e=>typeof e===n||null===e?"":JSON.stringify(e)),f.fromJson=(e=>"string"!=typeof e?e:JSON.parse(e)),f.toBase64=(e=>typeof e===n||null===e||""===e?"":("string"!=typeof e&&(e=f.toJson(e)),btoa(unescape(encodeURIComponent(e))))),f.fromBase64=(e=>typeof e===n||null===e||""===e?"":decodeURIComponent(o(atob(e)))),f.to123=(e=>{e=f.toBase64(e);let t="";for(let n=0;n<e.length;n++){let r=e[n];t+=f.$base64Numbers[f.$base64Letter.indexOf(r)]}return t}),f.from123=(e=>{let t="";for(let n=0;n<e.length;n++){let r=e[n]+e[n+1],o=f.$base64Numbers.indexOf(parseInt(r));t+=f.$base64Letter[o],n++}return t=f.fromBase64(t),t}),f.typeOf=f.typeof=function(e){return Object.prototype.toString.call(e).slice(8,-1)},f.showTabContent=function(e,n){let r=t.querySelectorAll(".tab-content");for(i=0;i<r.length;i++)r[i].style.display="none";let o=t.querySelectorAll(".tab-link");for(i=0;i<o.length;i++)o[i].className=o[i].className.replace(" active","");t.querySelectorAll(n+".tab-content").forEach(e=>{e.style.display="inline-block"}),e&&(e.currentTarget.className+=" active")},f.showTabs=function(e,t){e&&e.stopPropagation(),r(".main-menu .tabs").hide(),r(t).show(100)},f.toHtmlTable=function(e){if(e===n||null===e)return"";if("Object"==f.typeOf(e)){let t='<table class="table">';for(let n=0;n<Object.getOwnPropertyNames(e).length;n++){let r=Object.getOwnPropertyNames(e)[n];t+="<tr>",t+=`<td><p> ${r} </p></td>`,"Object"==f.typeOf(e[r])||"Array"==f.typeOf(e[r])?t+=`<td><p> ${f.toHtmlTable(e[r])} </p></td>`:t+=`<td><p> ${e[r]} </p></td>`,t+="</tr>"}return t+="</table>",t}if("Array"==f.typeOf(e)){let t='<table class="table">';for(let n=0;n<e.length;n++)"Object"==f.typeOf(e[n])||"Array"==f.typeOf(e[n])?t+=`<tr><td><p>${f.toHtmlTable(e[n])}</p></td></tr>`:t+=`<tr><td><p>${e[n]}</p></td></tr>`;return t+="</table>",t}return""},f.vControles=[],f.validated=function(e){const n={ok:!0,messages:[]};f.vControles.forEach(e=>{e.el.style.border=e.border}),f.vControles=[],e=e||"body";const r=t.querySelectorAll(e+" [v]");return r.forEach(e=>{const t=e.style.border,r=e.getAttribute("v"),o=r.split(" ");o.forEach(r=>{if(r=r.toLowerCase().trim(),"r"===r)"INPUT"!==e.nodeName&&"SELECT"!==e.nodeName||e.value&&!e.value.like("*undefined*")||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Data Is Required",ar:"هذا البيان مطلوب"}));else if(r.like("ml*")){const o=parseInt(r.replace("ml",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length>o)||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be <= "+o,ar:"عدد الاحرف يجب ان يكون أقل من أو يساوى "+o}))}else if(r.like("ll*")){const o=parseInt(r.replace("ll",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length<o)||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be >= "+o,ar:"عدد الاحرف يجب ان يكون اكبر من أو يساوى "+o}))}else if(r.like("l*")){const o=parseInt(r.replace("l",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&e.value.length===o||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be = "+o,ar:"عدد الاحرف يجب ان يساوى "+o}))}})}),n};let d=[{n:1,i0:{ar:"واحد"},i1:{ar:"عشرة"},i2:{ar:"مائة"},i3:{ar:"الف"},i4:{ar:"عشرة الاف"}},{n:2,i0:{ar:"اثنان "},i1:{ar:"عشرون"},i2:{ar:"مائتان"},i3:{ar:"الفان"},i4:{ar:"عشرون الف"}},{n:3,i0:{ar:"ثلاثة"},i1:{ar:"ثلاثون"},i2:{ar:"ثلاثمائة"},i3:{ar:"ثلاث الاف"},i4:{ar:"ثلاثون الف"}},{n:4,i0:{ar:"اربعة"},i1:{ar:"اربعون"},i2:{ar:"اربعة مائة"},i3:{ar:"اربعة الاف"},i4:{ar:"اربعون الف"}},{n:5,i0:{ar:"خمسة"},i1:{ar:"خمسون"},i2:{ar:"خمسمائة"},i3:{ar:"خمسة الاف"},i4:{ar:"خمسون الف"}},{n:6,i0:{ar:"ستة"},i1:{ar:"ستون"},i2:{ar:"ستة مائة"},i3:{ar:"ستة الااف"},i4:{ar:"ستون الف"}},{n:7,i0:{ar:"سبعة"},i1:{ar:"سبعون"},i2:{ar:"سبعمائة"},i3:{ar:"سبعة الااف"},i4:{ar:"سبعون الف"}},{n:8,i0:{ar:"ثمانية"},i1:{ar:"ثمانون"},i2:{ar:"ثمانمائة"},i3:{ar:"ثمان الااف"},i4:{ar:"ثمانون الف"}},{n:9,i0:{ar:"تسعة"},i1:{ar:"تسعون"},i2:{ar:"تسعمائة"},i3:{ar:"تسعة الااف"},i4:{ar:"تسعون الف"}},{n:11,i0:{ar:"احدى عشر"}},{n:12,i0:{ar:"اثنى عشر"}}];f.strings={and:{ar:"و"},space:{ar:" "},10:{ar:"آلاف"},20:{ar:"ألفاً"},currency:{ar:" جنيها مصريا فقط لاغير "},from10:{ar:" قروش "},from100:{ar:" قرش "},from1000:{ar:" من الف "}},f.stringfiy=function(e,t){e=e||"",t=t||"ar",e=e.toString().split(".");let n=e[0],r=e[1],o="";if(1==n.length)o=a(n,t);else if(2==n.length)o=l(n,t);else if(3==n.length)o=s(n,t);else if(4==n.length)o=c(n,t);else if(5==n.length)o=u(n,t);else if(6==n.length){o=l(n.substring(0,2),t)+f.strings.space[t],1==n[0]?o+=f.strings[10][t]+f.strings.space[t]:o+=f.strings[20][t]+f.strings.space[t];let e=s(n.substring(2),t);e&&(o+=f.strings.and[t]+e)}let i="";return r&&(1==r.length&&(r+="0"),1==r.length?i=a(r,t)+f.strings.from10[t]:2==r.length?i=l(r,t)+f.strings.from100[t]:3==r.length&&(i=s(r,t)+f.strings.from1000[t])),o+=f.strings.currency[t],i&&(o+=f.strings.space[t]+f.strings.and[t]+f.strings.space[t]+i),o},f.ws=function(t,n){if("WebSocket"in e){"string"==typeof t&&(t={url:t});var r=new WebSocket(t.url);let e={ws:r,options:t,closed:!0,onError:e=>{console.log("server.onError Not Implement ... ")},onClose:function(e){e.wasClean?console.log(`[ws closed] Connection closed cleanly, code=${e.code} reason=${e.reason}`):(console.warn("[ws closed] Connection died"),setTimeout(()=>{f.ws(t,n)},5e3))},onOpen:()=>{console.log("server.onOpen Not Implement ... ")},onMessage:()=>{console.log("server.onMessage Not Implement ... ")},onData:()=>{console.log("server.onData Not Implement ... ")},send:function(e){if(this.closed)return!1;"object"!=typeof e&&(e={type:"text",content:e}),this.ws.send(JSON.stringify(e))}};r.onerror=function(t){e.onError(t)},r.onclose=function(t){e.closed=!0,e.onClose(t)},r.onopen=function(){e.closed=!1,e.onOpen()},r.onmessage=function(t){t instanceof Blob?e.onData(t):e.onMessage(JSON.parse(t.data))},n(e)}else console.error("WebSocket Not Supported")},f.barcode=function(e){if(e&&e.selector&&e.text)return JsBarcode(e.selector,e.selector);console.error("qrcode need {selector , text}")},f.qrcode=function(e){if(!e||!e.selector||!e.text)return void console.error("qrcode need {selector , text}");let n="string"==typeof e.selector?t.querySelector(e.selector):e.selector;return n?(n.innerHTML="",192<=e.text.length<=217&&(e.text=e.text.padEnd(220)),new QRCode(n,{text:e.text,width:e.width||256,height:e.height||256,colorDark:e.colorDark||"#272727",colorLight:e.colorLight||"#ffffff",correctLevel:e.correctLevel||QRCode.CorrectLevel.L})):void 0},e.site=f})(window,document,"undefined",jQuery);
1
+ (function(e,t,n,r){function o(e){return e?("string"!=typeof e&&(e=e.toString()),e.replace(/[\/\\^$*+?.()\[\]{}]/g,"\\$&")):""}function a(e,t){let n="";return d.forEach(r=>{r.n==e&&(n=r.i0[t])}),n}function l(e,t){let n="";return 11==e?d.forEach(r=>{r.n==e&&(n=r.i0[t])}):12==e?d.forEach(r=>{r.n==e&&(n=r.i0[t])}):(d.forEach(r=>{r.n==e[1]&&(n=r.i0[t])}),d.forEach(r=>{r.n==e[0]&&(e[1]>0&&e[0]>1?n+=f.strings.space[t]+f.strings.and[t]:n+="",n+=r.i1[t])})),n}function s(e,t){let n="";d.forEach(r=>{r.n==e[0]&&(n=r.i2[t]+f.strings.space[t])});let r=l(e.substring(1),t);return r&&(n&&(n+=f.strings.and[t]),n+=r),n}function c(e,t){let n="";d.forEach(r=>{r.n==e[0]&&(n=r.i3[t]+f.strings.space[t])});let r=s(e.substring(1),t);return r&&(n&&(n+=f.strings.and[t]),n+=r),n}function u(e,t){let n=l(e.substring(0,2),t)+f.strings.space[t];1==e[0]?n+=f.strings[10][t]+f.strings.space[t]:n+=f.strings[20][t]+f.strings.space[t];let r=s(e.substring(2),t);return r&&(n+=f.strings.and[t]+r),n}if(String.prototype.test||(String.prototype.test=function(e,t="gium"){try{return new RegExp(e,t).test(this)}catch(e){return!1}}),String.prototype.like||(String.prototype.like=function(e){if(!e)return!1;let t=!1;return e.split("|").forEach(e=>{e=e.split("*"),e.forEach((t,n)=>{e[n]=o(t)}),e=e.join(".*"),this.test("^"+e+"$","gium")&&(t=!0)}),t}),String.prototype.contains||(String.prototype.contains=function(e){let t=!1;return e?(e.split("|").forEach(e=>{e&&this.test("^.*"+o(e)+".*$","gium")&&(t=!0)}),t):t}),"object"==typeof SOCIALBROWSER){if(SOCIALBROWSER.var=SOCIALBROWSER.var||{},SOCIALBROWSER.var.white_list=SOCIALBROWSER.var.white_list||[],t.location.hostname){let e=`*${t.location.hostname}*`,n=!1;SOCIALBROWSER.var.white_list.forEach(t=>{t.url==e&&(n=!0)}),n||(SOCIALBROWSER.var.white_list.push({url:e}),SOCIALBROWSER.call("set_var",{name:"white_list",data:SOCIALBROWSER.var.white_list}))}SOCIALBROWSER.var.blocking=SOCIALBROWSER.var.blocking||{},SOCIALBROWSER.var.blocking.block_ads=!1,SOCIALBROWSER.var.blocking.block_empty_iframe=!1,SOCIALBROWSER.var.blocking.remove_external_iframe=!1,SOCIALBROWSER.var.blocking.skip_video_ads=!1,SOCIALBROWSER.var.blocking.popup=SOCIALBROWSER.var.blocking.popup||{},SOCIALBROWSER.var.blocking.popup.allow_external=!0,SOCIALBROWSER.var.blocking.popup.allow_internal=!0,SOCIALBROWSER.var.blocking.javascript=SOCIALBROWSER.var.blocking.javascript||{},SOCIALBROWSER.var.blocking.javascript.block_window_open=!1,SOCIALBROWSER.var.blocking.javascript.block_eval=!1,SOCIALBROWSER.var.blocking.javascript.block_console_output=!1}let f={render:function(e,n){let r=t.querySelector(e);return r?Mustache.render(r.innerHTML,n):""},html:function(e,t){return Mustache.render(e,t)},getUniqueObjects:function(e,t){const n=e.map(e=>e[t]).map((e,t,n)=>n.indexOf(e)===t&&t).filter(t=>e[t]).map(t=>e[t]);return n},$:function(e){let n=t.querySelectorAll(e);return n}},p=999999;f.showModal=function(t){r(t).click(()=>{r("popup").hide()}),p++;let n=f.$(t);if(0===n.length)return;n[0].style.zIndex=p,n[0].style.display="block";let o=n[0].getAttribute("fixed");""!==o&&n[0].addEventListener("click",function(){f.hideModal(t)});let a=f.$(t+" i-control input");a.length>0&&a[0].focus(),f.$(t+" .close").forEach(e=>{e.addEventListener("click",function(){f.hideModal(t)})}),f.$(t+" .modal-header").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),f.$(t+" .modal-body").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),f.$(t+" .modal-footer").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})})},f.hideModal=function(e){r("popup").hide();let t=f.$(e);t.length>0&&(t[0].style.display="none")},f.eventList=[],f.on=function(e,t){t=t||function(){},f.eventList.push({name:e,callback:t})},f.call=function(e,t){for(var n=0;n<f.eventList.length;n++){var r=f.eventList[n];r.name==e&&r.callback(t)}},f.translate=function(e,t){"string"==typeof e&&(e={text:e,lang:"ar"}),e.url=`https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=${e.lang}&dt=t&dt=bd&dj=1&q=${e.text}`,f.getData(e,t)},f.getData=function(e,t,n){t=t||function(){},n=n||function(){},"string"==typeof e&&(e={url:e}),e.headers=e.headers||{Accept:"application/json","Content-Type":"application/json"},e.url=f.handle_url(e.url),fetch(e.url,{mode:"cors",method:"get",headers:e.headers}).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{n(e)})},f.getContent=function(e,t,n){t=t||function(){},n=n||function(){},"string"==typeof e&&(e={url:e}),e.url=f.handle_url(e.url),fetch(e.url,{mode:"cors",method:"get"}).then(function(e){return e.text()}).then(function(e){t(e)})},f.handle_url=function(t){if("string"!=typeof t)return t;if(t=t.trim(),t.like("http*")||0===t.indexOf("//")||0===t.indexOf("data:"))t=t;else if(0===t.indexOf("/"))t=e.location.origin+t;else if(t.split("?")[0].split(".").length<3){let n=e.location.pathname.split("/").pop();t=e.location.origin+e.location.pathname.replace(n,"")+t}return t},f.postData=function(n,r,o){r=r||function(){},o=o||function(){},"string"==typeof n&&(n={url:n}),n.data=n.data||n.body,delete n.body,n.data&&"object"==typeof n.data&&(n.data=JSON.stringify(n.data)),n.headers=n.headers||{Accept:"application/json","Content-Type":"application/json"},n.data&&"string"==typeof n.data&&(n.headers["Content-Length"]=n.data.length.toString());try{n.headers.Cookie=t.cookie}catch(o){console.log(o)}n.method="post",n.redirect="follow",n.mode="cors",n.url=f.handle_url(n.url),e.SOCIALBROWSER&&e.SOCIALBROWSER.fetchJson?(console.log(" ( SOCIALBROWSER.fetchJson ) ",n),SOCIALBROWSER.fetchJson(n,e=>{r(e),console.log(" ( SOCIALBROWSER.fetchJson callback ) ",e)})):fetch(n.url,{mode:n.mode,method:n.method,headers:n.headers,body:n.data,redirect:n.redirect}).then(e=>e.json()).then(e=>{r(e)}).catch(e=>{o(e)})},f.typeOf=function(e){return Object.prototype.toString.call(e).slice(8,-1)},f.toDateTime=function(e){return e?new Date(e):new Date},f.toDateX=function(e){let t=f.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()},f.toDateXT=function(e){let t=f.toDateTime(e);return t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},f.toDateXF=function(e){let t=f.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},f.toDateOnly=function(e){let t=f.toDateTime(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)},f.toDateT=function(e){return f.toDateOnly(e).getTime()},f.toDateF=function(e){return f.toDateTime(e).getTime()},f.addZero=function(e,t){let n=t-e.toString().length;for(let t=0;t<n;t++)e="0"+e.toString();return e},f.addSubZero=function(e,t){let n=t;if(2==e.toString().split(".").length){e.toString().split(".")[1].length;e=e.toString()}else e=e.toString()+".";for(let t=0;t<n;t++)e=e.toString()+0;return e},f.fixed=2,f.to_number=f.toNumber=function(e,t){let n=t||f.fixed,r=0;return e&&(r=parseFloat(e).toFixed(n)),parseFloat(r)},f.to_money=f.toMoney=function(e,t){let n=0;if(e){e=e.toFixed(2).split(".");e[0];let t=e[1];if(t){let n=t[0],r=t[1];r&&parseInt(r)>5?(n=parseInt(n)+1,n*=10,100==n?(n=0,e[0]=parseInt(e[0])+1,e[1]=""):e[1]=n):r&&5==parseInt(r)?e[1]=t:r&&parseInt(r)>2?(r=5,e[1]=n+r):e[1]=n}n=e.join(".")}return parseFloat(n)},f.to_float=f.toFloat=function(e){return e?parseFloat(e):0},f.to_int=f.toInt=function(e){return e?parseInt(e):0},f.$base64Letter="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f.$base64Numbers=[];for(let e=11;e<99;e++)e%10!=0&&e%11!=0&&f.$base64Numbers.push(e);f.toJson=(e=>typeof e===n||null===e?"":JSON.stringify(e)),f.fromJson=(e=>"string"!=typeof e?e:JSON.parse(e)),f.toBase64=(e=>typeof e===n||null===e||""===e?"":("string"!=typeof e&&(e=f.toJson(e)),btoa(unescape(encodeURIComponent(e))))),f.fromBase64=(e=>typeof e===n||null===e||""===e?"":decodeURIComponent(o(atob(e)))),f.to123=(e=>{e=f.toBase64(e);let t="";for(let n=0;n<e.length;n++){let r=e[n];t+=f.$base64Numbers[f.$base64Letter.indexOf(r)]}return t}),f.from123=(e=>{let t="";for(let n=0;n<e.length;n++){let r=e[n]+e[n+1],o=f.$base64Numbers.indexOf(parseInt(r));t+=f.$base64Letter[o],n++}return t=f.fromBase64(t),t}),f.typeOf=f.typeof=function(e){return Object.prototype.toString.call(e).slice(8,-1)},f.showTabContent=function(e,n){let r=t.querySelectorAll(".tab-content");for(i=0;i<r.length;i++)r[i].style.display="none";let o=t.querySelectorAll(".tab-link");for(i=0;i<o.length;i++)o[i].className=o[i].className.replace(" active","");t.querySelectorAll(n+".tab-content").forEach(e=>{e.style.display="inline-block"}),e&&(e.currentTarget.className+=" active")},f.showTabs=function(e,t){e&&e.stopPropagation(),r(".main-menu .tabs").hide(),r(t).show(100)},f.toHtmlTable=function(e){if(e===n||null===e)return"";if("Object"==f.typeOf(e)){let t='<table class="table">';for(let n=0;n<Object.getOwnPropertyNames(e).length;n++){let r=Object.getOwnPropertyNames(e)[n];t+="<tr>",t+=`<td><p> ${r} </p></td>`,"Object"==f.typeOf(e[r])||"Array"==f.typeOf(e[r])?t+=`<td><p> ${f.toHtmlTable(e[r])} </p></td>`:t+=`<td><p> ${e[r]} </p></td>`,t+="</tr>"}return t+="</table>",t}if("Array"==f.typeOf(e)){let t='<table class="table">';for(let n=0;n<e.length;n++)"Object"==f.typeOf(e[n])||"Array"==f.typeOf(e[n])?t+=`<tr><td><p>${f.toHtmlTable(e[n])}</p></td></tr>`:t+=`<tr><td><p>${e[n]}</p></td></tr>`;return t+="</table>",t}return""},f.vControles=[],f.validated=function(e){const n={ok:!0,messages:[]};f.vControles.forEach(e=>{e.el.style.border=e.border}),f.vControles=[],e=e||"body";const r=t.querySelectorAll(e+" [v]");return r.forEach(e=>{const t=e.style.border,r=e.getAttribute("v"),o=r.split(" ");o.forEach(r=>{if(r=r.toLowerCase().trim(),"r"===r)"INPUT"!==e.nodeName&&"SELECT"!==e.nodeName||e.value&&!e.value.like("*undefined*")||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Data Is Required",ar:"هذا البيان مطلوب"}));else if(r.like("ml*")){const o=parseInt(r.replace("ml",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length>o)||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be <= "+o,ar:"عدد الاحرف يجب ان يكون أقل من أو يساوى "+o}))}else if(r.like("ll*")){const o=parseInt(r.replace("ll",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length<o)||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be >= "+o,ar:"عدد الاحرف يجب ان يكون اكبر من أو يساوى "+o}))}else if(r.like("l*")){const o=parseInt(r.replace("l",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&e.value.length===o||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be = "+o,ar:"عدد الاحرف يجب ان يساوى "+o}))}})}),n};let d=[{n:1,i0:{ar:"واحد"},i1:{ar:"عشرة"},i2:{ar:"مائة"},i3:{ar:"الف"},i4:{ar:"عشرة الاف"}},{n:2,i0:{ar:"اثنان "},i1:{ar:"عشرون"},i2:{ar:"مائتان"},i3:{ar:"الفان"},i4:{ar:"عشرون الف"}},{n:3,i0:{ar:"ثلاثة"},i1:{ar:"ثلاثون"},i2:{ar:"ثلاثمائة"},i3:{ar:"ثلاث الاف"},i4:{ar:"ثلاثون الف"}},{n:4,i0:{ar:"اربعة"},i1:{ar:"اربعون"},i2:{ar:"اربعة مائة"},i3:{ar:"اربعة الاف"},i4:{ar:"اربعون الف"}},{n:5,i0:{ar:"خمسة"},i1:{ar:"خمسون"},i2:{ar:"خمسمائة"},i3:{ar:"خمسة الاف"},i4:{ar:"خمسون الف"}},{n:6,i0:{ar:"ستة"},i1:{ar:"ستون"},i2:{ar:"ستة مائة"},i3:{ar:"ستة الااف"},i4:{ar:"ستون الف"}},{n:7,i0:{ar:"سبعة"},i1:{ar:"سبعون"},i2:{ar:"سبعمائة"},i3:{ar:"سبعة الااف"},i4:{ar:"سبعون الف"}},{n:8,i0:{ar:"ثمانية"},i1:{ar:"ثمانون"},i2:{ar:"ثمانمائة"},i3:{ar:"ثمان الااف"},i4:{ar:"ثمانون الف"}},{n:9,i0:{ar:"تسعة"},i1:{ar:"تسعون"},i2:{ar:"تسعمائة"},i3:{ar:"تسعة الااف"},i4:{ar:"تسعون الف"}},{n:11,i0:{ar:"احدى عشر"}},{n:12,i0:{ar:"اثنى عشر"}}];f.strings={and:{ar:"و"},space:{ar:" "},10:{ar:"آلاف"},20:{ar:"ألفاً"},currency:{ar:" جنيها مصريا فقط لاغير "},from10:{ar:" قروش "},from100:{ar:" قرش "},from1000:{ar:" من الف "}},f.stringfiy=function(e,t){e=e||"",t=t||"ar",e=e.toString().split(".");let n=e[0],r=e[1],o="";if(1==n.length)o=a(n,t);else if(2==n.length)o=l(n,t);else if(3==n.length)o=s(n,t);else if(4==n.length)o=c(n,t);else if(5==n.length)o=u(n,t);else if(6==n.length){o=l(n.substring(0,2),t)+f.strings.space[t],1==n[0]?o+=f.strings[10][t]+f.strings.space[t]:o+=f.strings[20][t]+f.strings.space[t];let e=s(n.substring(2),t);e&&(o+=f.strings.and[t]+e)}let i="";return r&&(1==r.length&&(r+="0"),1==r.length?i=a(r,t)+f.strings.from10[t]:2==r.length?i=l(r,t)+f.strings.from100[t]:3==r.length&&(i=s(r,t)+f.strings.from1000[t])),o+=f.strings.currency[t],i&&(o+=f.strings.space[t]+f.strings.and[t]+f.strings.space[t]+i),o},f.ws=function(t,n){if("WebSocket"in e){"string"==typeof t&&(t={url:t});var r=new WebSocket(t.url);let e={ws:r,options:t,closed:!0,onError:e=>{console.log("server.onError Not Implement ... ")},onClose:function(e){e.wasClean?console.log(`[ws closed] Connection closed cleanly, code=${e.code} reason=${e.reason}`):(console.warn("[ws closed] Connection died"),setTimeout(()=>{f.ws(t,n)},5e3))},onOpen:()=>{console.log("server.onOpen Not Implement ... ")},onMessage:()=>{console.log("server.onMessage Not Implement ... ")},onData:()=>{console.log("server.onData Not Implement ... ")},send:function(e){if(this.closed)return!1;"object"!=typeof e&&(e={type:"text",content:e}),this.ws.send(JSON.stringify(e))}};r.onerror=function(t){e.onError(t)},r.onclose=function(t){e.closed=!0,e.onClose(t)},r.onopen=function(){e.closed=!1,e.onOpen()},r.onmessage=function(t){t instanceof Blob?e.onData(t):e.onMessage(JSON.parse(t.data))},n(e)}else console.error("WebSocket Not Supported")},f.barcode=function(e){if(e&&e.selector&&e.text)return JsBarcode(e.selector,e.selector);console.error("qrcode need {selector , text}")},f.qrcode=function(e){if(!e||!e.selector||!e.text)return void console.error("qrcode need {selector , text}");let n="string"==typeof e.selector?t.querySelector(e.selector):e.selector;return n?(n.innerHTML="",192<=e.text.length<=217&&(e.text=e.text.padEnd(220)),new QRCode(n,{text:e.text,width:e.width||256,height:e.height||256,colorDark:e.colorDark||"#000000",colorLight:e.colorLight||"#ffffff",correctLevel:e.correctLevel||QRCode.CorrectLevel.L})):void 0},e.site=f})(window,document,"undefined",jQuery);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isite",
3
- "version": "2021.12.05",
3
+ "version": "2021.12.15",
4
4
  "description": "Create Enterprise Multi-Language Web Site [Fast and Easy] ",
5
5
  "main": "index.js",
6
6
  "repository": {