@openziti/ziti-console-lib 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (705) hide show
  1. package/README.md +24 -0
  2. package/assets/animations/ConstructionZiggy.json +15233 -0
  3. package/assets/animations/HelloZiggy.json +10008 -0
  4. package/assets/animations/SmartZiggy.json +9488 -0
  5. package/assets/components/add.html +1 -0
  6. package/assets/components/api.html +12 -0
  7. package/assets/components/customtags.html +4 -0
  8. package/assets/components/line.html +1 -0
  9. package/assets/components/noitems.html +1 -0
  10. package/assets/components/save.html +4 -0
  11. package/assets/components/search.html +8 -0
  12. package/assets/components/tabIdentities.html +6 -0
  13. package/assets/components/tabPolicies.html +7 -0
  14. package/assets/components/tabRouters.html +5 -0
  15. package/assets/components/tabServers.html +4 -0
  16. package/assets/components/tabServices.html +5 -0
  17. package/assets/components/tabSessions.html +4 -0
  18. package/assets/data/mail.json +0 -0
  19. package/assets/data/services.json +6 -0
  20. package/assets/data/settings.json +25 -0
  21. package/assets/data/site.json +31 -0
  22. package/assets/data/tags.json +7 -0
  23. package/assets/data/templates.json +1 -0
  24. package/assets/fonts/OpenSans-Regular.ttf +0 -0
  25. package/assets/fonts/OpenSans-Regular.woff +0 -0
  26. package/assets/fonts/OpenSans-Regular.woff2 +0 -0
  27. package/assets/fonts/RussoOne-Regular.ttf +0 -0
  28. package/assets/fonts/RussoOne-Regular.woff +0 -0
  29. package/assets/fonts/RussoOne-Regular.woff2 +0 -0
  30. package/assets/fonts/zac.eot +0 -0
  31. package/assets/fonts/zac.svg +55 -0
  32. package/assets/fonts/zac.ttf +0 -0
  33. package/assets/fonts/zac.woff +0 -0
  34. package/assets/fonts/zac.woff2 +0 -0
  35. package/assets/html/api-sessions.htm +153 -0
  36. package/assets/html/attributes.htm +260 -0
  37. package/assets/html/auth-policies.htm +410 -0
  38. package/assets/html/cas.htm +445 -0
  39. package/assets/html/config-types.htm +168 -0
  40. package/assets/html/configs.htm +238 -0
  41. package/assets/html/deprecated/fabric-links.htm +336 -0
  42. package/assets/html/deprecated/fabric-routers.htm +72 -0
  43. package/assets/html/deprecated/fabric-services.htm +494 -0
  44. package/assets/html/identities.htm +934 -0
  45. package/assets/html/index.htm +161 -0
  46. package/assets/html/jwt-signers.htm +260 -0
  47. package/assets/html/known.htm +115 -0
  48. package/assets/html/login.htm +131 -0
  49. package/assets/html/organization.htm +223 -0
  50. package/assets/html/posture-checks.htm +393 -0
  51. package/assets/html/profile.htm +52 -0
  52. package/assets/html/recipes.htm +455 -0
  53. package/assets/html/router-policies.htm +168 -0
  54. package/assets/html/routers.htm +323 -0
  55. package/assets/html/servers.htm +236 -0
  56. package/assets/html/service-policies.htm +197 -0
  57. package/assets/html/service-router-policies.htm +170 -0
  58. package/assets/html/services.htm +634 -0
  59. package/assets/html/sessions.htm +157 -0
  60. package/assets/html/settings.htm +146 -0
  61. package/assets/html/terminators.htm +244 -0
  62. package/assets/html/transit-routers.htm +173 -0
  63. package/assets/icons/android-icon-192x192.png +0 -0
  64. package/assets/icons/apple-icon-114x114.png +0 -0
  65. package/assets/icons/apple-icon-120x120.png +0 -0
  66. package/assets/icons/apple-icon-144x144.png +0 -0
  67. package/assets/icons/apple-icon-152x152.png +0 -0
  68. package/assets/icons/apple-icon-180x180.png +0 -0
  69. package/assets/icons/apple-icon-57x57.png +0 -0
  70. package/assets/icons/apple-icon-60x60.png +0 -0
  71. package/assets/icons/apple-icon-72x72.png +0 -0
  72. package/assets/icons/apple-icon-76x76.png +0 -0
  73. package/assets/icons/apple-icon-precomposed.png +0 -0
  74. package/assets/icons/favicon-16x16.png +0 -0
  75. package/assets/icons/favicon-32x32.png +0 -0
  76. package/assets/icons/favicon-96x96.png +0 -0
  77. package/assets/icons/favicon.ico +0 -0
  78. package/assets/icons/ms-icon-144x144.png +0 -0
  79. package/assets/images/Filter.png +0 -0
  80. package/assets/images/Login.jpg +0 -0
  81. package/assets/images/SortDown.png +0 -0
  82. package/assets/images/SortUp.png +0 -0
  83. package/assets/images/android.png +0 -0
  84. package/assets/images/anywhere.png +0 -0
  85. package/assets/images/apple.png +0 -0
  86. package/assets/images/bug.png +0 -0
  87. package/assets/images/check.png +0 -0
  88. package/assets/images/error.png +0 -0
  89. package/assets/images/info.png +0 -0
  90. package/assets/images/linux.png +0 -0
  91. package/assets/images/other.png +0 -0
  92. package/assets/images/scrollbar.png +0 -0
  93. package/assets/images/select.png +0 -0
  94. package/assets/images/success.png +0 -0
  95. package/assets/images/visualizer/ER.png +0 -0
  96. package/assets/images/visualizer/Routers.png +0 -0
  97. package/assets/images/visualizer/er_error.png +0 -0
  98. package/assets/images/visualizer/error_er.png +0 -0
  99. package/assets/images/visualizer/host-error.png +0 -0
  100. package/assets/images/visualizer/host.png +0 -0
  101. package/assets/images/visualizer/host_unregistered.png +0 -0
  102. package/assets/images/visualizer/link-cut.png +0 -0
  103. package/assets/images/visualizer/service.png +0 -0
  104. package/assets/images/visualizer/unregistered.png +0 -0
  105. package/assets/images/warning.png +0 -0
  106. package/assets/images/windows.png +0 -0
  107. package/assets/languages/en-us.json +330 -0
  108. package/assets/resources/avatar/man.svg +78 -0
  109. package/assets/resources/avatar/woman.svg +96 -0
  110. package/assets/resources/icon/analysis.svg +104 -0
  111. package/assets/resources/icon/appwans.svg +20 -0
  112. package/assets/resources/icon/architecture.svg +1 -0
  113. package/assets/resources/icon/bike.svg +94 -0
  114. package/assets/resources/icon/bus.svg +64 -0
  115. package/assets/resources/icon/cas.svg +46 -0
  116. package/assets/resources/icon/clusters.svg +28 -0
  117. package/assets/resources/icon/computer.svg +1 -0
  118. package/assets/resources/icon/data.svg +1 -0
  119. package/assets/resources/icon/delivery-truck.svg +1 -0
  120. package/assets/resources/icon/explosion.svg +81 -0
  121. package/assets/resources/icon/fabricServices.svg +31 -0
  122. package/assets/resources/icon/fabrics.svg +136 -0
  123. package/assets/resources/icon/front.svg +83 -0
  124. package/assets/resources/icon/gateway.svg +49 -0
  125. package/assets/resources/icon/gear.svg +122 -0
  126. package/assets/resources/icon/house.svg +72 -0
  127. package/assets/resources/icon/language.svg +1 -0
  128. package/assets/resources/icon/objective.svg +55 -0
  129. package/assets/resources/icon/route.svg +97 -0
  130. package/assets/resources/icon/routers.svg +27 -0
  131. package/assets/resources/icon/startup.svg +112 -0
  132. package/assets/resources/icon/switch.svg +101 -0
  133. package/assets/scripts/chart.min.js +7 -0
  134. package/assets/scripts/commands.js +112 -0
  135. package/assets/scripts/components/codemirror/codemirror.css +356 -0
  136. package/assets/scripts/components/codemirror/codemirror.js +9741 -0
  137. package/assets/scripts/components/codemirror/modes/addons/closetags.js +200 -0
  138. package/assets/scripts/components/codemirror/modes/addons/colorize.js +40 -0
  139. package/assets/scripts/components/codemirror/modes/addons/css-hint.js +66 -0
  140. package/assets/scripts/components/codemirror/modes/addons/formatting.js +124 -0
  141. package/assets/scripts/components/codemirror/modes/addons/html-hint.js +366 -0
  142. package/assets/scripts/components/codemirror/modes/addons/javascript-hint.js +159 -0
  143. package/assets/scripts/components/codemirror/modes/addons/show-hint.css +36 -0
  144. package/assets/scripts/components/codemirror/modes/addons/show-hint.js +482 -0
  145. package/assets/scripts/components/codemirror/modes/css.js +831 -0
  146. package/assets/scripts/components/codemirror/modes/htmlmixed.js +152 -0
  147. package/assets/scripts/components/codemirror/modes/javascript.js +930 -0
  148. package/assets/scripts/components/codemirror/modes/xml.js +413 -0
  149. package/assets/scripts/components/column.css +184 -0
  150. package/assets/scripts/components/column.js +165 -0
  151. package/assets/scripts/components/flows.css +0 -0
  152. package/assets/scripts/components/flows.js +48 -0
  153. package/assets/scripts/components/leaflet/images/layers-2x.png +0 -0
  154. package/assets/scripts/components/leaflet/images/layers.png +0 -0
  155. package/assets/scripts/components/leaflet/images/marker-icon-2x.png +0 -0
  156. package/assets/scripts/components/leaflet/images/marker-icon.png +0 -0
  157. package/assets/scripts/components/leaflet/images/marker-shadow.png +0 -0
  158. package/assets/scripts/components/leaflet/leaflet-src.esm.js +13926 -0
  159. package/assets/scripts/components/leaflet/leaflet-src.esm.js.map +1 -0
  160. package/assets/scripts/components/leaflet/leaflet-src.js +14020 -0
  161. package/assets/scripts/components/leaflet/leaflet-src.js.map +1 -0
  162. package/assets/scripts/components/leaflet/leaflet.css +640 -0
  163. package/assets/scripts/components/leaflet/leaflet.js +5 -0
  164. package/assets/scripts/components/leaflet/leaflet.js.map +1 -0
  165. package/assets/scripts/components/moment.js +4602 -0
  166. package/assets/scripts/components/multiselect.js +333 -0
  167. package/assets/scripts/components/network/img/network/acceptDeleteIcon.png +0 -0
  168. package/assets/scripts/components/network/img/network/addNodeIcon.png +0 -0
  169. package/assets/scripts/components/network/img/network/backIcon.png +0 -0
  170. package/assets/scripts/components/network/img/network/connectIcon.png +0 -0
  171. package/assets/scripts/components/network/img/network/cross.png +0 -0
  172. package/assets/scripts/components/network/img/network/cross2.png +0 -0
  173. package/assets/scripts/components/network/img/network/deleteIcon.png +0 -0
  174. package/assets/scripts/components/network/img/network/downArrow.png +0 -0
  175. package/assets/scripts/components/network/img/network/editIcon.png +0 -0
  176. package/assets/scripts/components/network/img/network/leftArrow.png +0 -0
  177. package/assets/scripts/components/network/img/network/minus.png +0 -0
  178. package/assets/scripts/components/network/img/network/plus.png +0 -0
  179. package/assets/scripts/components/network/img/network/rightArrow.png +0 -0
  180. package/assets/scripts/components/network/img/network/upArrow.png +0 -0
  181. package/assets/scripts/components/network/img/network/zoomExtends.png +0 -0
  182. package/assets/scripts/components/network/types/DOMutil.d.ts +99 -0
  183. package/assets/scripts/components/network/types/index-legacy-bundle.d.ts +4 -0
  184. package/assets/scripts/components/network/types/index-legacy-bundle.d.ts.map +1 -0
  185. package/assets/scripts/components/network/types/index-legacy.d.ts +24 -0
  186. package/assets/scripts/components/network/types/index-legacy.d.ts.map +1 -0
  187. package/assets/scripts/components/network/types/index-peer.d.ts +11 -0
  188. package/assets/scripts/components/network/types/index-peer.d.ts.map +1 -0
  189. package/assets/scripts/components/network/types/index-standalone.d.ts +7 -0
  190. package/assets/scripts/components/network/types/index-standalone.d.ts.map +1 -0
  191. package/assets/scripts/components/network/types/module/hammer.d.ts +2 -0
  192. package/assets/scripts/components/network/types/module/moment.d.ts +2 -0
  193. package/assets/scripts/components/network/types/network/Images.d.ts +2 -0
  194. package/assets/scripts/components/network/types/network/Network.d.ts +1030 -0
  195. package/assets/scripts/components/network/types/network/dotparser.d.ts +2 -0
  196. package/assets/scripts/components/network/types/network/gephiParser.d.ts +80 -0
  197. package/assets/scripts/components/network/types/network/gephiParser.d.ts.map +1 -0
  198. package/assets/scripts/components/network/types/network/modules/components/edges/bezier-edge-dynamic.d.ts +55 -0
  199. package/assets/scripts/components/network/types/network/modules/components/edges/bezier-edge-dynamic.d.ts.map +1 -0
  200. package/assets/scripts/components/network/types/network/modules/components/edges/bezier-edge-static.d.ts +37 -0
  201. package/assets/scripts/components/network/types/network/modules/components/edges/bezier-edge-static.d.ts.map +1 -0
  202. package/assets/scripts/components/network/types/network/modules/components/edges/cubic-bezier-edge.d.ts +32 -0
  203. package/assets/scripts/components/network/types/network/modules/components/edges/cubic-bezier-edge.d.ts.map +1 -0
  204. package/assets/scripts/components/network/types/network/modules/components/edges/index.d.ts +10 -0
  205. package/assets/scripts/components/network/types/network/modules/components/edges/index.d.ts.map +1 -0
  206. package/assets/scripts/components/network/types/network/modules/components/edges/straight-edge.d.ts +26 -0
  207. package/assets/scripts/components/network/types/network/modules/components/edges/straight-edge.d.ts.map +1 -0
  208. package/assets/scripts/components/network/types/network/modules/components/edges/util/bezier-edge-base.d.ts +68 -0
  209. package/assets/scripts/components/network/types/network/modules/components/edges/util/bezier-edge-base.d.ts.map +1 -0
  210. package/assets/scripts/components/network/types/network/modules/components/edges/util/cubic-bezier-edge-base.d.ts +38 -0
  211. package/assets/scripts/components/network/types/network/modules/components/edges/util/cubic-bezier-edge-base.d.ts.map +1 -0
  212. package/assets/scripts/components/network/types/network/modules/components/edges/util/edge-base.d.ts +248 -0
  213. package/assets/scripts/components/network/types/network/modules/components/edges/util/edge-base.d.ts.map +1 -0
  214. package/assets/scripts/components/network/types/network/modules/components/edges/util/end-points.d.ts +58 -0
  215. package/assets/scripts/components/network/types/network/modules/components/edges/util/end-points.d.ts.map +1 -0
  216. package/assets/scripts/components/network/types/network/modules/components/edges/util/types.d.ts +196 -0
  217. package/assets/scripts/components/network/types/network/modules/components/edges/util/types.d.ts.map +1 -0
  218. package/assets/scripts/components/network/types/network/modules/layout-engine/index.d.ts +32 -0
  219. package/assets/scripts/components/network/types/network/modules/layout-engine/index.d.ts.map +1 -0
  220. package/assets/scripts/components/network/types/network/options.d.ts +2 -0
  221. package/assets/scripts/components/network/types/network/shapes.d.ts +122 -0
  222. package/assets/scripts/components/network/types/network/shapes.d.ts.map +1 -0
  223. package/assets/scripts/components/network/vis-network.css +716 -0
  224. package/assets/scripts/components/network/vis-network.esm.js +58974 -0
  225. package/assets/scripts/components/network/vis-network.esm.js.map +1 -0
  226. package/assets/scripts/components/network/vis-network.esm.min.js +53 -0
  227. package/assets/scripts/components/network/vis-network.esm.min.js.map +1 -0
  228. package/assets/scripts/components/network/vis-network.js +58994 -0
  229. package/assets/scripts/components/network/vis-network.js.map +1 -0
  230. package/assets/scripts/components/network/vis-network.min.css +1 -0
  231. package/assets/scripts/components/network/vis-network.min.js +53 -0
  232. package/assets/scripts/components/network/vis-network.min.js.map +1 -0
  233. package/assets/scripts/components/qrcode.min.js +1 -0
  234. package/assets/scripts/components/resources.js +26 -0
  235. package/assets/scripts/components/selector-new.js +300 -0
  236. package/assets/scripts/components/selector.js +300 -0
  237. package/assets/scripts/components/spectrum.js +2323 -0
  238. package/assets/scripts/components/timezone.js +1545 -0
  239. package/assets/scripts/components/uploader.js +74 -0
  240. package/assets/scripts/context.js +177 -0
  241. package/assets/scripts/dragging.js +58 -0
  242. package/assets/scripts/forms/forms.js +74 -0
  243. package/assets/scripts/forms/host.v1.htm +43 -0
  244. package/assets/scripts/forms/intercept.v1.htm +0 -0
  245. package/assets/scripts/forms/schema.js +693 -0
  246. package/assets/scripts/growler.js +133 -0
  247. package/assets/scripts/header.js +163 -0
  248. package/assets/scripts/jquery-3.6.3.min.js +2 -0
  249. package/assets/scripts/jquery.datetimepicker.js +2930 -0
  250. package/assets/scripts/locale.js +47 -0
  251. package/assets/scripts/modal.js +65 -0
  252. package/assets/scripts/model/data.js +558 -0
  253. package/assets/scripts/model/fabric.js +55 -0
  254. package/assets/scripts/model/fabricServices.js +45 -0
  255. package/assets/scripts/model/known.js +43 -0
  256. package/assets/scripts/model/links.js +44 -0
  257. package/assets/scripts/model/routers.js +51 -0
  258. package/assets/scripts/model/series.js +70 -0
  259. package/assets/scripts/model/sessions.js +61 -0
  260. package/assets/scripts/model/settings.js +60 -0
  261. package/assets/scripts/model/summary.js +49 -0
  262. package/assets/scripts/model/tags.js +330 -0
  263. package/assets/scripts/model/templates.js +42 -0
  264. package/assets/scripts/model/user.js +40 -0
  265. package/assets/scripts/restrictions.js +34 -0
  266. package/assets/scripts/service.js +76 -0
  267. package/assets/scripts/validation-tools.js +5119 -0
  268. package/assets/scripts/ziti.js +372 -0
  269. package/assets/styles/chart.min.css +1 -0
  270. package/assets/styles/dark.css +52 -0
  271. package/assets/styles/datetimepicker.css +1 -0
  272. package/assets/styles/forms.css +521 -0
  273. package/assets/styles/global.scss +890 -0
  274. package/assets/styles/growler.css +190 -0
  275. package/assets/styles/header.css +232 -0
  276. package/assets/styles/icons.css +160 -0
  277. package/assets/styles/navigation.css +183 -0
  278. package/assets/styles/select2.css +481 -0
  279. package/assets/styles/spectrum.css +507 -0
  280. package/assets/styles/tables.css +424 -0
  281. package/assets/styles/tooltip.css +134 -0
  282. package/assets/styles/ziti.css +3216 -0
  283. package/assets/svgs/Advanced.svg +89 -0
  284. package/assets/svgs/ArrowDown.svg +15 -0
  285. package/assets/svgs/ArrowDownDark.svg +15 -0
  286. package/assets/svgs/Confirm_Trash.svg +42 -0
  287. package/assets/svgs/DownloadKey.svg +50 -0
  288. package/assets/svgs/Filter.svg +13 -0
  289. package/assets/svgs/Growl_Bug.svg +47 -0
  290. package/assets/svgs/Growl_Error.svg +41 -0
  291. package/assets/svgs/Growl_Info.svg +45 -0
  292. package/assets/svgs/Growl_Success.svg +34 -0
  293. package/assets/svgs/Growl_Warning.svg +44 -0
  294. package/assets/svgs/MainMenuBlankUser.svg +14 -0
  295. package/assets/svgs/MainMenuNetworks.svg +37 -0
  296. package/assets/svgs/MainMenuNotifications.svg +32 -0
  297. package/assets/svgs/MainMenuOrg.svg +68 -0
  298. package/assets/svgs/MainMenuPlus.svg +13 -0
  299. package/assets/svgs/MainMenuSearch.svg +22 -0
  300. package/assets/svgs/MainMenuSupport.svg +417 -0
  301. package/assets/svgs/No_Clients.svg +94 -0
  302. package/assets/svgs/No_Plus.svg +30 -0
  303. package/assets/svgs/No_Routers.svg +56 -0
  304. package/assets/svgs/Resize.svg +33 -0
  305. package/assets/svgs/Simple.svg +62 -0
  306. package/assets/svgs/appwans.svg +20 -0
  307. package/assets/svgs/cas.svg +46 -0
  308. package/assets/svgs/cert.svg +69 -0
  309. package/assets/svgs/clear.svg +13 -0
  310. package/assets/svgs/close.svg +14 -0
  311. package/assets/svgs/clusters.svg +28 -0
  312. package/assets/svgs/copy.svg +64 -0
  313. package/assets/svgs/dashboard.svg +32 -0
  314. package/assets/svgs/dial.svg +83 -0
  315. package/assets/svgs/docs.svg +95 -0
  316. package/assets/svgs/downloads.svg +74 -0
  317. package/assets/svgs/fabricServices.svg +31 -0
  318. package/assets/svgs/fabrics.svg +134 -0
  319. package/assets/svgs/gateways.svg +49 -0
  320. package/assets/svgs/heart.svg +1 -0
  321. package/assets/svgs/ids.svg +20 -0
  322. package/assets/svgs/infoicon.svg +14 -0
  323. package/assets/svgs/lock.svg +12 -0
  324. package/assets/svgs/minus.svg +11 -0
  325. package/assets/svgs/nodata.svg +27 -0
  326. package/assets/svgs/qr.svg +56 -0
  327. package/assets/svgs/refresh.svg +24 -0
  328. package/assets/svgs/routers.svg +31 -0
  329. package/assets/svgs/select.svg +18 -0
  330. package/assets/svgs/services.svg +19 -0
  331. package/assets/svgs/settings.svg +1 -0
  332. package/assets/svgs/upload.svg +55 -0
  333. package/assets/templates/footer.htm +183 -0
  334. package/assets/templates/header.htm +298 -0
  335. package/assets/vectors/certificates.svg +1 -0
  336. package/assets/vectors/change.svg +1 -0
  337. package/assets/vectors/configuration.svg +2 -0
  338. package/assets/vectors/customize.svg +1 -0
  339. package/assets/vectors/dashboard.svg +1 -0
  340. package/assets/vectors/edgepolicies.svg +2 -0
  341. package/assets/vectors/globe.svg +63 -0
  342. package/assets/vectors/help.svg +48 -0
  343. package/assets/vectors/identity.svg +1 -0
  344. package/assets/vectors/notify.svg +1 -0
  345. package/assets/vectors/plus.svg +1 -0
  346. package/assets/vectors/posture.svg +1 -0
  347. package/assets/vectors/profile.svg +1 -0
  348. package/assets/vectors/router.svg +1 -0
  349. package/assets/vectors/routerpolicies.svg +1 -0
  350. package/assets/vectors/schema.svg +1 -0
  351. package/assets/vectors/server (1).svg +293 -0
  352. package/assets/vectors/servers.svg +103 -0
  353. package/assets/vectors/servicepolicy.svg +1 -0
  354. package/assets/vectors/services.svg +126 -0
  355. package/assets/vectors/settings.svg +130 -0
  356. package/assets/vectors/terminators.svg +1 -0
  357. package/assets/vectors/transitrouter.svg +1 -0
  358. package/esm2022/lib/app.initializer.mjs +24 -0
  359. package/esm2022/lib/features/card/card.component.mjs +29 -0
  360. package/esm2022/lib/features/card-list/card-list.component.mjs +50 -0
  361. package/esm2022/lib/features/config-editor/config-editor.component.mjs +239 -0
  362. package/esm2022/lib/features/confirm/confirm.component.mjs +59 -0
  363. package/esm2022/lib/features/creation-summary-dialog/creation-summary-dialog.component.mjs +92 -0
  364. package/esm2022/lib/features/custom-tags/custom-tags.component.mjs +77 -0
  365. package/esm2022/lib/features/data-table/cells/table-cell-menu/table-cell-menu.component.mjs +47 -0
  366. package/esm2022/lib/features/data-table/cells/table-cell-select/table-cell-select.component.mjs +46 -0
  367. package/esm2022/lib/features/data-table/cells/table-cell-token/table-cell-token.component.mjs +124 -0
  368. package/esm2022/lib/features/data-table/column-headers/table-column-default/table-column-default.component.mjs +269 -0
  369. package/esm2022/lib/features/data-table/column-headers/table-column-filter/table-column-filter.component.mjs +94 -0
  370. package/esm2022/lib/features/data-table/column-headers/table-column-menu/table-column-menu.component.mjs +38 -0
  371. package/esm2022/lib/features/data-table/column-headers/table-column-select/table-column-select.component.mjs +34 -0
  372. package/esm2022/lib/features/data-table/data-table-filter.service.mjs +66 -0
  373. package/esm2022/lib/features/data-table/data-table.component.mjs +848 -0
  374. package/esm2022/lib/features/data-table/data-table.service.mjs +99 -0
  375. package/esm2022/lib/features/data-table/table-filter-bar/filter-bar.component.mjs +95 -0
  376. package/esm2022/lib/features/data-table/table-hidden-columns-bar/hidden-columns-bar.component.mjs +27 -0
  377. package/esm2022/lib/features/data-table/tooltips/os-tooltip.component.mjs +30 -0
  378. package/esm2022/lib/features/data-table/tooltips/sdk-tooltip.component.mjs +35 -0
  379. package/esm2022/lib/features/dynamic-widgets/boolean/boolean-toggle-input.component.mjs +73 -0
  380. package/esm2022/lib/features/dynamic-widgets/checkbox-list/checkbox-list-input.component.mjs +131 -0
  381. package/esm2022/lib/features/dynamic-widgets/forwarding-config/forwarding-config.component.mjs +169 -0
  382. package/esm2022/lib/features/dynamic-widgets/forwarding-config/forwarding-config.service.mjs +51 -0
  383. package/esm2022/lib/features/dynamic-widgets/number/number-input.component.mjs +74 -0
  384. package/esm2022/lib/features/dynamic-widgets/object/object.component.mjs +122 -0
  385. package/esm2022/lib/features/dynamic-widgets/password/password-input.component.mjs +72 -0
  386. package/esm2022/lib/features/dynamic-widgets/port-ranges/port-ranges.component.mjs +98 -0
  387. package/esm2022/lib/features/dynamic-widgets/protocol-address-port/protocol-address-port-input.component.mjs +180 -0
  388. package/esm2022/lib/features/dynamic-widgets/selector/selector-input.component.mjs +104 -0
  389. package/esm2022/lib/features/dynamic-widgets/string/string-input.component.mjs +72 -0
  390. package/esm2022/lib/features/dynamic-widgets/text-list/text-list-input.component.mjs +119 -0
  391. package/esm2022/lib/features/extendable/extendable.component.mjs +56 -0
  392. package/esm2022/lib/features/extendable/extensions-noop.service.mjs +50 -0
  393. package/esm2022/lib/features/json-view/json-view.component.mjs +197 -0
  394. package/esm2022/lib/features/list-page-features/list-page-form/list-page-form.component.mjs +139 -0
  395. package/esm2022/lib/features/list-page-features/list-page-header/list-page-header.component.mjs +48 -0
  396. package/esm2022/lib/features/loading-indicator/loading-indicator.component.mjs +21 -0
  397. package/esm2022/lib/features/messaging/growler.component.mjs +63 -0
  398. package/esm2022/lib/features/messaging/growler.model.mjs +24 -0
  399. package/esm2022/lib/features/messaging/growler.module.mjs +35 -0
  400. package/esm2022/lib/features/messaging/growler.service.mjs +72 -0
  401. package/esm2022/lib/features/messaging/logger.service.mjs +175 -0
  402. package/esm2022/lib/features/no-items/no-items.component.mjs +47 -0
  403. package/esm2022/lib/features/overrides/overrides.component.mjs +119 -0
  404. package/esm2022/lib/features/overrides/overrides.service.mjs +115 -0
  405. package/esm2022/lib/features/preview-list/preview-list.component.mjs +91 -0
  406. package/esm2022/lib/features/projectable-forms/configuration/configuration-form.component.mjs +223 -0
  407. package/esm2022/lib/features/projectable-forms/configuration/configuration.service.mjs +150 -0
  408. package/esm2022/lib/features/projectable-forms/edge-router/edge-router-form.component.mjs +188 -0
  409. package/esm2022/lib/features/projectable-forms/edge-router/edge-router-form.service.mjs +131 -0
  410. package/esm2022/lib/features/projectable-forms/form-field-container/form-field-container.component.mjs +72 -0
  411. package/esm2022/lib/features/projectable-forms/form-field-toggle/form-field-toggle.component.mjs +55 -0
  412. package/esm2022/lib/features/projectable-forms/form-header/form-header.component.mjs +96 -0
  413. package/esm2022/lib/features/projectable-forms/identity/identity-form.component.mjs +322 -0
  414. package/esm2022/lib/features/projectable-forms/identity/identity-form.service.mjs +144 -0
  415. package/esm2022/lib/features/projectable-forms/projectable-form.class.mjs +172 -0
  416. package/esm2022/lib/features/projectable-forms/service/service-form.component.mjs +240 -0
  417. package/esm2022/lib/features/projectable-forms/service/service-form.service.mjs +453 -0
  418. package/esm2022/lib/features/projectable-forms/service/simple-service/simple-service.component.mjs +680 -0
  419. package/esm2022/lib/features/projectable-forms/service-policy/service-policy-form.component.mjs +252 -0
  420. package/esm2022/lib/features/projectable-forms/service-policy/service-policy-form.service.mjs +214 -0
  421. package/esm2022/lib/features/qr-code/qr-code.component.mjs +143 -0
  422. package/esm2022/lib/features/reset-enrollment/reset-enrollment.component.mjs +87 -0
  423. package/esm2022/lib/features/reset-enrollment/reset-enrollment.service.mjs +62 -0
  424. package/esm2022/lib/features/side-modal/side-modal.component.mjs +46 -0
  425. package/esm2022/lib/features/sidebars/side-banner/side-banner.component.mjs +17 -0
  426. package/esm2022/lib/features/sidebars/side-navbar/side-navbar.component.mjs +55 -0
  427. package/esm2022/lib/features/sidebars/side-toolbar/side-toolbar.component.mjs +128 -0
  428. package/esm2022/lib/features/tag-selector/tag-selector.component.mjs +292 -0
  429. package/esm2022/lib/features/visualizer/identity-service-path/identity-service-path.component.mjs +588 -0
  430. package/esm2022/lib/features/visualizer/identity-service-path/identity-service-path.helper.mjs +370 -0
  431. package/esm2022/lib/features/wrappers/node-wrapper.service.mjs +51 -0
  432. package/esm2022/lib/features/wrappers/zac-wrapper-service.class.mjs +92 -0
  433. package/esm2022/lib/features/wrappers/zac-wrapper.component.mjs +147 -0
  434. package/esm2022/lib/features/wrappers/zac-wrapper.service.mjs +937 -0
  435. package/esm2022/lib/models/config.mjs +9 -0
  436. package/esm2022/lib/models/edge-router.mjs +13 -0
  437. package/esm2022/lib/models/identity.mjs +34 -0
  438. package/esm2022/lib/models/service-policy.mjs +12 -0
  439. package/esm2022/lib/models/service.mjs +12 -0
  440. package/esm2022/lib/pages/configurations/configurations-page.component.mjs +102 -0
  441. package/esm2022/lib/pages/configurations/configurations-page.service.mjs +246 -0
  442. package/esm2022/lib/pages/edge-routers/edge-routers-page.component.mjs +149 -0
  443. package/esm2022/lib/pages/edge-routers/edge-routers-page.service.mjs +361 -0
  444. package/esm2022/lib/pages/identities/identities-page.component.mjs +233 -0
  445. package/esm2022/lib/pages/identities/identities-page.service.mjs +498 -0
  446. package/esm2022/lib/pages/service-policies/service-policies-page.component.mjs +132 -0
  447. package/esm2022/lib/pages/service-policies/service-policies-page.service.mjs +457 -0
  448. package/esm2022/lib/pages/services/services-page.component.mjs +141 -0
  449. package/esm2022/lib/pages/services/services-page.service.mjs +215 -0
  450. package/esm2022/lib/safe.pipe.mjs +19 -0
  451. package/esm2022/lib/services/console-events.service.mjs +32 -0
  452. package/esm2022/lib/services/csv-download.service.mjs +92 -0
  453. package/esm2022/lib/services/deactivate-guard.service.mjs +18 -0
  454. package/esm2022/lib/services/login-service.class.mjs +28 -0
  455. package/esm2022/lib/services/node-data.service.mjs +292 -0
  456. package/esm2022/lib/services/noop-login.service.mjs +45 -0
  457. package/esm2022/lib/services/schema.service.mjs +808 -0
  458. package/esm2022/lib/services/settings-service.class.mjs +131 -0
  459. package/esm2022/lib/services/settings.service.mjs +193 -0
  460. package/esm2022/lib/services/tab-name.service.mjs +65 -0
  461. package/esm2022/lib/services/validation.service.mjs +124 -0
  462. package/esm2022/lib/services/ziti-controller-data.service.mjs +260 -0
  463. package/esm2022/lib/services/ziti-data.service.mjs +54 -0
  464. package/esm2022/lib/services/ziti-domain-controller.service.mjs +3 -0
  465. package/esm2022/lib/shared/list-page-component.class.mjs +145 -0
  466. package/esm2022/lib/shared/list-page-service.class.mjs +151 -0
  467. package/esm2022/lib/version.mjs +4 -0
  468. package/esm2022/lib/zac-routing.module.mjs +41 -0
  469. package/esm2022/lib/ziti-console-lib.module.mjs +364 -0
  470. package/esm2022/lib/ziti-console.constants.mjs +19 -0
  471. package/esm2022/openziti-ziti-console-lib.mjs +5 -0
  472. package/esm2022/public-api.mjs +71 -0
  473. package/fesm2022/openziti-ziti-console-lib.mjs +15813 -0
  474. package/fesm2022/openziti-ziti-console-lib.mjs.map +1 -0
  475. package/index.d.ts +6 -0
  476. package/lib/app.initializer.d.ts +3 -0
  477. package/lib/app.initializer.d.ts.map +1 -0
  478. package/lib/features/card/card.component.d.ts +11 -0
  479. package/lib/features/card/card.component.d.ts.map +1 -0
  480. package/lib/features/card-list/card-list.component.d.ts +23 -0
  481. package/lib/features/card-list/card-list.component.d.ts.map +1 -0
  482. package/lib/features/config-editor/config-editor.component.d.ts +39 -0
  483. package/lib/features/config-editor/config-editor.component.d.ts.map +1 -0
  484. package/lib/features/confirm/confirm.component.d.ts +23 -0
  485. package/lib/features/confirm/confirm.component.d.ts.map +1 -0
  486. package/lib/features/creation-summary-dialog/creation-summary-dialog.component.d.ts +31 -0
  487. package/lib/features/creation-summary-dialog/creation-summary-dialog.component.d.ts.map +1 -0
  488. package/lib/features/custom-tags/custom-tags.component.d.ts +20 -0
  489. package/lib/features/custom-tags/custom-tags.component.d.ts.map +1 -0
  490. package/lib/features/data-table/cells/table-cell-menu/table-cell-menu.component.d.ts +16 -0
  491. package/lib/features/data-table/cells/table-cell-menu/table-cell-menu.component.d.ts.map +1 -0
  492. package/lib/features/data-table/cells/table-cell-select/table-cell-select.component.d.ts +19 -0
  493. package/lib/features/data-table/cells/table-cell-select/table-cell-select.component.d.ts.map +1 -0
  494. package/lib/features/data-table/cells/table-cell-token/table-cell-token.component.d.ts +22 -0
  495. package/lib/features/data-table/cells/table-cell-token/table-cell-token.component.d.ts.map +1 -0
  496. package/lib/features/data-table/column-headers/table-column-default/table-column-default.component.d.ts +52 -0
  497. package/lib/features/data-table/column-headers/table-column-default/table-column-default.component.d.ts.map +1 -0
  498. package/lib/features/data-table/column-headers/table-column-filter/table-column-filter.component.d.ts +27 -0
  499. package/lib/features/data-table/column-headers/table-column-filter/table-column-filter.component.d.ts.map +1 -0
  500. package/lib/features/data-table/column-headers/table-column-menu/table-column-menu.component.d.ts +19 -0
  501. package/lib/features/data-table/column-headers/table-column-menu/table-column-menu.component.d.ts.map +1 -0
  502. package/lib/features/data-table/column-headers/table-column-select/table-column-select.component.d.ts +15 -0
  503. package/lib/features/data-table/column-headers/table-column-select/table-column-select.component.d.ts.map +1 -0
  504. package/lib/features/data-table/data-table-filter.service.d.ts +24 -0
  505. package/lib/features/data-table/data-table-filter.service.d.ts.map +1 -0
  506. package/lib/features/data-table/data-table.component.d.ts +154 -0
  507. package/lib/features/data-table/data-table.component.d.ts.map +1 -0
  508. package/lib/features/data-table/data-table.service.d.ts +20 -0
  509. package/lib/features/data-table/data-table.service.d.ts.map +1 -0
  510. package/lib/features/data-table/table-filter-bar/filter-bar.component.d.ts +22 -0
  511. package/lib/features/data-table/table-filter-bar/filter-bar.component.d.ts.map +1 -0
  512. package/lib/features/data-table/table-hidden-columns-bar/hidden-columns-bar.component.d.ts +10 -0
  513. package/lib/features/data-table/table-hidden-columns-bar/hidden-columns-bar.component.d.ts.map +1 -0
  514. package/lib/features/data-table/tooltips/os-tooltip.component.d.ts +15 -0
  515. package/lib/features/data-table/tooltips/os-tooltip.component.d.ts.map +1 -0
  516. package/lib/features/data-table/tooltips/sdk-tooltip.component.d.ts +15 -0
  517. package/lib/features/data-table/tooltips/sdk-tooltip.component.d.ts.map +1 -0
  518. package/lib/features/dynamic-widgets/boolean/boolean-toggle-input.component.d.ts +19 -0
  519. package/lib/features/dynamic-widgets/boolean/boolean-toggle-input.component.d.ts.map +1 -0
  520. package/lib/features/dynamic-widgets/checkbox-list/checkbox-list-input.component.d.ts +26 -0
  521. package/lib/features/dynamic-widgets/checkbox-list/checkbox-list-input.component.d.ts.map +1 -0
  522. package/lib/features/dynamic-widgets/forwarding-config/forwarding-config.component.d.ts +45 -0
  523. package/lib/features/dynamic-widgets/forwarding-config/forwarding-config.component.d.ts.map +1 -0
  524. package/lib/features/dynamic-widgets/forwarding-config/forwarding-config.service.d.ts +14 -0
  525. package/lib/features/dynamic-widgets/forwarding-config/forwarding-config.service.d.ts.map +1 -0
  526. package/lib/features/dynamic-widgets/number/number-input.component.d.ts +20 -0
  527. package/lib/features/dynamic-widgets/number/number-input.component.d.ts.map +1 -0
  528. package/lib/features/dynamic-widgets/object/object.component.d.ts +26 -0
  529. package/lib/features/dynamic-widgets/object/object.component.d.ts.map +1 -0
  530. package/lib/features/dynamic-widgets/password/password-input.component.d.ts +20 -0
  531. package/lib/features/dynamic-widgets/password/password-input.component.d.ts.map +1 -0
  532. package/lib/features/dynamic-widgets/port-ranges/port-ranges.component.d.ts +21 -0
  533. package/lib/features/dynamic-widgets/port-ranges/port-ranges.component.d.ts.map +1 -0
  534. package/lib/features/dynamic-widgets/protocol-address-port/protocol-address-port-input.component.d.ts +58 -0
  535. package/lib/features/dynamic-widgets/protocol-address-port/protocol-address-port-input.component.d.ts.map +1 -0
  536. package/lib/features/dynamic-widgets/selector/selector-input.component.d.ts +23 -0
  537. package/lib/features/dynamic-widgets/selector/selector-input.component.d.ts.map +1 -0
  538. package/lib/features/dynamic-widgets/string/string-input.component.d.ts +20 -0
  539. package/lib/features/dynamic-widgets/string/string-input.component.d.ts.map +1 -0
  540. package/lib/features/dynamic-widgets/text-list/text-list-input.component.d.ts +23 -0
  541. package/lib/features/dynamic-widgets/text-list/text-list-input.component.d.ts.map +1 -0
  542. package/lib/features/extendable/extendable.component.d.ts +15 -0
  543. package/lib/features/extendable/extendable.component.d.ts.map +1 -0
  544. package/lib/features/extendable/extensions-noop.service.d.ts +31 -0
  545. package/lib/features/extendable/extensions-noop.service.d.ts.map +1 -0
  546. package/lib/features/json-view/json-view.component.d.ts +37 -0
  547. package/lib/features/json-view/json-view.component.d.ts.map +1 -0
  548. package/lib/features/list-page-features/list-page-form/list-page-form.component.d.ts +35 -0
  549. package/lib/features/list-page-features/list-page-form/list-page-form.component.d.ts.map +1 -0
  550. package/lib/features/list-page-features/list-page-header/list-page-header.component.d.ts +13 -0
  551. package/lib/features/list-page-features/list-page-header/list-page-header.component.d.ts.map +1 -0
  552. package/lib/features/loading-indicator/loading-indicator.component.d.ts +9 -0
  553. package/lib/features/loading-indicator/loading-indicator.component.d.ts.map +1 -0
  554. package/lib/features/messaging/growler.component.d.ts +19 -0
  555. package/lib/features/messaging/growler.component.d.ts.map +1 -0
  556. package/lib/features/messaging/growler.model.d.ts +8 -0
  557. package/lib/features/messaging/growler.model.d.ts.map +1 -0
  558. package/lib/features/messaging/growler.module.d.ts +10 -0
  559. package/lib/features/messaging/growler.module.d.ts.map +1 -0
  560. package/lib/features/messaging/growler.service.d.ts +18 -0
  561. package/lib/features/messaging/growler.service.d.ts.map +1 -0
  562. package/lib/features/messaging/logger.service.d.ts +27 -0
  563. package/lib/features/messaging/logger.service.d.ts.map +1 -0
  564. package/lib/features/no-items/no-items.component.d.ts +19 -0
  565. package/lib/features/no-items/no-items.component.d.ts.map +1 -0
  566. package/lib/features/overrides/overrides.component.d.ts +33 -0
  567. package/lib/features/overrides/overrides.component.d.ts.map +1 -0
  568. package/lib/features/overrides/overrides.service.d.ts +18 -0
  569. package/lib/features/overrides/overrides.service.d.ts.map +1 -0
  570. package/lib/features/preview-list/preview-list.component.d.ts +24 -0
  571. package/lib/features/preview-list/preview-list.component.d.ts.map +1 -0
  572. package/lib/features/projectable-forms/configuration/configuration-form.component.d.ts +52 -0
  573. package/lib/features/projectable-forms/configuration/configuration-form.component.d.ts.map +1 -0
  574. package/lib/features/projectable-forms/configuration/configuration.service.d.ts +33 -0
  575. package/lib/features/projectable-forms/configuration/configuration.service.d.ts.map +1 -0
  576. package/lib/features/projectable-forms/edge-router/edge-router-form.component.d.ts +45 -0
  577. package/lib/features/projectable-forms/edge-router/edge-router-form.component.d.ts.map +1 -0
  578. package/lib/features/projectable-forms/edge-router/edge-router-form.service.d.ts +29 -0
  579. package/lib/features/projectable-forms/edge-router/edge-router-form.service.d.ts.map +1 -0
  580. package/lib/features/projectable-forms/form-field-container/form-field-container.component.d.ts +22 -0
  581. package/lib/features/projectable-forms/form-field-container/form-field-container.component.d.ts.map +1 -0
  582. package/lib/features/projectable-forms/form-field-toggle/form-field-toggle.component.d.ts +15 -0
  583. package/lib/features/projectable-forms/form-field-toggle/form-field-toggle.component.d.ts.map +1 -0
  584. package/lib/features/projectable-forms/form-header/form-header.component.d.ts +23 -0
  585. package/lib/features/projectable-forms/form-header/form-header.component.d.ts.map +1 -0
  586. package/lib/features/projectable-forms/identity/identity-form.component.d.ts +70 -0
  587. package/lib/features/projectable-forms/identity/identity-form.component.d.ts.map +1 -0
  588. package/lib/features/projectable-forms/identity/identity-form.service.d.ts +20 -0
  589. package/lib/features/projectable-forms/identity/identity-form.service.d.ts.map +1 -0
  590. package/lib/features/projectable-forms/projectable-form.class.d.ts +39 -0
  591. package/lib/features/projectable-forms/projectable-form.class.d.ts.map +1 -0
  592. package/lib/features/projectable-forms/service/service-form.component.d.ts +62 -0
  593. package/lib/features/projectable-forms/service/service-form.component.d.ts.map +1 -0
  594. package/lib/features/projectable-forms/service/service-form.service.d.ts +96 -0
  595. package/lib/features/projectable-forms/service/service-form.service.d.ts.map +1 -0
  596. package/lib/features/projectable-forms/service/simple-service/simple-service.component.d.ts +140 -0
  597. package/lib/features/projectable-forms/service/simple-service/simple-service.component.d.ts.map +1 -0
  598. package/lib/features/projectable-forms/service-policy/service-policy-form.component.d.ts +58 -0
  599. package/lib/features/projectable-forms/service-policy/service-policy-form.component.d.ts.map +1 -0
  600. package/lib/features/projectable-forms/service-policy/service-policy-form.service.d.ts +37 -0
  601. package/lib/features/projectable-forms/service-policy/service-policy-form.service.d.ts.map +1 -0
  602. package/lib/features/qr-code/qr-code.component.d.ts +40 -0
  603. package/lib/features/qr-code/qr-code.component.d.ts.map +1 -0
  604. package/lib/features/reset-enrollment/reset-enrollment.component.d.ts +27 -0
  605. package/lib/features/reset-enrollment/reset-enrollment.component.d.ts.map +1 -0
  606. package/lib/features/reset-enrollment/reset-enrollment.service.d.ts +13 -0
  607. package/lib/features/reset-enrollment/reset-enrollment.service.d.ts.map +1 -0
  608. package/lib/features/side-modal/side-modal.component.d.ts +15 -0
  609. package/lib/features/side-modal/side-modal.component.d.ts.map +1 -0
  610. package/lib/features/sidebars/side-banner/side-banner.component.d.ts +7 -0
  611. package/lib/features/sidebars/side-banner/side-banner.component.d.ts.map +1 -0
  612. package/lib/features/sidebars/side-navbar/side-navbar.component.d.ts +16 -0
  613. package/lib/features/sidebars/side-navbar/side-navbar.component.d.ts.map +1 -0
  614. package/lib/features/sidebars/side-toolbar/side-toolbar.component.d.ts +34 -0
  615. package/lib/features/sidebars/side-toolbar/side-toolbar.component.d.ts.map +1 -0
  616. package/lib/features/tag-selector/tag-selector.component.d.ts +59 -0
  617. package/lib/features/tag-selector/tag-selector.component.d.ts.map +1 -0
  618. package/lib/features/visualizer/identity-service-path/identity-service-path.component.d.ts +53 -0
  619. package/lib/features/visualizer/identity-service-path/identity-service-path.component.d.ts.map +1 -0
  620. package/lib/features/visualizer/identity-service-path/identity-service-path.helper.d.ts +21 -0
  621. package/lib/features/visualizer/identity-service-path/identity-service-path.helper.d.ts.map +1 -0
  622. package/lib/features/wrappers/node-wrapper.service.d.ts +24 -0
  623. package/lib/features/wrappers/node-wrapper.service.d.ts.map +1 -0
  624. package/lib/features/wrappers/zac-wrapper-service.class.d.ts +38 -0
  625. package/lib/features/wrappers/zac-wrapper-service.class.d.ts.map +1 -0
  626. package/lib/features/wrappers/zac-wrapper.component.d.ts +31 -0
  627. package/lib/features/wrappers/zac-wrapper.component.d.ts.map +1 -0
  628. package/lib/features/wrappers/zac-wrapper.service.d.ts +56 -0
  629. package/lib/features/wrappers/zac-wrapper.service.d.ts.map +1 -0
  630. package/lib/models/config.d.ts +6 -0
  631. package/lib/models/config.d.ts.map +1 -0
  632. package/lib/models/edge-router.d.ts +10 -0
  633. package/lib/models/edge-router.d.ts.map +1 -0
  634. package/lib/models/identity.d.ts +16 -0
  635. package/lib/models/identity.d.ts.map +1 -0
  636. package/lib/models/service-policy.d.ts +9 -0
  637. package/lib/models/service-policy.d.ts.map +1 -0
  638. package/lib/models/service.d.ts +9 -0
  639. package/lib/models/service.d.ts.map +1 -0
  640. package/lib/pages/configurations/configurations-page.component.d.ts +29 -0
  641. package/lib/pages/configurations/configurations-page.component.d.ts.map +1 -0
  642. package/lib/pages/configurations/configurations-page.service.d.ts +78 -0
  643. package/lib/pages/configurations/configurations-page.service.d.ts.map +1 -0
  644. package/lib/pages/edge-routers/edge-routers-page.component.d.ts +38 -0
  645. package/lib/pages/edge-routers/edge-routers-page.component.d.ts.map +1 -0
  646. package/lib/pages/edge-routers/edge-routers-page.service.d.ts +47 -0
  647. package/lib/pages/edge-routers/edge-routers-page.service.d.ts.map +1 -0
  648. package/lib/pages/identities/identities-page.component.d.ts +44 -0
  649. package/lib/pages/identities/identities-page.component.d.ts.map +1 -0
  650. package/lib/pages/identities/identities-page.service.d.ts +54 -0
  651. package/lib/pages/identities/identities-page.service.d.ts.map +1 -0
  652. package/lib/pages/service-policies/service-policies-page.component.d.ts +36 -0
  653. package/lib/pages/service-policies/service-policies-page.component.d.ts.map +1 -0
  654. package/lib/pages/service-policies/service-policies-page.service.d.ts +63 -0
  655. package/lib/pages/service-policies/service-policies-page.service.d.ts.map +1 -0
  656. package/lib/pages/services/services-page.component.d.ts +37 -0
  657. package/lib/pages/services/services-page.component.d.ts.map +1 -0
  658. package/lib/pages/services/services-page.service.d.ts +46 -0
  659. package/lib/pages/services/services-page.service.d.ts.map +1 -0
  660. package/lib/safe.pipe.d.ts +11 -0
  661. package/lib/safe.pipe.d.ts.map +1 -0
  662. package/lib/services/console-events.service.d.ts +12 -0
  663. package/lib/services/console-events.service.d.ts.map +1 -0
  664. package/lib/services/csv-download.service.d.ts +11 -0
  665. package/lib/services/csv-download.service.d.ts.map +1 -0
  666. package/lib/services/deactivate-guard.service.d.ts +14 -0
  667. package/lib/services/deactivate-guard.service.d.ts.map +1 -0
  668. package/lib/services/login-service.class.d.ts +22 -0
  669. package/lib/services/login-service.class.d.ts.map +1 -0
  670. package/lib/services/node-data.service.d.ts +32 -0
  671. package/lib/services/node-data.service.d.ts.map +1 -0
  672. package/lib/services/noop-login.service.d.ts +23 -0
  673. package/lib/services/noop-login.service.d.ts.map +1 -0
  674. package/lib/services/schema.service.d.ts +63 -0
  675. package/lib/services/schema.service.d.ts.map +1 -0
  676. package/lib/services/settings-service.class.d.ts +35 -0
  677. package/lib/services/settings-service.class.d.ts.map +1 -0
  678. package/lib/services/settings.service.d.ts +18 -0
  679. package/lib/services/settings.service.d.ts.map +1 -0
  680. package/lib/services/tab-name.service.d.ts +20 -0
  681. package/lib/services/tab-name.service.d.ts.map +1 -0
  682. package/lib/services/validation.service.d.ts +13 -0
  683. package/lib/services/validation.service.d.ts.map +1 -0
  684. package/lib/services/ziti-controller-data.service.d.ts +32 -0
  685. package/lib/services/ziti-controller-data.service.d.ts.map +1 -0
  686. package/lib/services/ziti-data.service.d.ts +40 -0
  687. package/lib/services/ziti-data.service.d.ts.map +1 -0
  688. package/lib/services/ziti-domain-controller.service.d.ts +13 -0
  689. package/lib/services/ziti-domain-controller.service.d.ts.map +1 -0
  690. package/lib/shared/list-page-component.class.d.ts +52 -0
  691. package/lib/shared/list-page-component.class.d.ts.map +1 -0
  692. package/lib/shared/list-page-service.class.d.ts +47 -0
  693. package/lib/shared/list-page-service.class.d.ts.map +1 -0
  694. package/lib/version.d.ts +4 -0
  695. package/lib/version.d.ts.map +1 -0
  696. package/lib/zac-routing.module.d.ts +8 -0
  697. package/lib/zac-routing.module.d.ts.map +1 -0
  698. package/lib/ziti-console-lib.module.d.ts +85 -0
  699. package/lib/ziti-console-lib.module.d.ts.map +1 -0
  700. package/lib/ziti-console.constants.d.ts +4 -0
  701. package/lib/ziti-console.constants.d.ts.map +1 -0
  702. package/openziti-ziti-console-lib.d.ts.map +1 -0
  703. package/package.json +48 -0
  704. package/public-api.d.ts +68 -0
  705. package/public-api.d.ts.map +1 -0
@@ -0,0 +1,2930 @@
1
+ /*!
2
+ * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2016
3
+ * @version 1.3.4
4
+ *
5
+ * Date formatter utility library that allows formatting date/time variables or Date objects using PHP DateTime format.
6
+ * @see http://php.net/manual/en/function.date.php
7
+ *
8
+ * For more JQuery plugins visit http://plugins.krajee.com
9
+ * For more Yii related demos visit http://demos.krajee.com
10
+ */var DateFormatter;!function(){"use strict";var t,e,r,n,a,u,i;u=864e5,i=3600,t=function(t,e){return"string"==typeof t&&"string"==typeof e&&t.toLowerCase()===e.toLowerCase()},e=function(t,r,n){var a=n||"0",u=t.toString();return u.length<r?e(a+u,r):u},r=function(t){var e,n;for(t=t||{},e=1;e<arguments.length;e++)if(n=arguments[e])for(var a in n)n.hasOwnProperty(a)&&("object"==typeof n[a]?r(t[a],n[a]):t[a]=n[a]);return t},n=function(t,e){for(var r=0;r<e.length;r++)if(e[r].toLowerCase()===t.toLowerCase())return r;return-1},a={dateSettings:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["AM","PM"],ordinal:function(t){var e=t%10,r={1:"st",2:"nd",3:"rd"};return 1!==Math.floor(t%100/10)&&r[e]?r[e]:"th"}},separators:/[ \-+\/\.T:@]/g,validParts:/[dDjlNSwzWFmMntLoYyaABgGhHisueTIOPZcrU]/g,intParts:/[djwNzmnyYhHgGis]/g,tzParts:/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,tzClip:/[^-+\dA-Z]/g},DateFormatter=function(t){var e=this,n=r(a,t);e.dateSettings=n.dateSettings,e.separators=n.separators,e.validParts=n.validParts,e.intParts=n.intParts,e.tzParts=n.tzParts,e.tzClip=n.tzClip},DateFormatter.prototype={constructor:DateFormatter,getMonth:function(t){var e,r=this;return e=n(t,r.dateSettings.monthsShort)+1,0===e&&(e=n(t,r.dateSettings.months)+1),e},parseDate:function(e,r){var n,a,u,i,s,o,c,f,l,h,d=this,g=!1,m=!1,p=d.dateSettings,y={date:null,year:null,month:null,day:null,hour:0,min:0,sec:0};if(!e)return null;if(e instanceof Date)return e;if("U"===r)return u=parseInt(e),u?new Date(1e3*u):e;switch(typeof e){case"number":return new Date(e);case"string":break;default:return null}if(n=r.match(d.validParts),!n||0===n.length)throw new Error("Invalid date format definition.");for(a=e.replace(d.separators,"\x00").split("\x00"),u=0;u<a.length;u++)switch(i=a[u],s=parseInt(i),n[u]){case"y":case"Y":if(!s)return null;l=i.length,y.year=2===l?parseInt((70>s?"20":"19")+i):s,g=!0;break;case"m":case"n":case"M":case"F":if(isNaN(s)){if(o=d.getMonth(i),!(o>0))return null;y.month=o}else{if(!(s>=1&&12>=s))return null;y.month=s}g=!0;break;case"d":case"j":if(!(s>=1&&31>=s))return null;y.day=s,g=!0;break;case"g":case"h":if(c=n.indexOf("a")>-1?n.indexOf("a"):n.indexOf("A")>-1?n.indexOf("A"):-1,h=a[c],c>-1)f=t(h,p.meridiem[0])?0:t(h,p.meridiem[1])?12:-1,s>=1&&12>=s&&f>-1?y.hour=s+f-1:s>=0&&23>=s&&(y.hour=s);else{if(!(s>=0&&23>=s))return null;y.hour=s}m=!0;break;case"G":case"H":if(!(s>=0&&23>=s))return null;y.hour=s,m=!0;break;case"i":if(!(s>=0&&59>=s))return null;y.min=s,m=!0;break;case"s":if(!(s>=0&&59>=s))return null;y.sec=s,m=!0}if(g===!0&&y.year&&y.month&&y.day)y.date=new Date(y.year,y.month-1,y.day,y.hour,y.min,y.sec,0);else{if(m!==!0)return null;y.date=new Date(0,0,0,y.hour,y.min,y.sec,0)}return y.date},guessDate:function(t,e){if("string"!=typeof t)return t;var r,n,a,u,i,s,o=this,c=t.replace(o.separators,"\x00").split("\x00"),f=/^[djmn]/g,l=e.match(o.validParts),h=new Date,d=0;if(!f.test(l[0]))return t;for(a=0;a<c.length;a++){if(d=2,i=c[a],s=parseInt(i.substr(0,2)),isNaN(s))return null;switch(a){case 0:"m"===l[0]||"n"===l[0]?h.setMonth(s-1):h.setDate(s);break;case 1:"m"===l[0]||"n"===l[0]?h.setDate(s):h.setMonth(s-1);break;case 2:if(n=h.getFullYear(),r=i.length,d=4>r?r:4,n=parseInt(4>r?n.toString().substr(0,4-r)+i:i.substr(0,4)),!n)return null;h.setFullYear(n);break;case 3:h.setHours(s);break;case 4:h.setMinutes(s);break;case 5:h.setSeconds(s)}u=i.substr(d),u.length>0&&c.splice(a+1,0,u)}return h},parseFormat:function(t,r){var n,a=this,s=a.dateSettings,o=/\\?(.?)/gi,c=function(t,e){return n[t]?n[t]():e};return n={d:function(){return e(n.j(),2)},D:function(){return s.daysShort[n.w()]},j:function(){return r.getDate()},l:function(){return s.days[n.w()]},N:function(){return n.w()||7},w:function(){return r.getDay()},z:function(){var t=new Date(n.Y(),n.n()-1,n.j()),e=new Date(n.Y(),0,1);return Math.round((t-e)/u)},W:function(){var t=new Date(n.Y(),n.n()-1,n.j()-n.N()+3),r=new Date(t.getFullYear(),0,4);return e(1+Math.round((t-r)/u/7),2)},F:function(){return s.months[r.getMonth()]},m:function(){return e(n.n(),2)},M:function(){return s.monthsShort[r.getMonth()]},n:function(){return r.getMonth()+1},t:function(){return new Date(n.Y(),n.n(),0).getDate()},L:function(){var t=n.Y();return t%4===0&&t%100!==0||t%400===0?1:0},o:function(){var t=n.n(),e=n.W(),r=n.Y();return r+(12===t&&9>e?1:1===t&&e>9?-1:0)},Y:function(){return r.getFullYear()},y:function(){return n.Y().toString().slice(-2)},a:function(){return n.A().toLowerCase()},A:function(){var t=n.G()<12?0:1;return s.meridiem[t]},B:function(){var t=r.getUTCHours()*i,n=60*r.getUTCMinutes(),a=r.getUTCSeconds();return e(Math.floor((t+n+a+i)/86.4)%1e3,3)},g:function(){return n.G()%12||12},G:function(){return r.getHours()},h:function(){return e(n.g(),2)},H:function(){return e(n.G(),2)},i:function(){return e(r.getMinutes(),2)},s:function(){return e(r.getSeconds(),2)},u:function(){return e(1e3*r.getMilliseconds(),6)},e:function(){var t=/\((.*)\)/.exec(String(r))[1];return t||"Coordinated Universal Time"},I:function(){var t=new Date(n.Y(),0),e=Date.UTC(n.Y(),0),r=new Date(n.Y(),6),a=Date.UTC(n.Y(),6);return t-e!==r-a?1:0},O:function(){var t=r.getTimezoneOffset(),n=Math.abs(t);return(t>0?"-":"+")+e(100*Math.floor(n/60)+n%60,4)},P:function(){var t=n.O();return t.substr(0,3)+":"+t.substr(3,2)},T:function(){var t=(String(r).match(a.tzParts)||[""]).pop().replace(a.tzClip,"");return t||"UTC"},Z:function(){return 60*-r.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(o,c)},r:function(){return"D, d M Y H:i:s O".replace(o,c)},U:function(){return r.getTime()/1e3||0}},c(t,t)},formatDate:function(t,e){var r,n,a,u,i,s=this,o="",c="\\";if("string"==typeof t&&(t=s.parseDate(t,e),!t))return null;if(t instanceof Date){for(a=e.length,r=0;a>r;r++)i=e.charAt(r),"S"!==i&&i!==c&&(r>0&&e.charAt(r-1)===c?o+=i:(u=s.parseFormat(i,t),r!==a-1&&s.intParts.test(i)&&"S"===e.charAt(r+1)&&(n=parseInt(u)||0,u+=s.dateSettings.ordinal(n)),o+=u));return o}return""}}}();
11
+ /**
12
+ * @preserve jQuery DateTimePicker
13
+ * @homepage http://xdsoft.net/jqplugins/datetimepicker/
14
+ * @author Chupurnov Valeriy (<chupurnov@gmail.com>)
15
+ */
16
+
17
+ /**
18
+ * @param {jQuery} $
19
+ */
20
+ var datetimepickerFactory = function ($) {
21
+ 'use strict';
22
+
23
+ var default_options = {
24
+ i18n: {
25
+ ar: { // Arabic
26
+ months: [
27
+ "كانون الثاني", "شباط", "آذار", "نيسان", "مايو", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"
28
+ ],
29
+ dayOfWeekShort: [
30
+ "ن", "ث", "ع", "خ", "ج", "س", "ح"
31
+ ],
32
+ dayOfWeek: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"]
33
+ },
34
+ ro: { // Romanian
35
+ months: [
36
+ "Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"
37
+ ],
38
+ dayOfWeekShort: [
39
+ "Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ"
40
+ ],
41
+ dayOfWeek: ["Duminică", "Luni", "Marţi", "Miercuri", "Joi", "Vineri", "Sâmbătă"]
42
+ },
43
+ id: { // Indonesian
44
+ months: [
45
+ "Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"
46
+ ],
47
+ dayOfWeekShort: [
48
+ "Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"
49
+ ],
50
+ dayOfWeek: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"]
51
+ },
52
+ is: { // Icelandic
53
+ months: [
54
+ "Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júní", "Júlí", "Ágúst", "September", "Október", "Nóvember", "Desember"
55
+ ],
56
+ dayOfWeekShort: [
57
+ "Sun", "Mán", "Þrið", "Mið", "Fim", "Fös", "Lau"
58
+ ],
59
+ dayOfWeek: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur"]
60
+ },
61
+ bg: { // Bulgarian
62
+ months: [
63
+ "Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"
64
+ ],
65
+ dayOfWeekShort: [
66
+ "Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
67
+ ],
68
+ dayOfWeek: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота"]
69
+ },
70
+ fa: { // Persian/Farsi
71
+ months: [
72
+ 'فروردین', 'اردیبهشت', 'خرداد', 'تیر', 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند'
73
+ ],
74
+ dayOfWeekShort: [
75
+ 'یکشنبه', 'دوشنبه', 'سه شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'
76
+ ],
77
+ dayOfWeek: ["یک‌شنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنج‌شنبه", "جمعه", "شنبه", "یک‌شنبه"]
78
+ },
79
+ ru: { // Russian
80
+ months: [
81
+ 'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'
82
+ ],
83
+ dayOfWeekShort: [
84
+ "Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
85
+ ],
86
+ dayOfWeek: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"]
87
+ },
88
+ uk: { // Ukrainian
89
+ months: [
90
+ 'Січень', 'Лютий', 'Березень', 'Квітень', 'Травень', 'Червень', 'Липень', 'Серпень', 'Вересень', 'Жовтень', 'Листопад', 'Грудень'
91
+ ],
92
+ dayOfWeekShort: [
93
+ "Ндл", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Сбт"
94
+ ],
95
+ dayOfWeek: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"]
96
+ },
97
+ en: { // English
98
+ months: [
99
+ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
100
+ ],
101
+ dayOfWeekShort: [
102
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
103
+ ],
104
+ dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
105
+ },
106
+ el: { // Ελληνικά
107
+ months: [
108
+ "Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"
109
+ ],
110
+ dayOfWeekShort: [
111
+ "Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ"
112
+ ],
113
+ dayOfWeek: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"]
114
+ },
115
+ de: { // German
116
+ months: [
117
+ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'
118
+ ],
119
+ dayOfWeekShort: [
120
+ "So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"
121
+ ],
122
+ dayOfWeek: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"]
123
+ },
124
+ nl: { // Dutch
125
+ months: [
126
+ "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"
127
+ ],
128
+ dayOfWeekShort: [
129
+ "zo", "ma", "di", "wo", "do", "vr", "za"
130
+ ],
131
+ dayOfWeek: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"]
132
+ },
133
+ tr: { // Turkish
134
+ months: [
135
+ "Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"
136
+ ],
137
+ dayOfWeekShort: [
138
+ "Paz", "Pts", "Sal", "Çar", "Per", "Cum", "Cts"
139
+ ],
140
+ dayOfWeek: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"]
141
+ },
142
+ fr: { //French
143
+ months: [
144
+ "Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"
145
+ ],
146
+ dayOfWeekShort: [
147
+ "Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"
148
+ ],
149
+ dayOfWeek: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"]
150
+ },
151
+ es: { // Spanish
152
+ months: [
153
+ "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"
154
+ ],
155
+ dayOfWeekShort: [
156
+ "Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"
157
+ ],
158
+ dayOfWeek: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"]
159
+ },
160
+ th: { // Thai
161
+ months: [
162
+ 'มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'
163
+ ],
164
+ dayOfWeekShort: [
165
+ 'อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'
166
+ ],
167
+ dayOfWeek: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"]
168
+ },
169
+ pl: { // Polish
170
+ months: [
171
+ "styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"
172
+ ],
173
+ dayOfWeekShort: [
174
+ "nd", "pn", "wt", "śr", "cz", "pt", "sb"
175
+ ],
176
+ dayOfWeek: ["niedziela", "poniedziałek", "wtorek", "środa", "czwartek", "piątek", "sobota"]
177
+ },
178
+ pt: { // Portuguese
179
+ months: [
180
+ "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
181
+ ],
182
+ dayOfWeekShort: [
183
+ "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"
184
+ ],
185
+ dayOfWeek: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"]
186
+ },
187
+ ch: { // Simplified Chinese
188
+ months: [
189
+ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
190
+ ],
191
+ dayOfWeekShort: [
192
+ "日", "一", "二", "三", "四", "五", "六"
193
+ ]
194
+ },
195
+ se: { // Swedish
196
+ months: [
197
+ "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"
198
+ ],
199
+ dayOfWeekShort: [
200
+ "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"
201
+ ]
202
+ },
203
+ km: { // Khmer (ភាសាខ្មែរ)
204
+ months: [
205
+ "មករា​", "កុម្ភៈ", "មិនា​", "មេសា​", "ឧសភា​", "មិថុនា​", "កក្កដា​", "សីហា​", "កញ្ញា​", "តុលា​", "វិច្ឆិកា", "ធ្នូ​"
206
+ ],
207
+ dayOfWeekShort: ["អាទិ​", "ច័ន្ទ​", "អង្គារ​", "ពុធ​", "ព្រហ​​", "សុក្រ​", "សៅរ៍"],
208
+ dayOfWeek: ["អាទិត្យ​", "ច័ន្ទ​", "អង្គារ​", "ពុធ​", "ព្រហស្បតិ៍​", "សុក្រ​", "សៅរ៍"]
209
+ },
210
+ kr: { // Korean
211
+ months: [
212
+ "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
213
+ ],
214
+ dayOfWeekShort: [
215
+ "일", "월", "화", "수", "목", "금", "토"
216
+ ],
217
+ dayOfWeek: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"]
218
+ },
219
+ it: { // Italian
220
+ months: [
221
+ "Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"
222
+ ],
223
+ dayOfWeekShort: [
224
+ "Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"
225
+ ],
226
+ dayOfWeek: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"]
227
+ },
228
+ da: { // Dansk
229
+ months: [
230
+ "Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"
231
+ ],
232
+ dayOfWeekShort: [
233
+ "Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"
234
+ ],
235
+ dayOfWeek: ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"]
236
+ },
237
+ no: { // Norwegian
238
+ months: [
239
+ "Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"
240
+ ],
241
+ dayOfWeekShort: [
242
+ "Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"
243
+ ],
244
+ dayOfWeek: ['Søndag', 'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lørdag']
245
+ },
246
+ ja: { // Japanese
247
+ months: [
248
+ "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"
249
+ ],
250
+ dayOfWeekShort: [
251
+ "日", "月", "火", "水", "木", "金", "土"
252
+ ],
253
+ dayOfWeek: ["日曜", "月曜", "火曜", "水曜", "木曜", "金曜", "土曜"]
254
+ },
255
+ vi: { // Vietnamese
256
+ months: [
257
+ "Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"
258
+ ],
259
+ dayOfWeekShort: [
260
+ "CN", "T2", "T3", "T4", "T5", "T6", "T7"
261
+ ],
262
+ dayOfWeek: ["Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy"]
263
+ },
264
+ sl: { // Slovenščina
265
+ months: [
266
+ "Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"
267
+ ],
268
+ dayOfWeekShort: [
269
+ "Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"
270
+ ],
271
+ dayOfWeek: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"]
272
+ },
273
+ cs: { // Čeština
274
+ months: [
275
+ "Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"
276
+ ],
277
+ dayOfWeekShort: [
278
+ "Ne", "Po", "Út", "St", "Čt", "Pá", "So"
279
+ ]
280
+ },
281
+ hu: { // Hungarian
282
+ months: [
283
+ "Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"
284
+ ],
285
+ dayOfWeekShort: [
286
+ "Va", "Hé", "Ke", "Sze", "Cs", "Pé", "Szo"
287
+ ],
288
+ dayOfWeek: ["vasárnap", "hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat"]
289
+ },
290
+ az: { //Azerbaijanian (Azeri)
291
+ months: [
292
+ "Yanvar", "Fevral", "Mart", "Aprel", "May", "Iyun", "Iyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"
293
+ ],
294
+ dayOfWeekShort: [
295
+ "B", "Be", "Ça", "Ç", "Ca", "C", "Ş"
296
+ ],
297
+ dayOfWeek: ["Bazar", "Bazar ertəsi", "Çərşənbə axşamı", "Çərşənbə", "Cümə axşamı", "Cümə", "Şənbə"]
298
+ },
299
+ bs: { //Bosanski
300
+ months: [
301
+ "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
302
+ ],
303
+ dayOfWeekShort: [
304
+ "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"
305
+ ],
306
+ dayOfWeek: ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"]
307
+ },
308
+ ca: { //Català
309
+ months: [
310
+ "Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"
311
+ ],
312
+ dayOfWeekShort: [
313
+ "Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds"
314
+ ],
315
+ dayOfWeek: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"]
316
+ },
317
+ 'en-GB': { //English (British)
318
+ months: [
319
+ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
320
+ ],
321
+ dayOfWeekShort: [
322
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
323
+ ],
324
+ dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
325
+ },
326
+ et: { //"Eesti"
327
+ months: [
328
+ "Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"
329
+ ],
330
+ dayOfWeekShort: [
331
+ "P", "E", "T", "K", "N", "R", "L"
332
+ ],
333
+ dayOfWeek: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev"]
334
+ },
335
+ eu: { //Euskara
336
+ months: [
337
+ "Urtarrila", "Otsaila", "Martxoa", "Apirila", "Maiatza", "Ekaina", "Uztaila", "Abuztua", "Iraila", "Urria", "Azaroa", "Abendua"
338
+ ],
339
+ dayOfWeekShort: [
340
+ "Ig.", "Al.", "Ar.", "Az.", "Og.", "Or.", "La."
341
+ ],
342
+ dayOfWeek: ['Igandea', 'Astelehena', 'Asteartea', 'Asteazkena', 'Osteguna', 'Ostirala', 'Larunbata']
343
+ },
344
+ fi: { //Finnish (Suomi)
345
+ months: [
346
+ "Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"
347
+ ],
348
+ dayOfWeekShort: [
349
+ "Su", "Ma", "Ti", "Ke", "To", "Pe", "La"
350
+ ],
351
+ dayOfWeek: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"]
352
+ },
353
+ gl: { //Galego
354
+ months: [
355
+ "Xan", "Feb", "Maz", "Abr", "Mai", "Xun", "Xul", "Ago", "Set", "Out", "Nov", "Dec"
356
+ ],
357
+ dayOfWeekShort: [
358
+ "Dom", "Lun", "Mar", "Mer", "Xov", "Ven", "Sab"
359
+ ],
360
+ dayOfWeek: ["Domingo", "Luns", "Martes", "Mércores", "Xoves", "Venres", "Sábado"]
361
+ },
362
+ hr: { //Hrvatski
363
+ months: [
364
+ "Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"
365
+ ],
366
+ dayOfWeekShort: [
367
+ "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"
368
+ ],
369
+ dayOfWeek: ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"]
370
+ },
371
+ ko: { //Korean (한국어)
372
+ months: [
373
+ "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
374
+ ],
375
+ dayOfWeekShort: [
376
+ "일", "월", "화", "수", "목", "금", "토"
377
+ ],
378
+ dayOfWeek: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"]
379
+ },
380
+ lt: { //Lithuanian (lietuvių)
381
+ months: [
382
+ "Sausio", "Vasario", "Kovo", "Balandžio", "Gegužės", "Birželio", "Liepos", "Rugpjūčio", "Rugsėjo", "Spalio", "Lapkričio", "Gruodžio"
383
+ ],
384
+ dayOfWeekShort: [
385
+ "Sek", "Pir", "Ant", "Tre", "Ket", "Pen", "Šeš"
386
+ ],
387
+ dayOfWeek: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis"]
388
+ },
389
+ lv: { //Latvian (Latviešu)
390
+ months: [
391
+ "Janvāris", "Februāris", "Marts", "Aprīlis ", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"
392
+ ],
393
+ dayOfWeekShort: [
394
+ "Sv", "Pr", "Ot", "Tr", "Ct", "Pk", "St"
395
+ ],
396
+ dayOfWeek: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena"]
397
+ },
398
+ mk: { //Macedonian (Македонски)
399
+ months: [
400
+ "јануари", "февруари", "март", "април", "мај", "јуни", "јули", "август", "септември", "октомври", "ноември", "декември"
401
+ ],
402
+ dayOfWeekShort: [
403
+ "нед", "пон", "вто", "сре", "чет", "пет", "саб"
404
+ ],
405
+ dayOfWeek: ["Недела", "Понеделник", "Вторник", "Среда", "Четврток", "Петок", "Сабота"]
406
+ },
407
+ mn: { //Mongolian (Монгол)
408
+ months: [
409
+ "1-р сар", "2-р сар", "3-р сар", "4-р сар", "5-р сар", "6-р сар", "7-р сар", "8-р сар", "9-р сар", "10-р сар", "11-р сар", "12-р сар"
410
+ ],
411
+ dayOfWeekShort: [
412
+ "Дав", "Мяг", "Лха", "Пүр", "Бсн", "Бям", "Ням"
413
+ ],
414
+ dayOfWeek: ["Даваа", "Мягмар", "Лхагва", "Пүрэв", "Баасан", "Бямба", "Ням"]
415
+ },
416
+ 'pt-BR': { //Português(Brasil)
417
+ months: [
418
+ "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
419
+ ],
420
+ dayOfWeekShort: [
421
+ "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"
422
+ ],
423
+ dayOfWeek: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"]
424
+ },
425
+ sk: { //Slovenčina
426
+ months: [
427
+ "Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"
428
+ ],
429
+ dayOfWeekShort: [
430
+ "Ne", "Po", "Ut", "St", "Št", "Pi", "So"
431
+ ],
432
+ dayOfWeek: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"]
433
+ },
434
+ sq: { //Albanian (Shqip)
435
+ months: [
436
+ "Janar", "Shkurt", "Mars", "Prill", "Maj", "Qershor", "Korrik", "Gusht", "Shtator", "Tetor", "Nëntor", "Dhjetor"
437
+ ],
438
+ dayOfWeekShort: [
439
+ "Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Shtu"
440
+ ],
441
+ dayOfWeek: ["E Diel", "E Hënë", "E Martē", "E Mërkurë", "E Enjte", "E Premte", "E Shtunë"]
442
+ },
443
+ 'sr-YU': { //Serbian (Srpski)
444
+ months: [
445
+ "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
446
+ ],
447
+ dayOfWeekShort: [
448
+ "Ned", "Pon", "Uto", "Sre", "čet", "Pet", "Sub"
449
+ ],
450
+ dayOfWeek: ["Nedelja","Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota"]
451
+ },
452
+ sr: { //Serbian Cyrillic (Српски)
453
+ months: [
454
+ "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"
455
+ ],
456
+ dayOfWeekShort: [
457
+ "нед", "пон", "уто", "сре", "чет", "пет", "суб"
458
+ ],
459
+ dayOfWeek: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота"]
460
+ },
461
+ sv: { //Svenska
462
+ months: [
463
+ "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"
464
+ ],
465
+ dayOfWeekShort: [
466
+ "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"
467
+ ],
468
+ dayOfWeek: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"]
469
+ },
470
+ 'zh-TW': { //Traditional Chinese (繁體中文)
471
+ months: [
472
+ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
473
+ ],
474
+ dayOfWeekShort: [
475
+ "日", "一", "二", "三", "四", "五", "六"
476
+ ],
477
+ dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
478
+ },
479
+ zh: { //Simplified Chinese (简体中文)
480
+ months: [
481
+ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
482
+ ],
483
+ dayOfWeekShort: [
484
+ "日", "一", "二", "三", "四", "五", "六"
485
+ ],
486
+ dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
487
+ },
488
+ ug:{ // Uyghur(ئۇيغۇرچە)
489
+ months: [
490
+ "1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي"
491
+ ],
492
+ dayOfWeek: [
493
+ "يەكشەنبە", "دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"
494
+ ]
495
+ },
496
+ he: { //Hebrew (עברית)
497
+ months: [
498
+ 'ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר'
499
+ ],
500
+ dayOfWeekShort: [
501
+ 'א\'', 'ב\'', 'ג\'', 'ד\'', 'ה\'', 'ו\'', 'שבת'
502
+ ],
503
+ dayOfWeek: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"]
504
+ },
505
+ hy: { // Armenian
506
+ months: [
507
+ "Հունվար", "Փետրվար", "Մարտ", "Ապրիլ", "Մայիս", "Հունիս", "Հուլիս", "Օգոստոս", "Սեպտեմբեր", "Հոկտեմբեր", "Նոյեմբեր", "Դեկտեմբեր"
508
+ ],
509
+ dayOfWeekShort: [
510
+ "Կի", "Երկ", "Երք", "Չոր", "Հնգ", "Ուրբ", "Շբթ"
511
+ ],
512
+ dayOfWeek: ["Կիրակի", "Երկուշաբթի", "Երեքշաբթի", "Չորեքշաբթի", "Հինգշաբթի", "Ուրբաթ", "Շաբաթ"]
513
+ },
514
+ kg: { // Kyrgyz
515
+ months: [
516
+ 'Үчтүн айы', 'Бирдин айы', 'Жалган Куран', 'Чын Куран', 'Бугу', 'Кулжа', 'Теке', 'Баш Оона', 'Аяк Оона', 'Тогуздун айы', 'Жетинин айы', 'Бештин айы'
517
+ ],
518
+ dayOfWeekShort: [
519
+ "Жек", "Дүй", "Шей", "Шар", "Бей", "Жум", "Ише"
520
+ ],
521
+ dayOfWeek: [
522
+ "Жекшемб", "Дүйшөмб", "Шейшемб", "Шаршемб", "Бейшемби", "Жума", "Ишенб"
523
+ ]
524
+ },
525
+ rm: { // Romansh
526
+ months: [
527
+ "Schaner", "Favrer", "Mars", "Avrigl", "Matg", "Zercladur", "Fanadur", "Avust", "Settember", "October", "November", "December"
528
+ ],
529
+ dayOfWeekShort: [
530
+ "Du", "Gli", "Ma", "Me", "Gie", "Ve", "So"
531
+ ],
532
+ dayOfWeek: [
533
+ "Dumengia", "Glindesdi", "Mardi", "Mesemna", "Gievgia", "Venderdi", "Sonda"
534
+ ]
535
+ },
536
+ ka: { // Georgian
537
+ months: [
538
+ 'იანვარი', 'თებერვალი', 'მარტი', 'აპრილი', 'მაისი', 'ივნისი', 'ივლისი', 'აგვისტო', 'სექტემბერი', 'ოქტომბერი', 'ნოემბერი', 'დეკემბერი'
539
+ ],
540
+ dayOfWeekShort: [
541
+ "კვ", "ორშ", "სამშ", "ოთხ", "ხუთ", "პარ", "შაბ"
542
+ ],
543
+ dayOfWeek: ["კვირა", "ორშაბათი", "სამშაბათი", "ოთხშაბათი", "ხუთშაბათი", "პარასკევი", "შაბათი"]
544
+ }
545
+ },
546
+
547
+ ownerDocument: document,
548
+ contentWindow: window,
549
+
550
+ value: '',
551
+ rtl: false,
552
+
553
+ format: 'Y/m/d H:i',
554
+ formatTime: 'H:i',
555
+ formatDate: 'Y/m/d',
556
+
557
+ startDate: false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05',
558
+ step: 60,
559
+ monthChangeSpinner: true,
560
+
561
+ closeOnDateSelect: false,
562
+ closeOnTimeSelect: true,
563
+ closeOnWithoutClick: true,
564
+ closeOnInputClick: true,
565
+ openOnFocus: true,
566
+
567
+ timepicker: true,
568
+ datepicker: true,
569
+ weeks: false,
570
+
571
+ defaultTime: false, // use formatTime format (ex. '10:00' for formatTime: 'H:i')
572
+ defaultDate: false, // use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05')
573
+
574
+ minDate: false,
575
+ maxDate: false,
576
+ minTime: false,
577
+ maxTime: false,
578
+ minDateTime: false,
579
+ maxDateTime: false,
580
+
581
+ allowTimes: [],
582
+ opened: false,
583
+ initTime: true,
584
+ inline: false,
585
+ theme: '',
586
+ touchMovedThreshold: 5,
587
+
588
+ onSelectDate: function () {},
589
+ onSelectTime: function () {},
590
+ onChangeMonth: function () {},
591
+ onGetWeekOfYear: function () {},
592
+ onChangeYear: function () {},
593
+ onChangeDateTime: function () {},
594
+ onShow: function () {},
595
+ onClose: function () {},
596
+ onGenerate: function () {},
597
+
598
+ withoutCopyright: true,
599
+ inverseButton: false,
600
+ hours12: false,
601
+ next: 'xdsoft_next',
602
+ prev : 'xdsoft_prev',
603
+ dayOfWeekStart: 0,
604
+ parentID: 'body',
605
+ timeHeightInTimePicker: 25,
606
+ timepickerScrollbar: true,
607
+ todayButton: true,
608
+ prevButton: true,
609
+ nextButton: true,
610
+ defaultSelect: true,
611
+
612
+ scrollMonth: true,
613
+ scrollTime: true,
614
+ scrollInput: true,
615
+
616
+ lazyInit: false,
617
+ mask: false,
618
+ validateOnBlur: true,
619
+ allowBlank: true,
620
+ yearStart: 1950,
621
+ yearEnd: 2050,
622
+ monthStart: 0,
623
+ monthEnd: 11,
624
+ style: '',
625
+ id: '',
626
+ fixed: false,
627
+ roundTime: 'round', // ceil, floor
628
+ className: '',
629
+ weekends: [],
630
+ highlightedDates: [],
631
+ highlightedPeriods: [],
632
+ allowDates : [],
633
+ allowDateRe : null,
634
+ disabledDates : [],
635
+ disabledWeekDays: [],
636
+ yearOffset: 0,
637
+ beforeShowDay: null,
638
+
639
+ enterLikeTab: true,
640
+ showApplyButton: false,
641
+ insideParent: false,
642
+ };
643
+
644
+ var dateHelper = null,
645
+ defaultDateHelper = null,
646
+ globalLocaleDefault = 'en',
647
+ globalLocale = 'en';
648
+
649
+ var dateFormatterOptionsDefault = {
650
+ meridiem: ['AM', 'PM']
651
+ };
652
+
653
+ var initDateFormatter = function(){
654
+ var locale = default_options.i18n[globalLocale],
655
+ opts = {
656
+ days: locale.dayOfWeek,
657
+ daysShort: locale.dayOfWeekShort,
658
+ months: locale.months,
659
+ monthsShort: $.map(locale.months, function(n){ return n.substring(0, 3) })
660
+ };
661
+
662
+ if (typeof DateFormatter === 'function') {
663
+ dateHelper = defaultDateHelper = new DateFormatter({
664
+ dateSettings: $.extend({}, dateFormatterOptionsDefault, opts)
665
+ });
666
+ }
667
+ };
668
+
669
+ var dateFormatters = {
670
+ moment: {
671
+ default_options:{
672
+ format: 'YYYY/MM/DD HH:mm',
673
+ formatDate: 'YYYY/MM/DD',
674
+ formatTime: 'HH:mm',
675
+ },
676
+ formatter: {
677
+ parseDate: function (date, format) {
678
+ if(isFormatStandard(format)){
679
+ return defaultDateHelper.parseDate(date, format);
680
+ }
681
+ var d = moment(date, format);
682
+ return d.isValid() ? d.toDate() : false;
683
+ },
684
+
685
+ formatDate: function (date, format) {
686
+ if(isFormatStandard(format)){
687
+ return defaultDateHelper.formatDate(date, format);
688
+ }
689
+ return moment(date).format(format);
690
+ },
691
+
692
+ formatMask: function(format){
693
+ return format
694
+ .replace(/Y{4}/g, '9999')
695
+ .replace(/Y{2}/g, '99')
696
+ .replace(/M{2}/g, '19')
697
+ .replace(/D{2}/g, '39')
698
+ .replace(/H{2}/g, '29')
699
+ .replace(/m{2}/g, '59')
700
+ .replace(/s{2}/g, '59');
701
+ },
702
+ }
703
+ }
704
+ }
705
+
706
+ // for locale settings
707
+ $.datetimepicker = {
708
+ setLocale: function(locale){
709
+ var newLocale = default_options.i18n[locale] ? locale : globalLocaleDefault;
710
+ if (globalLocale !== newLocale) {
711
+ globalLocale = newLocale;
712
+ // reinit date formatter
713
+ initDateFormatter();
714
+ }
715
+ },
716
+
717
+ setDateFormatter: function(dateFormatter) {
718
+ if(typeof dateFormatter === 'string' && dateFormatters.hasOwnProperty(dateFormatter)){
719
+ var df = dateFormatters[dateFormatter];
720
+ $.extend(default_options, df.default_options);
721
+ dateHelper = df.formatter;
722
+ }
723
+ else {
724
+ dateHelper = dateFormatter;
725
+ }
726
+ },
727
+ };
728
+
729
+ var standardFormats = {
730
+ RFC_2822: 'D, d M Y H:i:s O',
731
+ ATOM: 'Y-m-d\TH:i:sP',
732
+ ISO_8601: 'Y-m-d\TH:i:sO',
733
+ RFC_822: 'D, d M y H:i:s O',
734
+ RFC_850: 'l, d-M-y H:i:s T',
735
+ RFC_1036: 'D, d M y H:i:s O',
736
+ RFC_1123: 'D, d M Y H:i:s O',
737
+ RSS: 'D, d M Y H:i:s O',
738
+ W3C: 'Y-m-d\TH:i:sP'
739
+ }
740
+
741
+ var isFormatStandard = function(format){
742
+ return Object.values(standardFormats).indexOf(format) === -1 ? false : true;
743
+ }
744
+
745
+ $.extend($.datetimepicker, standardFormats);
746
+
747
+ // first init date formatter
748
+ initDateFormatter();
749
+
750
+ // fix for ie8
751
+ if (!window.getComputedStyle) {
752
+ window.getComputedStyle = function (el) {
753
+ this.el = el;
754
+ this.getPropertyValue = function (prop) {
755
+ var re = /(-([a-z]))/g;
756
+ if (prop === 'float') {
757
+ prop = 'styleFloat';
758
+ }
759
+ if (re.test(prop)) {
760
+ prop = prop.replace(re, function (a, b, c) {
761
+ return c.toUpperCase();
762
+ });
763
+ }
764
+ return el.currentStyle[prop] || null;
765
+ };
766
+ return this;
767
+ };
768
+ }
769
+ if (!Array.prototype.indexOf) {
770
+ Array.prototype.indexOf = function (obj, start) {
771
+ var i, j;
772
+ for (i = (start || 0), j = this.length; i < j; i += 1) {
773
+ if (this[i] === obj) { return i; }
774
+ }
775
+ return -1;
776
+ };
777
+ }
778
+
779
+ Date.prototype.countDaysInMonth = function () {
780
+ return new Date(this.getFullYear(), this.getMonth() + 1, 0).getDate();
781
+ };
782
+
783
+ $.fn.xdsoftScroller = function (options, percent) {
784
+ return this.each(function () {
785
+ var timeboxparent = $(this),
786
+ pointerEventToXY = function (e) {
787
+ var out = {x: 0, y: 0},
788
+ touch;
789
+ if (e.type === 'touchstart' || e.type === 'touchmove' || e.type === 'touchend' || e.type === 'touchcancel') {
790
+ touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
791
+ out.x = touch.clientX;
792
+ out.y = touch.clientY;
793
+ } else if (e.type === 'mousedown' || e.type === 'mouseup' || e.type === 'mousemove' || e.type === 'mouseover' || e.type === 'mouseout' || e.type === 'mouseenter' || e.type === 'mouseleave') {
794
+ out.x = e.clientX;
795
+ out.y = e.clientY;
796
+ }
797
+ return out;
798
+ },
799
+ getWheelDelta = function (e) {
800
+ var deltaY = 0;
801
+
802
+ if ('detail' in e) { deltaY = e.detail; }
803
+ if ('wheelDelta' in e) { deltaY = -e.wheelDelta / 120; }
804
+ if ('wheelDeltaY' in e) { deltaY = -e.wheelDeltaY / 120; }
805
+ if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) { deltaY = 0; }
806
+
807
+ deltaY *= 10;
808
+
809
+ if ('deltaY' in e) { deltaY = e.deltaY; }
810
+
811
+ if (deltaY && e.deltaMode) {
812
+ if (e.deltaMode === 1) {
813
+ deltaY *= 40;
814
+ } else {
815
+ deltaY *= 800;
816
+ }
817
+ }
818
+
819
+ return deltaY;
820
+ },
821
+ timebox,
822
+ timeboxTop = 0,
823
+ parentHeight,
824
+ height,
825
+ scrollbar,
826
+ scroller,
827
+ maximumOffset = 100,
828
+ start = false,
829
+ startY = 0,
830
+ startTop = 0,
831
+ h1 = 0,
832
+ touchStart = false,
833
+ startTopScroll = 0,
834
+ calcOffset = function () {};
835
+
836
+ if (percent === 'hide') {
837
+ timeboxparent.find('.xdsoft_scrollbar').hide();
838
+ return;
839
+ }
840
+
841
+ if (!$(this).hasClass('xdsoft_scroller_box')) {
842
+ timebox = timeboxparent.children().eq(0);
843
+ timeboxTop = Math.abs(parseInt(timebox.css('marginTop'), 10));
844
+ parentHeight = timeboxparent[0].clientHeight;
845
+ height = timebox[0].offsetHeight;
846
+ scrollbar = $('<div class="xdsoft_scrollbar"></div>');
847
+ scroller = $('<div class="xdsoft_scroller"></div>');
848
+ scrollbar.append(scroller);
849
+
850
+ timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar);
851
+ calcOffset = function calcOffset(event) {
852
+ var offset = pointerEventToXY(event).y - startY + startTopScroll;
853
+ if (offset < 0) {
854
+ offset = 0;
855
+ }
856
+ if (offset + scroller[0].offsetHeight > h1) {
857
+ offset = h1 - scroller[0].offsetHeight;
858
+ }
859
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [maximumOffset ? offset / maximumOffset : 0]);
860
+ };
861
+
862
+ scroller
863
+ .on('touchstart.xdsoft_scroller mousedown.xdsoft_scroller', function (event) {
864
+ if (!parentHeight) {
865
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
866
+ }
867
+
868
+ startY = pointerEventToXY(event).y;
869
+ startTopScroll = parseInt(scroller.css('marginTop'), 10);
870
+ h1 = scrollbar[0].offsetHeight;
871
+
872
+ if (event.type === 'mousedown' || event.type === 'touchstart') {
873
+ if (options.ownerDocument) {
874
+ $(options.ownerDocument.body).addClass('xdsoft_noselect');
875
+ }
876
+ $([options.ownerDocument.body, options.contentWindow]).on('touchend mouseup.xdsoft_scroller', function arguments_callee() {
877
+ $([options.ownerDocument.body, options.contentWindow]).off('touchend mouseup.xdsoft_scroller', arguments_callee)
878
+ .off('mousemove.xdsoft_scroller', calcOffset)
879
+ .removeClass('xdsoft_noselect');
880
+ });
881
+ $(options.ownerDocument.body).on('mousemove.xdsoft_scroller', calcOffset);
882
+ } else {
883
+ touchStart = true;
884
+ event.stopPropagation();
885
+ event.preventDefault();
886
+ }
887
+ })
888
+ .on('touchmove', function (event) {
889
+ if (touchStart) {
890
+ event.preventDefault();
891
+ calcOffset(event);
892
+ }
893
+ })
894
+ .on('touchend touchcancel', function () {
895
+ touchStart = false;
896
+ startTopScroll = 0;
897
+ });
898
+
899
+ timeboxparent
900
+ .on('scroll_element.xdsoft_scroller', function (event, percentage) {
901
+ if (!parentHeight) {
902
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percentage, true]);
903
+ }
904
+ percentage = percentage > 1 ? 1 : (percentage < 0 || isNaN(percentage)) ? 0 : percentage;
905
+ timeboxTop = parseFloat(Math.abs((timebox[0].offsetHeight - parentHeight) * percentage).toFixed(4));
906
+
907
+ scroller.css('marginTop', maximumOffset * percentage);
908
+ timebox.css('marginTop', -timeboxTop);
909
+ })
910
+ .on('resize_scroll.xdsoft_scroller', function (event, percentage, noTriggerScroll) {
911
+ var percent, sh;
912
+ parentHeight = timeboxparent[0].clientHeight;
913
+ height = timebox[0].offsetHeight;
914
+ percent = parentHeight / height;
915
+ sh = percent * scrollbar[0].offsetHeight;
916
+ if (percent > 1) {
917
+ scroller.hide();
918
+ } else {
919
+ scroller.show();
920
+ scroller.css('height', parseInt(sh > 10 ? sh : 10, 10));
921
+ maximumOffset = scrollbar[0].offsetHeight - scroller[0].offsetHeight;
922
+ if (noTriggerScroll !== true) {
923
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [percentage || timeboxTop / (height - parentHeight)]);
924
+ }
925
+ }
926
+ });
927
+
928
+ timeboxparent.on('mousewheel', function (event) {
929
+ var deltaY = getWheelDelta(event.originalEvent);
930
+ var top = Math.max(0, timeboxTop - deltaY);
931
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [top / (height - parentHeight)]);
932
+ event.stopPropagation();
933
+ return false;
934
+ });
935
+
936
+ timeboxparent.on('touchstart', function (event) {
937
+ start = pointerEventToXY(event);
938
+ startTop = timeboxTop;
939
+ });
940
+
941
+ timeboxparent.on('touchmove', function (event) {
942
+ if (start) {
943
+ event.preventDefault();
944
+ var coord = pointerEventToXY(event);
945
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [(startTop - (coord.y - start.y)) / (height - parentHeight)]);
946
+ }
947
+ });
948
+
949
+ timeboxparent.on('touchend touchcancel', function () {
950
+ start = false;
951
+ startTop = 0;
952
+ });
953
+ }
954
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
955
+ });
956
+ };
957
+
958
+ $.fn.datetimepicker = function (opt, opt2) {
959
+ var result = this,
960
+ KEY0 = 48,
961
+ KEY9 = 57,
962
+ _KEY0 = 96,
963
+ _KEY9 = 105,
964
+ CTRLKEY = 17,
965
+ CMDKEY = 91,
966
+ DEL = 46,
967
+ ENTER = 13,
968
+ ESC = 27,
969
+ BACKSPACE = 8,
970
+ ARROWLEFT = 37,
971
+ ARROWUP = 38,
972
+ ARROWRIGHT = 39,
973
+ ARROWDOWN = 40,
974
+ TAB = 9,
975
+ F5 = 116,
976
+ AKEY = 65,
977
+ CKEY = 67,
978
+ VKEY = 86,
979
+ ZKEY = 90,
980
+ YKEY = 89,
981
+ ctrlDown = false,
982
+ cmdDown = false,
983
+ options = ($.isPlainObject(opt) || !opt) ? $.extend(true, {}, default_options, opt) : $.extend(true, {}, default_options),
984
+
985
+ lazyInitTimer = 0,
986
+ createDateTimePicker,
987
+ destroyDateTimePicker,
988
+
989
+ lazyInit = function (input) {
990
+ input
991
+ .on('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', function initOnActionCallback() {
992
+ if (input.is(':disabled') || input.data('xdsoft_datetimepicker')) {
993
+ return;
994
+ }
995
+ clearTimeout(lazyInitTimer);
996
+ lazyInitTimer = setTimeout(function () {
997
+
998
+ if (!input.data('xdsoft_datetimepicker')) {
999
+ createDateTimePicker(input);
1000
+ }
1001
+ input
1002
+ .off('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', initOnActionCallback)
1003
+ .trigger('open.xdsoft');
1004
+ }, 100);
1005
+ });
1006
+ };
1007
+
1008
+ createDateTimePicker = function (input) {
1009
+ var datetimepicker = $('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),
1010
+ xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),
1011
+ datepicker = $('<div class="xdsoft_datepicker active"></div>'),
1012
+ month_picker = $('<div class="xdsoft_monthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button>' +
1013
+ '<div class="xdsoft_label xdsoft_month"><span></span><i></i></div>' +
1014
+ '<div class="xdsoft_label xdsoft_year"><span></span><i></i></div>' +
1015
+ '<button type="button" class="xdsoft_next"></button></div>'),
1016
+ calendar = $('<div class="xdsoft_calendar"></div>'),
1017
+ timepicker = $('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),
1018
+ timeboxparent = timepicker.find('.xdsoft_time_box').eq(0),
1019
+ timebox = $('<div class="xdsoft_time_variant"></div>'),
1020
+ applyButton = $('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),
1021
+
1022
+ monthselect = $('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),
1023
+ yearselect = $('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),
1024
+ triggerAfterOpen = false,
1025
+ XDSoft_datetime,
1026
+
1027
+ xchangeTimer,
1028
+ timerclick,
1029
+ current_time_index,
1030
+ setPos,
1031
+ timer = 0,
1032
+ _xdsoft_datetime,
1033
+ forEachAncestorOf;
1034
+
1035
+ if (options.id) {
1036
+ datetimepicker.attr('id', options.id);
1037
+ }
1038
+ if (options.style) {
1039
+ datetimepicker.attr('style', options.style);
1040
+ }
1041
+ if (options.weeks) {
1042
+ datetimepicker.addClass('xdsoft_showweeks');
1043
+ }
1044
+ if (options.rtl) {
1045
+ datetimepicker.addClass('xdsoft_rtl');
1046
+ }
1047
+
1048
+ datetimepicker.addClass('xdsoft_' + options.theme);
1049
+ datetimepicker.addClass(options.className);
1050
+
1051
+ month_picker
1052
+ .find('.xdsoft_month span')
1053
+ .after(monthselect);
1054
+ month_picker
1055
+ .find('.xdsoft_year span')
1056
+ .after(yearselect);
1057
+
1058
+ month_picker
1059
+ .find('.xdsoft_month,.xdsoft_year')
1060
+ .on('touchstart mousedown.xdsoft', function (event) {
1061
+ var select = $(this).find('.xdsoft_select').eq(0),
1062
+ val = 0,
1063
+ top = 0,
1064
+ visible = select.is(':visible'),
1065
+ items,
1066
+ i;
1067
+
1068
+ month_picker
1069
+ .find('.xdsoft_select')
1070
+ .hide();
1071
+ if (_xdsoft_datetime.currentTime) {
1072
+ val = _xdsoft_datetime.currentTime[$(this).hasClass('xdsoft_month') ? 'getMonth' : 'getFullYear']();
1073
+ }
1074
+
1075
+ select[visible ? 'hide' : 'show']();
1076
+ for (items = select.find('div.xdsoft_option'), i = 0; i < items.length; i += 1) {
1077
+ if (items.eq(i).data('value') === val) {
1078
+ break;
1079
+ } else {
1080
+ top += items[0].offsetHeight;
1081
+ }
1082
+ }
1083
+
1084
+ select.xdsoftScroller(options, top / (select.children()[0].offsetHeight - (select[0].clientHeight)));
1085
+ event.stopPropagation();
1086
+ return false;
1087
+ });
1088
+
1089
+ var handleTouchMoved = function (event) {
1090
+ var evt = event.originalEvent;
1091
+ var touchPosition = evt.touches ? evt.touches[0] : evt;
1092
+ this.touchStartPosition = this.touchStartPosition || touchPosition;
1093
+ var xMovement = Math.abs(this.touchStartPosition.clientX - touchPosition.clientX);
1094
+ var yMovement = Math.abs(this.touchStartPosition.clientY - touchPosition.clientY);
1095
+ var distance = Math.sqrt(xMovement * xMovement + yMovement * yMovement);
1096
+ if(distance > options.touchMovedThreshold) {
1097
+ this.touchMoved = true;
1098
+ }
1099
+ }
1100
+
1101
+ month_picker
1102
+ .find('.xdsoft_select')
1103
+ .xdsoftScroller(options)
1104
+ .on('touchstart mousedown.xdsoft', function (event) {
1105
+ var evt = event.originalEvent;
1106
+ this.touchMoved = false;
1107
+ this.touchStartPosition = evt.touches ? evt.touches[0] : evt;
1108
+ event.stopPropagation();
1109
+ event.preventDefault();
1110
+ })
1111
+ .on('touchmove', '.xdsoft_option', handleTouchMoved)
1112
+ .on('touchend mousedown.xdsoft', '.xdsoft_option', function () {
1113
+ if (!this.touchMoved) {
1114
+ if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) {
1115
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
1116
+ }
1117
+
1118
+ var year = _xdsoft_datetime.currentTime.getFullYear();
1119
+ if (_xdsoft_datetime && _xdsoft_datetime.currentTime) {
1120
+ _xdsoft_datetime.currentTime[$(this).parent().parent().hasClass('xdsoft_monthselect') ? 'setMonth' : 'setFullYear']($(this).data('value'));
1121
+ }
1122
+
1123
+ $(this).parent().parent().hide();
1124
+
1125
+ datetimepicker.trigger('xchange.xdsoft');
1126
+ if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
1127
+ options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1128
+ }
1129
+
1130
+ if (year !== _xdsoft_datetime.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) {
1131
+ options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1132
+ }
1133
+ }
1134
+ });
1135
+
1136
+ datetimepicker.getValue = function () {
1137
+ return _xdsoft_datetime.getCurrentTime();
1138
+ };
1139
+
1140
+ datetimepicker.setOptions = function (_options) {
1141
+ var highlightedDates = {};
1142
+
1143
+ options = $.extend(true, {}, options, _options);
1144
+
1145
+ if (_options.allowTimes && $.isArray(_options.allowTimes) && _options.allowTimes.length) {
1146
+ options.allowTimes = $.extend(true, [], _options.allowTimes);
1147
+ }
1148
+
1149
+ if (_options.weekends && $.isArray(_options.weekends) && _options.weekends.length) {
1150
+ options.weekends = $.extend(true, [], _options.weekends);
1151
+ }
1152
+
1153
+ if (_options.allowDates && $.isArray(_options.allowDates) && _options.allowDates.length) {
1154
+ options.allowDates = $.extend(true, [], _options.allowDates);
1155
+ }
1156
+
1157
+ if (_options.allowDateRe && Object.prototype.toString.call(_options.allowDateRe)==="[object String]") {
1158
+ options.allowDateRe = new RegExp(_options.allowDateRe);
1159
+ }
1160
+
1161
+ if (_options.highlightedDates && $.isArray(_options.highlightedDates) && _options.highlightedDates.length) {
1162
+ $.each(_options.highlightedDates, function (index, value) {
1163
+ var splitData = $.map(value.split(','), $.trim),
1164
+ exDesc,
1165
+ hDate = new HighlightedDate(dateHelper.parseDate(splitData[0], options.formatDate), splitData[1], splitData[2]), // date, desc, style
1166
+ keyDate = dateHelper.formatDate(hDate.date, options.formatDate);
1167
+ if (highlightedDates[keyDate] !== undefined) {
1168
+ exDesc = highlightedDates[keyDate].desc;
1169
+ if (exDesc && exDesc.length && hDate.desc && hDate.desc.length) {
1170
+ highlightedDates[keyDate].desc = exDesc + "\n" + hDate.desc;
1171
+ }
1172
+ } else {
1173
+ highlightedDates[keyDate] = hDate;
1174
+ }
1175
+ });
1176
+
1177
+ options.highlightedDates = $.extend(true, [], highlightedDates);
1178
+ }
1179
+
1180
+ if (_options.highlightedPeriods && $.isArray(_options.highlightedPeriods) && _options.highlightedPeriods.length) {
1181
+ highlightedDates = $.extend(true, [], options.highlightedDates);
1182
+ $.each(_options.highlightedPeriods, function (index, value) {
1183
+ var dateTest, // start date
1184
+ dateEnd,
1185
+ desc,
1186
+ hDate,
1187
+ keyDate,
1188
+ exDesc,
1189
+ style;
1190
+ if ($.isArray(value)) {
1191
+ dateTest = value[0];
1192
+ dateEnd = value[1];
1193
+ desc = value[2];
1194
+ style = value[3];
1195
+ }
1196
+ else {
1197
+ var splitData = $.map(value.split(','), $.trim);
1198
+ dateTest = dateHelper.parseDate(splitData[0], options.formatDate);
1199
+ dateEnd = dateHelper.parseDate(splitData[1], options.formatDate);
1200
+ desc = splitData[2];
1201
+ style = splitData[3];
1202
+ }
1203
+
1204
+ while (dateTest <= dateEnd) {
1205
+ hDate = new HighlightedDate(dateTest, desc, style);
1206
+ keyDate = dateHelper.formatDate(dateTest, options.formatDate);
1207
+ dateTest.setDate(dateTest.getDate() + 1);
1208
+ if (highlightedDates[keyDate] !== undefined) {
1209
+ exDesc = highlightedDates[keyDate].desc;
1210
+ if (exDesc && exDesc.length && hDate.desc && hDate.desc.length) {
1211
+ highlightedDates[keyDate].desc = exDesc + "\n" + hDate.desc;
1212
+ }
1213
+ } else {
1214
+ highlightedDates[keyDate] = hDate;
1215
+ }
1216
+ }
1217
+ });
1218
+
1219
+ options.highlightedDates = $.extend(true, [], highlightedDates);
1220
+ }
1221
+
1222
+ if (_options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length) {
1223
+ options.disabledDates = $.extend(true, [], _options.disabledDates);
1224
+ }
1225
+
1226
+ if (_options.disabledWeekDays && $.isArray(_options.disabledWeekDays) && _options.disabledWeekDays.length) {
1227
+ options.disabledWeekDays = $.extend(true, [], _options.disabledWeekDays);
1228
+ }
1229
+
1230
+ if ((options.open || options.opened) && (!options.inline)) {
1231
+ input.trigger('open.xdsoft');
1232
+ }
1233
+
1234
+ if (options.inline) {
1235
+ triggerAfterOpen = true;
1236
+ datetimepicker.addClass('xdsoft_inline');
1237
+ input.after(datetimepicker).hide();
1238
+ }
1239
+
1240
+ if (options.inverseButton) {
1241
+ options.next = 'xdsoft_prev';
1242
+ options.prev = 'xdsoft_next';
1243
+ }
1244
+
1245
+ if (options.datepicker) {
1246
+ datepicker.addClass('active');
1247
+ } else {
1248
+ datepicker.removeClass('active');
1249
+ }
1250
+
1251
+ if (options.timepicker) {
1252
+ timepicker.addClass('active');
1253
+ } else {
1254
+ timepicker.removeClass('active');
1255
+ }
1256
+
1257
+ if (options.value) {
1258
+ _xdsoft_datetime.setCurrentTime(options.value);
1259
+ if (input && input.val) {
1260
+ input.val(_xdsoft_datetime.str);
1261
+ }
1262
+ }
1263
+
1264
+ if (isNaN(options.dayOfWeekStart)) {
1265
+ options.dayOfWeekStart = 0;
1266
+ } else {
1267
+ options.dayOfWeekStart = parseInt(options.dayOfWeekStart, 10) % 7;
1268
+ }
1269
+
1270
+ if (!options.timepickerScrollbar) {
1271
+ timeboxparent.xdsoftScroller(options, 'hide');
1272
+ }
1273
+
1274
+ if (options.minDate && /^[\+\-](.*)$/.test(options.minDate)) {
1275
+ options.minDate = dateHelper.formatDate(_xdsoft_datetime.strToDateTime(options.minDate), options.formatDate);
1276
+ }
1277
+
1278
+ if (options.maxDate && /^[\+\-](.*)$/.test(options.maxDate)) {
1279
+ options.maxDate = dateHelper.formatDate(_xdsoft_datetime.strToDateTime(options.maxDate), options.formatDate);
1280
+ }
1281
+
1282
+ if (options.minDateTime && /^\+(.*)$/.test(options.minDateTime)) {
1283
+ options.minDateTime = _xdsoft_datetime.strToDateTime(options.minDateTime).dateFormat(options.formatDate);
1284
+ }
1285
+
1286
+ if (options.maxDateTime && /^\+(.*)$/.test(options.maxDateTime)) {
1287
+ options.maxDateTime = _xdsoft_datetime.strToDateTime(options.maxDateTime).dateFormat(options.formatDate);
1288
+ }
1289
+
1290
+ applyButton.toggle(options.showApplyButton);
1291
+
1292
+ month_picker
1293
+ .find('.xdsoft_today_button')
1294
+ .css('visibility', !options.todayButton ? 'hidden' : 'visible');
1295
+
1296
+ month_picker
1297
+ .find('.' + options.prev)
1298
+ .css('visibility', !options.prevButton ? 'hidden' : 'visible');
1299
+
1300
+ month_picker
1301
+ .find('.' + options.next)
1302
+ .css('visibility', !options.nextButton ? 'hidden' : 'visible');
1303
+
1304
+ setMask(options);
1305
+
1306
+ if (options.validateOnBlur) {
1307
+ input
1308
+ .off('blur.xdsoft')
1309
+ .on('blur.xdsoft', function () {
1310
+ if (options.allowBlank && (!$.trim($(this).val()).length ||
1311
+ (typeof options.mask === "string" && $.trim($(this).val()) === options.mask.replace(/[0-9]/g, '_')))) {
1312
+ $(this).val(null);
1313
+ datetimepicker.data('xdsoft_datetime').empty();
1314
+ } else {
1315
+ var d = dateHelper.parseDate($(this).val(), options.format);
1316
+ if (d) { // parseDate() may skip some invalid parts like date or time, so make it clear for user: show parsed date/time
1317
+ $(this).val(dateHelper.formatDate(d, options.format));
1318
+ } else {
1319
+ var splittedHours = +([$(this).val()[0], $(this).val()[1]].join('')),
1320
+ splittedMinutes = +([$(this).val()[2], $(this).val()[3]].join(''));
1321
+
1322
+ // parse the numbers as 0312 => 03:12
1323
+ if (!options.datepicker && options.timepicker && splittedHours >= 0 && splittedHours < 24 && splittedMinutes >= 0 && splittedMinutes < 60) {
1324
+ $(this).val([splittedHours, splittedMinutes].map(function (item) {
1325
+ return item > 9 ? item : '0' + item;
1326
+ }).join(':'));
1327
+ } else {
1328
+ $(this).val(dateHelper.formatDate(_xdsoft_datetime.now(), options.format));
1329
+ }
1330
+ }
1331
+ datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val());
1332
+ }
1333
+
1334
+ datetimepicker.trigger('changedatetime.xdsoft');
1335
+ datetimepicker.trigger('close.xdsoft');
1336
+ });
1337
+ }
1338
+ options.dayOfWeekStartPrev = (options.dayOfWeekStart === 0) ? 6 : options.dayOfWeekStart - 1;
1339
+
1340
+ datetimepicker
1341
+ .trigger('xchange.xdsoft')
1342
+ .trigger('afterOpen.xdsoft');
1343
+ };
1344
+
1345
+ datetimepicker
1346
+ .data('options', options)
1347
+ .on('touchstart mousedown.xdsoft', function (event) {
1348
+ event.stopPropagation();
1349
+ event.preventDefault();
1350
+ yearselect.hide();
1351
+ monthselect.hide();
1352
+ return false;
1353
+ });
1354
+
1355
+ //scroll_element = timepicker.find('.xdsoft_time_box');
1356
+ timeboxparent.append(timebox);
1357
+ timeboxparent.xdsoftScroller(options);
1358
+
1359
+ datetimepicker.on('afterOpen.xdsoft', function () {
1360
+ timeboxparent.xdsoftScroller(options);
1361
+ });
1362
+
1363
+ datetimepicker
1364
+ .append(datepicker)
1365
+ .append(timepicker);
1366
+
1367
+ if (options.withoutCopyright !== true) {
1368
+ datetimepicker
1369
+ .append(xdsoft_copyright);
1370
+ }
1371
+
1372
+ datepicker
1373
+ .append(month_picker)
1374
+ .append(calendar)
1375
+ .append(applyButton);
1376
+
1377
+ if (options.insideParent) {
1378
+ $(input).parent().append(datetimepicker);
1379
+ } else {
1380
+ $(options.parentID).append(datetimepicker);
1381
+ }
1382
+
1383
+ XDSoft_datetime = function () {
1384
+ var _this = this;
1385
+ _this.now = function (norecursion) {
1386
+ var d = new Date(),
1387
+ date,
1388
+ time;
1389
+
1390
+ if (!norecursion && options.defaultDate) {
1391
+ date = _this.strToDateTime(options.defaultDate);
1392
+ d.setFullYear(date.getFullYear());
1393
+ d.setMonth(date.getMonth());
1394
+ d.setDate(date.getDate());
1395
+ }
1396
+
1397
+ d.setFullYear(d.getFullYear());
1398
+
1399
+ if (!norecursion && options.defaultTime) {
1400
+ time = _this.strtotime(options.defaultTime);
1401
+ d.setHours(time.getHours());
1402
+ d.setMinutes(time.getMinutes());
1403
+ d.setSeconds(time.getSeconds());
1404
+ d.setMilliseconds(time.getMilliseconds());
1405
+ }
1406
+ return d;
1407
+ };
1408
+
1409
+ _this.isValidDate = function (d) {
1410
+ if (Object.prototype.toString.call(d) !== "[object Date]") {
1411
+ return false;
1412
+ }
1413
+ return !isNaN(d.getTime());
1414
+ };
1415
+
1416
+ _this.setCurrentTime = function (dTime, requireValidDate) {
1417
+ if (typeof dTime === 'string') {
1418
+ _this.currentTime = _this.strToDateTime(dTime);
1419
+ }
1420
+ else if (_this.isValidDate(dTime)) {
1421
+ _this.currentTime = dTime;
1422
+ }
1423
+ else if (!dTime && !requireValidDate && options.allowBlank && !options.inline) {
1424
+ _this.currentTime = null;
1425
+ }
1426
+ else {
1427
+ _this.currentTime = _this.now();
1428
+ }
1429
+
1430
+ datetimepicker.trigger('xchange.xdsoft');
1431
+ };
1432
+
1433
+ _this.empty = function () {
1434
+ _this.currentTime = null;
1435
+ };
1436
+
1437
+ _this.getCurrentTime = function () {
1438
+ return _this.currentTime;
1439
+ };
1440
+
1441
+ _this.nextMonth = function () {
1442
+
1443
+ if (_this.currentTime === undefined || _this.currentTime === null) {
1444
+ _this.currentTime = _this.now();
1445
+ }
1446
+
1447
+ var month = _this.currentTime.getMonth() + 1,
1448
+ year;
1449
+ if (month === 12) {
1450
+ _this.currentTime.setFullYear(_this.currentTime.getFullYear() + 1);
1451
+ month = 0;
1452
+ }
1453
+
1454
+ year = _this.currentTime.getFullYear();
1455
+
1456
+ _this.currentTime.setDate(
1457
+ Math.min(
1458
+ new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(),
1459
+ _this.currentTime.getDate()
1460
+ )
1461
+ );
1462
+ _this.currentTime.setMonth(month);
1463
+
1464
+ if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
1465
+ options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1466
+ }
1467
+
1468
+ if (year !== _this.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) {
1469
+ options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1470
+ }
1471
+
1472
+ datetimepicker.trigger('xchange.xdsoft');
1473
+ return month;
1474
+ };
1475
+
1476
+ _this.prevMonth = function () {
1477
+
1478
+ if (_this.currentTime === undefined || _this.currentTime === null) {
1479
+ _this.currentTime = _this.now();
1480
+ }
1481
+
1482
+ var month = _this.currentTime.getMonth() - 1;
1483
+ if (month === -1) {
1484
+ _this.currentTime.setFullYear(_this.currentTime.getFullYear() - 1);
1485
+ month = 11;
1486
+ }
1487
+ _this.currentTime.setDate(
1488
+ Math.min(
1489
+ new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(),
1490
+ _this.currentTime.getDate()
1491
+ )
1492
+ );
1493
+ _this.currentTime.setMonth(month);
1494
+ if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
1495
+ options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1496
+ }
1497
+ datetimepicker.trigger('xchange.xdsoft');
1498
+ return month;
1499
+ };
1500
+
1501
+ _this.getWeekOfYear = function (datetime) {
1502
+ if (options.onGetWeekOfYear && $.isFunction(options.onGetWeekOfYear)) {
1503
+ var week = options.onGetWeekOfYear.call(datetimepicker, datetime);
1504
+ if (typeof week !== 'undefined') {
1505
+ return week;
1506
+ }
1507
+ }
1508
+ var onejan = new Date(datetime.getFullYear(), 0, 1);
1509
+
1510
+ //First week of the year is th one with the first Thursday according to ISO8601
1511
+ if (onejan.getDay() !== 4) {
1512
+ onejan.setMonth(0, 1 + ((4 - onejan.getDay()+ 7) % 7));
1513
+ }
1514
+
1515
+ return Math.ceil((((datetime - onejan) / 86400000) + onejan.getDay() + 1) / 7);
1516
+ };
1517
+
1518
+ _this.strToDateTime = function (sDateTime) {
1519
+ var tmpDate = [], timeOffset, currentTime;
1520
+
1521
+ if (sDateTime && sDateTime instanceof Date && _this.isValidDate(sDateTime)) {
1522
+ return sDateTime;
1523
+ }
1524
+
1525
+ tmpDate = /^([+-]{1})(.*)$/.exec(sDateTime);
1526
+
1527
+ if (tmpDate) {
1528
+ tmpDate[2] = dateHelper.parseDate(tmpDate[2], options.formatDate);
1529
+ }
1530
+
1531
+ if (tmpDate && tmpDate[2]) {
1532
+ timeOffset = tmpDate[2].getTime() - (tmpDate[2].getTimezoneOffset()) * 60000;
1533
+ currentTime = new Date((_this.now(true)).getTime() + parseInt(tmpDate[1] + '1', 10) * timeOffset);
1534
+ } else {
1535
+ currentTime = sDateTime ? dateHelper.parseDate(sDateTime, options.format) : _this.now();
1536
+ }
1537
+
1538
+ if (!_this.isValidDate(currentTime)) {
1539
+ currentTime = _this.now();
1540
+ }
1541
+
1542
+ return currentTime;
1543
+ };
1544
+
1545
+ _this.strToDate = function (sDate) {
1546
+ if (sDate && sDate instanceof Date && _this.isValidDate(sDate)) {
1547
+ return sDate;
1548
+ }
1549
+
1550
+ var currentTime = sDate ? dateHelper.parseDate(sDate, options.formatDate) : _this.now(true);
1551
+ if (!_this.isValidDate(currentTime)) {
1552
+ currentTime = _this.now(true);
1553
+ }
1554
+ return currentTime;
1555
+ };
1556
+
1557
+ _this.strtotime = function (sTime) {
1558
+ if (sTime && sTime instanceof Date && _this.isValidDate(sTime)) {
1559
+ return sTime;
1560
+ }
1561
+ var currentTime = sTime ? dateHelper.parseDate(sTime, options.formatTime) : _this.now(true);
1562
+ if (!_this.isValidDate(currentTime)) {
1563
+ currentTime = _this.now(true);
1564
+ }
1565
+ return currentTime;
1566
+ };
1567
+
1568
+ _this.str = function () {
1569
+ var format = options.format;
1570
+ if (options.yearOffset) {
1571
+ format = format.replace('Y', _this.currentTime.getFullYear() + options.yearOffset);
1572
+ format = format.replace('y', String(_this.currentTime.getFullYear() + options.yearOffset).substring(2, 4));
1573
+ }
1574
+ return dateHelper.formatDate(_this.currentTime, format);
1575
+ };
1576
+ _this.currentTime = this.now();
1577
+ };
1578
+
1579
+ _xdsoft_datetime = new XDSoft_datetime();
1580
+
1581
+ applyButton.on('touchend click', function (e) {//pathbrite
1582
+ e.preventDefault();
1583
+ datetimepicker.data('changed', true);
1584
+ _xdsoft_datetime.setCurrentTime(getCurrentValue());
1585
+ input.val(_xdsoft_datetime.str());
1586
+ datetimepicker.trigger('close.xdsoft');
1587
+ });
1588
+ month_picker
1589
+ .find('.xdsoft_today_button')
1590
+ .on('touchend mousedown.xdsoft', function () {
1591
+ datetimepicker.data('changed', true);
1592
+ _xdsoft_datetime.setCurrentTime(0, true);
1593
+ datetimepicker.trigger('afterOpen.xdsoft');
1594
+ }).on('dblclick.xdsoft', function () {
1595
+ var currentDate = _xdsoft_datetime.getCurrentTime(), minDate, maxDate;
1596
+ currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());
1597
+ minDate = _xdsoft_datetime.strToDate(options.minDate);
1598
+ minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
1599
+ if (currentDate < minDate) {
1600
+ return;
1601
+ }
1602
+ maxDate = _xdsoft_datetime.strToDate(options.maxDate);
1603
+ maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate());
1604
+ if (currentDate > maxDate) {
1605
+ return;
1606
+ }
1607
+ input.val(_xdsoft_datetime.str());
1608
+ input.trigger('change');
1609
+ datetimepicker.trigger('close.xdsoft');
1610
+ });
1611
+ month_picker
1612
+ .find('.xdsoft_prev,.xdsoft_next')
1613
+ .on('touchend mousedown.xdsoft', function () {
1614
+ var $this = $(this),
1615
+ timer = 0,
1616
+ stop = false;
1617
+
1618
+ (function arguments_callee1(v) {
1619
+ if ($this.hasClass(options.next)) {
1620
+ _xdsoft_datetime.nextMonth();
1621
+ } else if ($this.hasClass(options.prev)) {
1622
+ _xdsoft_datetime.prevMonth();
1623
+ }
1624
+ if (options.monthChangeSpinner) {
1625
+ if (!stop) {
1626
+ timer = setTimeout(arguments_callee1, v || 100);
1627
+ }
1628
+ }
1629
+ }(500));
1630
+
1631
+ $([options.ownerDocument.body, options.contentWindow]).on('touchend mouseup.xdsoft', function arguments_callee2() {
1632
+ clearTimeout(timer);
1633
+ stop = true;
1634
+ $([options.ownerDocument.body, options.contentWindow]).off('touchend mouseup.xdsoft', arguments_callee2);
1635
+ });
1636
+ });
1637
+
1638
+ timepicker
1639
+ .find('.xdsoft_prev,.xdsoft_next')
1640
+ .on('touchend mousedown.xdsoft', function () {
1641
+ var $this = $(this),
1642
+ timer = 0,
1643
+ stop = false,
1644
+ period = 110;
1645
+ (function arguments_callee4(v) {
1646
+ var pheight = timeboxparent[0].clientHeight,
1647
+ height = timebox[0].offsetHeight,
1648
+ top = Math.abs(parseInt(timebox.css('marginTop'), 10));
1649
+ if ($this.hasClass(options.next) && (height - pheight) - options.timeHeightInTimePicker >= top) {
1650
+ timebox.css('marginTop', '-' + (top + options.timeHeightInTimePicker) + 'px');
1651
+ } else if ($this.hasClass(options.prev) && top - options.timeHeightInTimePicker >= 0) {
1652
+ timebox.css('marginTop', '-' + (top - options.timeHeightInTimePicker) + 'px');
1653
+ }
1654
+ /**
1655
+ * Fixed bug:
1656
+ * When using css3 transition, it will cause a bug that you cannot scroll the timepicker list.
1657
+ * The reason is that the transition-duration time, if you set it to 0, all things fine, otherwise, this
1658
+ * would cause a bug when you use jquery.css method.
1659
+ * Let's say: * { transition: all .5s ease; }
1660
+ * jquery timebox.css('marginTop') will return the original value which is before you clicking the next/prev button,
1661
+ * meanwhile the timebox[0].style.marginTop will return the right value which is after you clicking the
1662
+ * next/prev button.
1663
+ *
1664
+ * What we should do:
1665
+ * Replace timebox.css('marginTop') with timebox[0].style.marginTop.
1666
+ */
1667
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [Math.abs(parseInt(timebox[0].style.marginTop, 10) / (height - pheight))]);
1668
+ period = (period > 10) ? 10 : period - 10;
1669
+ if (!stop) {
1670
+ timer = setTimeout(arguments_callee4, v || period);
1671
+ }
1672
+ }(500));
1673
+ $([options.ownerDocument.body, options.contentWindow]).on('touchend mouseup.xdsoft', function arguments_callee5() {
1674
+ clearTimeout(timer);
1675
+ stop = true;
1676
+ $([options.ownerDocument.body, options.contentWindow])
1677
+ .off('touchend mouseup.xdsoft', arguments_callee5);
1678
+ });
1679
+ });
1680
+
1681
+ xchangeTimer = 0;
1682
+ // base handler - generating a calendar and timepicker
1683
+ datetimepicker
1684
+ .on('xchange.xdsoft', function (event) {
1685
+ clearTimeout(xchangeTimer);
1686
+ xchangeTimer = setTimeout(function () {
1687
+
1688
+ if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) {
1689
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
1690
+ }
1691
+
1692
+ var table = '',
1693
+ start = new Date(_xdsoft_datetime.currentTime.getFullYear(), _xdsoft_datetime.currentTime.getMonth(), 1, 12, 0, 0),
1694
+ i = 0,
1695
+ j,
1696
+ today = _xdsoft_datetime.now(),
1697
+ maxDate = false,
1698
+ minDate = false,
1699
+ minDateTime = false,
1700
+ maxDateTime = false,
1701
+ hDate,
1702
+ day,
1703
+ d,
1704
+ y,
1705
+ m,
1706
+ w,
1707
+ classes = [],
1708
+ customDateSettings,
1709
+ newRow = true,
1710
+ time = '',
1711
+ h,
1712
+ line_time,
1713
+ description;
1714
+
1715
+ while (start.getDay() !== options.dayOfWeekStart) {
1716
+ start.setDate(start.getDate() - 1);
1717
+ }
1718
+
1719
+ table += '<table><thead><tr>';
1720
+
1721
+ if (options.weeks) {
1722
+ table += '<th></th>';
1723
+ }
1724
+
1725
+ for (j = 0; j < 7; j += 1) {
1726
+ table += '<th>' + options.i18n[globalLocale].dayOfWeekShort[(j + options.dayOfWeekStart) % 7] + '</th>';
1727
+ }
1728
+
1729
+ table += '</tr></thead>';
1730
+ table += '<tbody>';
1731
+
1732
+ if (options.maxDate !== false) {
1733
+ maxDate = _xdsoft_datetime.strToDate(options.maxDate);
1734
+ maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate(), 23, 59, 59, 999);
1735
+ }
1736
+
1737
+ if (options.minDate !== false) {
1738
+ minDate = _xdsoft_datetime.strToDate(options.minDate);
1739
+ minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
1740
+ }
1741
+
1742
+ if (options.minDateTime !== false) {
1743
+ minDateTime = _xdsoft_datetime.strToDate(options.minDateTime);
1744
+ minDateTime = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), minDateTime.getHours(), minDateTime.getMinutes(), minDateTime.getSeconds());
1745
+ }
1746
+
1747
+ if (options.maxDateTime !== false) {
1748
+ maxDateTime = _xdsoft_datetime.strToDate(options.maxDateTime);
1749
+ maxDateTime = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), maxDateTime.getHours(), maxDateTime.getMinutes(), maxDateTime.getSeconds());
1750
+ }
1751
+
1752
+ var maxDateTimeDay;
1753
+ if (maxDateTime !== false) {
1754
+ maxDateTimeDay = ((maxDateTime.getFullYear() * 12) + maxDateTime.getMonth()) * 31 + maxDateTime.getDate();
1755
+ }
1756
+
1757
+ while (i < _xdsoft_datetime.currentTime.countDaysInMonth() || start.getDay() !== options.dayOfWeekStart || _xdsoft_datetime.currentTime.getMonth() === start.getMonth()) {
1758
+ classes = [];
1759
+ i += 1;
1760
+
1761
+ day = start.getDay();
1762
+ d = start.getDate();
1763
+ y = start.getFullYear();
1764
+ m = start.getMonth();
1765
+ w = _xdsoft_datetime.getWeekOfYear(start);
1766
+ description = '';
1767
+
1768
+ classes.push('xdsoft_date');
1769
+
1770
+ if (options.beforeShowDay && $.isFunction(options.beforeShowDay.call)) {
1771
+ customDateSettings = options.beforeShowDay.call(datetimepicker, start);
1772
+ } else {
1773
+ customDateSettings = null;
1774
+ }
1775
+
1776
+ if(options.allowDateRe && Object.prototype.toString.call(options.allowDateRe) === "[object RegExp]"){
1777
+ if(!options.allowDateRe.test(dateHelper.formatDate(start, options.formatDate))){
1778
+ classes.push('xdsoft_disabled');
1779
+ }
1780
+ }
1781
+
1782
+ if(options.allowDates && options.allowDates.length>0){
1783
+ if(options.allowDates.indexOf(dateHelper.formatDate(start, options.formatDate)) === -1){
1784
+ classes.push('xdsoft_disabled');
1785
+ }
1786
+ }
1787
+
1788
+ var currentDay = ((start.getFullYear() * 12) + start.getMonth()) * 31 + start.getDate();
1789
+ if ((maxDate !== false && start > maxDate) || (minDateTime !== false && start < minDateTime) || (minDate !== false && start < minDate) || (maxDateTime !== false && currentDay > maxDateTimeDay) || (customDateSettings && customDateSettings[0] === false)) {
1790
+ classes.push('xdsoft_disabled');
1791
+ }
1792
+
1793
+ if (options.disabledDates.indexOf(dateHelper.formatDate(start, options.formatDate)) !== -1) {
1794
+ classes.push('xdsoft_disabled');
1795
+ }
1796
+
1797
+ if (options.disabledWeekDays.indexOf(day) !== -1) {
1798
+ classes.push('xdsoft_disabled');
1799
+ }
1800
+
1801
+ if (input.is('[disabled]')) {
1802
+ classes.push('xdsoft_disabled');
1803
+ }
1804
+
1805
+ if (customDateSettings && customDateSettings[1] !== "") {
1806
+ classes.push(customDateSettings[1]);
1807
+ }
1808
+
1809
+ if (_xdsoft_datetime.currentTime.getMonth() !== m) {
1810
+ classes.push('xdsoft_other_month');
1811
+ }
1812
+
1813
+ if ((options.defaultSelect || datetimepicker.data('changed')) && dateHelper.formatDate(_xdsoft_datetime.currentTime, options.formatDate) === dateHelper.formatDate(start, options.formatDate)) {
1814
+ classes.push('xdsoft_current');
1815
+ }
1816
+
1817
+ if (dateHelper.formatDate(today, options.formatDate) === dateHelper.formatDate(start, options.formatDate)) {
1818
+ classes.push('xdsoft_today');
1819
+ }
1820
+
1821
+ if (start.getDay() === 0 || start.getDay() === 6 || options.weekends.indexOf(dateHelper.formatDate(start, options.formatDate)) !== -1) {
1822
+ classes.push('xdsoft_weekend');
1823
+ }
1824
+
1825
+ if (options.highlightedDates[dateHelper.formatDate(start, options.formatDate)] !== undefined) {
1826
+ hDate = options.highlightedDates[dateHelper.formatDate(start, options.formatDate)];
1827
+ classes.push(hDate.style === undefined ? 'xdsoft_highlighted_default' : hDate.style);
1828
+ description = hDate.desc === undefined ? '' : hDate.desc;
1829
+ }
1830
+
1831
+ if (options.beforeShowDay && $.isFunction(options.beforeShowDay)) {
1832
+ classes.push(options.beforeShowDay(start));
1833
+ }
1834
+
1835
+ if (newRow) {
1836
+ table += '<tr>';
1837
+ newRow = false;
1838
+ if (options.weeks) {
1839
+ table += '<th>' + w + '</th>';
1840
+ }
1841
+ }
1842
+
1843
+ table += '<td data-date="' + d + '" data-month="' + m + '" data-year="' + y + '"' + ' class="xdsoft_date xdsoft_day_of_week' + start.getDay() + ' ' + classes.join(' ') + '" title="' + description + '">' +
1844
+ '<div>' + d + '</div>' +
1845
+ '</td>';
1846
+
1847
+ if (start.getDay() === options.dayOfWeekStartPrev) {
1848
+ table += '</tr>';
1849
+ newRow = true;
1850
+ }
1851
+
1852
+ start.setDate(d + 1);
1853
+ }
1854
+ table += '</tbody></table>';
1855
+
1856
+ calendar.html(table);
1857
+
1858
+ month_picker.find('.xdsoft_label span').eq(0).text(options.i18n[globalLocale].months[_xdsoft_datetime.currentTime.getMonth()]);
1859
+ month_picker.find('.xdsoft_label span').eq(1).text(_xdsoft_datetime.currentTime.getFullYear() + options.yearOffset);
1860
+
1861
+ // generate timebox
1862
+ time = '';
1863
+ h = '';
1864
+ m = '';
1865
+
1866
+ var minTimeMinutesOfDay = 0;
1867
+ if (options.minTime !== false) {
1868
+ var t = _xdsoft_datetime.strtotime(options.minTime);
1869
+ minTimeMinutesOfDay = 60 * t.getHours() + t.getMinutes();
1870
+ }
1871
+ var maxTimeMinutesOfDay = 24 * 60;
1872
+ if (options.maxTime !== false) {
1873
+ var t = _xdsoft_datetime.strtotime(options.maxTime);
1874
+ maxTimeMinutesOfDay = 60 * t.getHours() + t.getMinutes();
1875
+ }
1876
+
1877
+ if (options.minDateTime !== false) {
1878
+ var t = _xdsoft_datetime.strToDateTime(options.minDateTime);
1879
+ var currentDayIsMinDateTimeDay = dateHelper.formatDate(_xdsoft_datetime.currentTime, options.formatDate) === dateHelper.formatDate(t, options.formatDate);
1880
+ if (currentDayIsMinDateTimeDay) {
1881
+ var m = 60 * t.getHours() + t.getMinutes();
1882
+ if (m > minTimeMinutesOfDay) minTimeMinutesOfDay = m;
1883
+ }
1884
+ }
1885
+
1886
+ if (options.maxDateTime !== false) {
1887
+ var t = _xdsoft_datetime.strToDateTime(options.maxDateTime);
1888
+ var currentDayIsMaxDateTimeDay = dateHelper.formatDate(_xdsoft_datetime.currentTime, options.formatDate) === dateHelper.formatDate(t, options.formatDate);
1889
+ if (currentDayIsMaxDateTimeDay) {
1890
+ var m = 60 * t.getHours() + t.getMinutes();
1891
+ if (m < maxTimeMinutesOfDay) maxTimeMinutesOfDay = m;
1892
+ }
1893
+ }
1894
+
1895
+ line_time = function line_time(h, m) {
1896
+ var now = _xdsoft_datetime.now(), current_time,
1897
+ isALlowTimesInit = options.allowTimes && $.isArray(options.allowTimes) && options.allowTimes.length;
1898
+ now.setHours(h);
1899
+ h = parseInt(now.getHours(), 10);
1900
+ now.setMinutes(m);
1901
+ m = parseInt(now.getMinutes(), 10);
1902
+ classes = [];
1903
+ var currentMinutesOfDay = 60 * h + m;
1904
+ if (input.is('[disabled]') || (currentMinutesOfDay >= maxTimeMinutesOfDay) || (currentMinutesOfDay < minTimeMinutesOfDay)) {
1905
+ classes.push('xdsoft_disabled');
1906
+ }
1907
+
1908
+ current_time = new Date(_xdsoft_datetime.currentTime);
1909
+ current_time.setHours(parseInt(_xdsoft_datetime.currentTime.getHours(), 10));
1910
+
1911
+ if (!isALlowTimesInit) {
1912
+ current_time.setMinutes(Math[options.roundTime](_xdsoft_datetime.currentTime.getMinutes() / options.step) * options.step);
1913
+ }
1914
+
1915
+ if ((options.initTime || options.defaultSelect || datetimepicker.data('changed')) && current_time.getHours() === parseInt(h, 10) && ((!isALlowTimesInit && options.step > 59) || current_time.getMinutes() === parseInt(m, 10))) {
1916
+ if (options.defaultSelect || datetimepicker.data('changed')) {
1917
+ classes.push('xdsoft_current');
1918
+ } else if (options.initTime) {
1919
+ classes.push('xdsoft_init_time');
1920
+ }
1921
+ }
1922
+ if (parseInt(today.getHours(), 10) === parseInt(h, 10) && parseInt(today.getMinutes(), 10) === parseInt(m, 10)) {
1923
+ classes.push('xdsoft_today');
1924
+ }
1925
+ time += '<div class="xdsoft_time ' + classes.join(' ') + '" data-hour="' + h + '" data-minute="' + m + '">' + dateHelper.formatDate(now, options.formatTime) + '</div>';
1926
+ };
1927
+
1928
+ if (!options.allowTimes || !$.isArray(options.allowTimes) || !options.allowTimes.length) {
1929
+ for (i = 0, j = 0; i < (options.hours12 ? 12 : 24); i += 1) {
1930
+ for (j = 0; j < 60; j += options.step) {
1931
+ var currentMinutesOfDay = i * 60 + j;
1932
+ if (currentMinutesOfDay < minTimeMinutesOfDay) continue;
1933
+ if (currentMinutesOfDay >= maxTimeMinutesOfDay) continue;
1934
+ h = (i < 10 ? '0' : '') + i;
1935
+ m = (j < 10 ? '0' : '') + j;
1936
+ line_time(h, m);
1937
+ }
1938
+ }
1939
+ } else {
1940
+ for (i = 0; i < options.allowTimes.length; i += 1) {
1941
+ h = _xdsoft_datetime.strtotime(options.allowTimes[i]).getHours();
1942
+ m = _xdsoft_datetime.strtotime(options.allowTimes[i]).getMinutes();
1943
+ line_time(h, m);
1944
+ }
1945
+ }
1946
+
1947
+ timebox.html(time);
1948
+
1949
+ opt = '';
1950
+
1951
+ for (i = parseInt(options.yearStart, 10); i <= parseInt(options.yearEnd, 10); i += 1) {
1952
+ opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getFullYear() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + (i + options.yearOffset) + '</div>';
1953
+ }
1954
+ yearselect.children().eq(0)
1955
+ .html(opt);
1956
+
1957
+ for (i = parseInt(options.monthStart, 10), opt = ''; i <= parseInt(options.monthEnd, 10); i += 1) {
1958
+ opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getMonth() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + options.i18n[globalLocale].months[i] + '</div>';
1959
+ }
1960
+ monthselect.children().eq(0).html(opt);
1961
+ $(datetimepicker)
1962
+ .trigger('generate.xdsoft');
1963
+ }, 10);
1964
+ event.stopPropagation();
1965
+ })
1966
+ .on('afterOpen.xdsoft', function () {
1967
+ if (options.timepicker) {
1968
+ var classType, pheight, height, top;
1969
+ if (timebox.find('.xdsoft_current').length) {
1970
+ classType = '.xdsoft_current';
1971
+ } else if (timebox.find('.xdsoft_init_time').length) {
1972
+ classType = '.xdsoft_init_time';
1973
+ }
1974
+ if (classType) {
1975
+ pheight = timeboxparent[0].clientHeight;
1976
+ height = timebox[0].offsetHeight;
1977
+ top = timebox.find(classType).index() * options.timeHeightInTimePicker + 1;
1978
+ if ((height - pheight) < top) {
1979
+ top = height - pheight;
1980
+ }
1981
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [parseInt(top, 10) / (height - pheight)]);
1982
+ } else {
1983
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [0]);
1984
+ }
1985
+ }
1986
+ });
1987
+
1988
+ timerclick = 0;
1989
+ calendar
1990
+ .on('touchend click.xdsoft', 'td', function (xdevent) {
1991
+ xdevent.stopPropagation(); // Prevents closing of Pop-ups, Modals and Flyouts in Bootstrap
1992
+ timerclick += 1;
1993
+ var $this = $(this),
1994
+ currentTime = _xdsoft_datetime.currentTime;
1995
+
1996
+ if (currentTime === undefined || currentTime === null) {
1997
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
1998
+ currentTime = _xdsoft_datetime.currentTime;
1999
+ }
2000
+
2001
+ if ($this.hasClass('xdsoft_disabled')) {
2002
+ return false;
2003
+ }
2004
+
2005
+ currentTime.setDate(1);
2006
+ currentTime.setFullYear($this.data('year'));
2007
+ currentTime.setMonth($this.data('month'));
2008
+ currentTime.setDate($this.data('date'));
2009
+
2010
+ datetimepicker.trigger('select.xdsoft', [currentTime]);
2011
+
2012
+ input.val(_xdsoft_datetime.str());
2013
+
2014
+ if (options.onSelectDate && $.isFunction(options.onSelectDate)) {
2015
+ options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
2016
+ }
2017
+
2018
+ datetimepicker.data('changed', true);
2019
+ datetimepicker.trigger('xchange.xdsoft');
2020
+ datetimepicker.trigger('changedatetime.xdsoft');
2021
+ if ((timerclick > 1 || (options.closeOnDateSelect === true || (options.closeOnDateSelect === false && !options.timepicker))) && !options.inline) {
2022
+ datetimepicker.trigger('close.xdsoft');
2023
+ }
2024
+ setTimeout(function () {
2025
+ timerclick = 0;
2026
+ }, 200);
2027
+ });
2028
+
2029
+ timebox
2030
+ .on('touchstart', 'div', function (xdevent) {
2031
+ this.touchMoved = false;
2032
+ })
2033
+ .on('touchmove', 'div', handleTouchMoved)
2034
+ .on('touchend click.xdsoft', 'div', function (xdevent) {
2035
+ if (!this.touchMoved) {
2036
+ xdevent.stopPropagation();
2037
+ var $this = $(this),
2038
+ currentTime = _xdsoft_datetime.currentTime;
2039
+
2040
+ if (currentTime === undefined || currentTime === null) {
2041
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
2042
+ currentTime = _xdsoft_datetime.currentTime;
2043
+ }
2044
+
2045
+ if ($this.hasClass('xdsoft_disabled')) {
2046
+ return false;
2047
+ }
2048
+ currentTime.setHours($this.data('hour'));
2049
+ currentTime.setMinutes($this.data('minute'));
2050
+ datetimepicker.trigger('select.xdsoft', [currentTime]);
2051
+
2052
+ datetimepicker.data('input').val(_xdsoft_datetime.str());
2053
+
2054
+ if (options.onSelectTime && $.isFunction(options.onSelectTime)) {
2055
+ options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
2056
+ }
2057
+ datetimepicker.data('changed', true);
2058
+ datetimepicker.trigger('xchange.xdsoft');
2059
+ datetimepicker.trigger('changedatetime.xdsoft');
2060
+ if (options.inline !== true && options.closeOnTimeSelect === true) {
2061
+ datetimepicker.trigger('close.xdsoft');
2062
+ }
2063
+ }
2064
+ });
2065
+
2066
+ datepicker
2067
+ .on('mousewheel.xdsoft', function (event) {
2068
+ if (!options.scrollMonth) {
2069
+ return true;
2070
+ }
2071
+ if (event.deltaY < 0) {
2072
+ _xdsoft_datetime.nextMonth();
2073
+ } else {
2074
+ _xdsoft_datetime.prevMonth();
2075
+ }
2076
+ return false;
2077
+ });
2078
+
2079
+ input
2080
+ .on('mousewheel.xdsoft', function (event) {
2081
+ if (!options.scrollInput) {
2082
+ return true;
2083
+ }
2084
+ if (!options.datepicker && options.timepicker) {
2085
+ current_time_index = timebox.find('.xdsoft_current').length ? timebox.find('.xdsoft_current').eq(0).index() : 0;
2086
+ if (current_time_index + event.deltaY >= 0 && current_time_index + event.deltaY < timebox.children().length) {
2087
+ current_time_index += event.deltaY;
2088
+ }
2089
+ if (timebox.children().eq(current_time_index).length) {
2090
+ timebox.children().eq(current_time_index).trigger('mousedown');
2091
+ }
2092
+ return false;
2093
+ }
2094
+ if (options.datepicker && !options.timepicker) {
2095
+ datepicker.trigger(event, [event.deltaY, event.deltaX, event.deltaY]);
2096
+ if (input.val) {
2097
+ input.val(_xdsoft_datetime.str());
2098
+ }
2099
+ datetimepicker.trigger('changedatetime.xdsoft');
2100
+ return false;
2101
+ }
2102
+ });
2103
+
2104
+ datetimepicker
2105
+ .on('changedatetime.xdsoft', function (event) {
2106
+ if (options.onChangeDateTime && $.isFunction(options.onChangeDateTime)) {
2107
+ var $input = datetimepicker.data('input');
2108
+ options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input, event);
2109
+ delete options.value;
2110
+ $input.trigger('change');
2111
+ }
2112
+ })
2113
+ .on('generate.xdsoft', function () {
2114
+ if (options.onGenerate && $.isFunction(options.onGenerate)) {
2115
+ options.onGenerate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
2116
+ }
2117
+ if (triggerAfterOpen) {
2118
+ datetimepicker.trigger('afterOpen.xdsoft');
2119
+ triggerAfterOpen = false;
2120
+ }
2121
+ })
2122
+ .on('click.xdsoft', function (xdevent) {
2123
+ xdevent.stopPropagation();
2124
+ });
2125
+
2126
+ current_time_index = 0;
2127
+
2128
+ /**
2129
+ * Runs the callback for each of the specified node's ancestors.
2130
+ *
2131
+ * Return FALSE from the callback to stop ascending.
2132
+ *
2133
+ * @param {DOMNode} node
2134
+ * @param {Function} callback
2135
+ * @returns {undefined}
2136
+ */
2137
+ forEachAncestorOf = function (node, callback) {
2138
+ do {
2139
+ node = node.parentNode;
2140
+
2141
+ if (!node || callback(node) === false) {
2142
+ break;
2143
+ }
2144
+ } while (node.nodeName !== 'HTML');
2145
+ };
2146
+
2147
+ /**
2148
+ * Sets the position of the picker.
2149
+ *
2150
+ * @returns {undefined}
2151
+ */
2152
+ setPos = function () {
2153
+ var dateInputOffset,
2154
+ dateInputElem,
2155
+ verticalPosition,
2156
+ left,
2157
+ position,
2158
+ datetimepickerElem,
2159
+ dateInputHasFixedAncestor,
2160
+ $dateInput,
2161
+ windowWidth,
2162
+ verticalAnchorEdge,
2163
+ datetimepickerCss,
2164
+ windowHeight,
2165
+ windowScrollTop;
2166
+
2167
+ $dateInput = datetimepicker.data('input');
2168
+ dateInputOffset = $dateInput.offset();
2169
+ dateInputElem = $dateInput[0];
2170
+
2171
+ verticalAnchorEdge = 'top';
2172
+ verticalPosition = (dateInputOffset.top + dateInputElem.offsetHeight) - 1;
2173
+ left = dateInputOffset.left;
2174
+ position = "absolute";
2175
+
2176
+ windowWidth = $(options.contentWindow).width();
2177
+ windowHeight = $(options.contentWindow).height();
2178
+ windowScrollTop = $(options.contentWindow).scrollTop();
2179
+
2180
+ if ((options.ownerDocument.documentElement.clientWidth - dateInputOffset.left) < datepicker.parent().outerWidth(true)) {
2181
+ var diff = datepicker.parent().outerWidth(true) - dateInputElem.offsetWidth;
2182
+ left = left - diff;
2183
+ }
2184
+
2185
+ if ($dateInput.parent().css('direction') === 'rtl') {
2186
+ left -= (datetimepicker.outerWidth() - $dateInput.outerWidth());
2187
+ }
2188
+
2189
+ if (options.fixed) {
2190
+ verticalPosition -= windowScrollTop;
2191
+ left -= $(options.contentWindow).scrollLeft();
2192
+ position = "fixed";
2193
+ } else {
2194
+ dateInputHasFixedAncestor = false;
2195
+
2196
+ forEachAncestorOf(dateInputElem, function (ancestorNode) {
2197
+ if (ancestorNode === null) {
2198
+ return false;
2199
+ }
2200
+
2201
+ if (options.contentWindow.getComputedStyle(ancestorNode).getPropertyValue('position') === 'fixed') {
2202
+ dateInputHasFixedAncestor = true;
2203
+ return false;
2204
+ }
2205
+ });
2206
+
2207
+ if (dateInputHasFixedAncestor && !options.insideParent) {
2208
+ position = 'fixed';
2209
+
2210
+ //If the picker won't fit entirely within the viewport then display it above the date input.
2211
+ if (verticalPosition + datetimepicker.outerHeight() > windowHeight + windowScrollTop) {
2212
+ verticalAnchorEdge = 'bottom';
2213
+ verticalPosition = (windowHeight + windowScrollTop) - dateInputOffset.top;
2214
+ } else {
2215
+ verticalPosition -= windowScrollTop;
2216
+ }
2217
+ } else {
2218
+ if (verticalPosition + datetimepicker[0].offsetHeight > windowHeight + windowScrollTop) {
2219
+ verticalPosition = dateInputOffset.top - datetimepicker[0].offsetHeight + 1;
2220
+ }
2221
+ }
2222
+
2223
+ if (verticalPosition < 0) {
2224
+ verticalPosition = 0;
2225
+ }
2226
+
2227
+ if (left + dateInputElem.offsetWidth > windowWidth) {
2228
+ left = windowWidth - dateInputElem.offsetWidth;
2229
+ }
2230
+ }
2231
+
2232
+ datetimepickerElem = datetimepicker[0];
2233
+
2234
+ forEachAncestorOf(datetimepickerElem, function (ancestorNode) {
2235
+ var ancestorNodePosition;
2236
+
2237
+ ancestorNodePosition = options.contentWindow.getComputedStyle(ancestorNode).getPropertyValue('position');
2238
+
2239
+ if (ancestorNodePosition === 'relative' && windowWidth >= ancestorNode.offsetWidth) {
2240
+ left = left - ((windowWidth - ancestorNode.offsetWidth) / 2);
2241
+ return false;
2242
+ }
2243
+ });
2244
+
2245
+ datetimepickerCss = {
2246
+ position: position,
2247
+ left: options.insideParent ? dateInputElem.offsetLeft : left,
2248
+ top: '', //Initialize to prevent previous values interfering with new ones.
2249
+ bottom: '' //Initialize to prevent previous values interfering with new ones.
2250
+ };
2251
+
2252
+ if (options.insideParent) {
2253
+ datetimepickerCss[verticalAnchorEdge] = dateInputElem.offsetTop + dateInputElem.offsetHeight;
2254
+ } else {
2255
+ datetimepickerCss[verticalAnchorEdge] = verticalPosition;
2256
+ }
2257
+
2258
+ datetimepicker.css(datetimepickerCss);
2259
+ };
2260
+
2261
+ datetimepicker
2262
+ .on('open.xdsoft', function (event) {
2263
+ var onShow = true;
2264
+ if (options.onShow && $.isFunction(options.onShow)) {
2265
+ onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
2266
+ }
2267
+ if (onShow !== false) {
2268
+ datetimepicker.show();
2269
+ setPos();
2270
+ $(options.contentWindow)
2271
+ .off('resize.xdsoft', setPos)
2272
+ .on('resize.xdsoft', setPos);
2273
+
2274
+ if (options.closeOnWithoutClick) {
2275
+ $([options.ownerDocument.body, options.contentWindow]).on('touchstart mousedown.xdsoft', function arguments_callee6() {
2276
+ datetimepicker.trigger('close.xdsoft');
2277
+ $([options.ownerDocument.body, options.contentWindow]).off('touchstart mousedown.xdsoft', arguments_callee6);
2278
+ });
2279
+ }
2280
+ }
2281
+ })
2282
+ .on('close.xdsoft', function (event) {
2283
+ var onClose = true;
2284
+ month_picker
2285
+ .find('.xdsoft_month,.xdsoft_year')
2286
+ .find('.xdsoft_select')
2287
+ .hide();
2288
+ if (options.onClose && $.isFunction(options.onClose)) {
2289
+ onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
2290
+ }
2291
+ if (onClose !== false && !options.opened && !options.inline) {
2292
+ datetimepicker.hide();
2293
+ }
2294
+ event.stopPropagation();
2295
+ })
2296
+ .on('toggle.xdsoft', function () {
2297
+ if (datetimepicker.is(':visible')) {
2298
+ datetimepicker.trigger('close.xdsoft');
2299
+ } else {
2300
+ datetimepicker.trigger('open.xdsoft');
2301
+ }
2302
+ })
2303
+ .data('input', input);
2304
+
2305
+ timer = 0;
2306
+
2307
+ datetimepicker.data('xdsoft_datetime', _xdsoft_datetime);
2308
+ datetimepicker.setOptions(options);
2309
+
2310
+ function getCurrentValue() {
2311
+ var ct = false, time;
2312
+
2313
+ if (options.startDate) {
2314
+ ct = _xdsoft_datetime.strToDate(options.startDate);
2315
+ } else {
2316
+ ct = options.value || ((input && input.val && input.val()) ? input.val() : '');
2317
+ if (ct) {
2318
+ ct = _xdsoft_datetime.strToDateTime(ct);
2319
+ if (options.yearOffset) {
2320
+ ct = new Date(ct.getFullYear() - options.yearOffset, ct.getMonth(), ct.getDate(), ct.getHours(), ct.getMinutes(), ct.getSeconds(), ct.getMilliseconds());
2321
+ }
2322
+ } else if (options.defaultDate) {
2323
+ ct = _xdsoft_datetime.strToDateTime(options.defaultDate);
2324
+ if (options.defaultTime) {
2325
+ time = _xdsoft_datetime.strtotime(options.defaultTime);
2326
+ ct.setHours(time.getHours());
2327
+ ct.setMinutes(time.getMinutes());
2328
+ }
2329
+ }
2330
+ }
2331
+
2332
+ if (ct && _xdsoft_datetime.isValidDate(ct)) {
2333
+ datetimepicker.data('changed', true);
2334
+ } else {
2335
+ ct = '';
2336
+ }
2337
+
2338
+ return ct || 0;
2339
+ }
2340
+
2341
+ function setMask(options) {
2342
+
2343
+ var isValidValue = function (mask, value) {
2344
+ var reg = mask
2345
+ .replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g, '\\$1')
2346
+ .replace(/_/g, '{digit+}')
2347
+ .replace(/([0-9]{1})/g, '{digit$1}')
2348
+ .replace(/\{digit([0-9]{1})\}/g, '[0-$1_]{1}')
2349
+ .replace(/\{digit[\+]\}/g, '[0-9_]{1}');
2350
+ return (new RegExp(reg)).test(value);
2351
+ },
2352
+ getCaretPos = function (input) {
2353
+ try {
2354
+ if (options.ownerDocument.selection && options.ownerDocument.selection.createRange) {
2355
+ var range = options.ownerDocument.selection.createRange();
2356
+ return range.getBookmark().charCodeAt(2) - 2;
2357
+ }
2358
+ if (input.setSelectionRange) {
2359
+ return input.selectionStart;
2360
+ }
2361
+ } catch (e) {
2362
+ return 0;
2363
+ }
2364
+ },
2365
+ setCaretPos = function (node, pos) {
2366
+ node = (typeof node === "string" || node instanceof String) ? options.ownerDocument.getElementById(node) : node;
2367
+ if (!node) {
2368
+ return false;
2369
+ }
2370
+ if (node.createTextRange) {
2371
+ var textRange = node.createTextRange();
2372
+ textRange.collapse(true);
2373
+ textRange.moveEnd('character', pos);
2374
+ textRange.moveStart('character', pos);
2375
+ textRange.select();
2376
+ return true;
2377
+ }
2378
+ if (node.setSelectionRange) {
2379
+ node.setSelectionRange(pos, pos);
2380
+ return true;
2381
+ }
2382
+ return false;
2383
+ };
2384
+
2385
+ if(options.mask) {
2386
+ input.off('keydown.xdsoft');
2387
+ }
2388
+
2389
+ if (options.mask === true) {
2390
+ if (dateHelper.formatMask) {
2391
+ options.mask = dateHelper.formatMask(options.format)
2392
+ } else {
2393
+ options.mask = options.format
2394
+ .replace(/Y/g, '9999')
2395
+ .replace(/F/g, '9999')
2396
+ .replace(/m/g, '19')
2397
+ .replace(/d/g, '39')
2398
+ .replace(/H/g, '29')
2399
+ .replace(/i/g, '59')
2400
+ .replace(/s/g, '59');
2401
+ }
2402
+ }
2403
+
2404
+ if ($.type(options.mask) === 'string') {
2405
+ if (!isValidValue(options.mask, input.val())) {
2406
+ input.val(options.mask.replace(/[0-9]/g, '_'));
2407
+ setCaretPos(input[0], 0);
2408
+ }
2409
+
2410
+ input.on('paste.xdsoft', function (event) {
2411
+ // couple options here
2412
+ // 1. return false - tell them they can't paste
2413
+ // 2. insert over current characters - minimal validation
2414
+ // 3. full fledged parsing and validation
2415
+ // let's go option 2 for now
2416
+
2417
+ // fires multiple times for some reason
2418
+
2419
+ // https://stackoverflow.com/a/30496488/1366033
2420
+ var clipboardData = event.clipboardData || event.originalEvent.clipboardData || window.clipboardData,
2421
+ pastedData = clipboardData.getData('text'),
2422
+ val = this.value,
2423
+ pos = this.selectionStart
2424
+
2425
+ var valueBeforeCursor = val.substr(0, pos);
2426
+ var valueAfterPaste = val.substr(pos + pastedData.length);
2427
+
2428
+ val = valueBeforeCursor + pastedData + valueAfterPaste;
2429
+ pos += pastedData.length;
2430
+
2431
+ if (isValidValue(options.mask, val)) {
2432
+ this.value = val;
2433
+ setCaretPos(this, pos);
2434
+ } else if ($.trim(val) === '') {
2435
+ this.value = options.mask.replace(/[0-9]/g, '_');
2436
+ } else {
2437
+ input.trigger('error_input.xdsoft');
2438
+ }
2439
+
2440
+ event.preventDefault();
2441
+ return false;
2442
+ });
2443
+
2444
+ input.on('keydown.xdsoft', function (event) {
2445
+ var val = this.value,
2446
+ key = event.which,
2447
+ pos = this.selectionStart,
2448
+ selEnd = this.selectionEnd,
2449
+ hasSel = pos !== selEnd,
2450
+ digit;
2451
+
2452
+ // only alow these characters
2453
+ if (((key >= KEY0 && key <= KEY9) ||
2454
+ (key >= _KEY0 && key <= _KEY9)) ||
2455
+ (key === BACKSPACE || key === DEL)) {
2456
+
2457
+ // get char to insert which is new character or placeholder ('_')
2458
+ digit = (key === BACKSPACE || key === DEL) ? '_' :
2459
+ String.fromCharCode((_KEY0 <= key && key <= _KEY9) ? key - KEY0 : key);
2460
+
2461
+ // we're deleting something, we're not at the start, and have normal cursor, move back one
2462
+ // if we have a selection length, cursor actually sits behind deletable char, not in front
2463
+ if (key === BACKSPACE && pos && !hasSel) {
2464
+ pos -= 1;
2465
+ }
2466
+
2467
+ // don't stop on a separator, continue whatever direction you were going
2468
+ // value char - keep incrementing position while on separator char and we still have room
2469
+ // del char - keep decrementing position while on separator char and we still have room
2470
+ while (true) {
2471
+ var maskValueAtCurPos = options.mask.substr(pos, 1);
2472
+ var posShorterThanMaskLength = pos < options.mask.length;
2473
+ var posGreaterThanZero = pos > 0;
2474
+ var notNumberOrPlaceholder = /[^0-9_]/;
2475
+ var curPosOnSep = notNumberOrPlaceholder.test(maskValueAtCurPos);
2476
+ var continueMovingPosition = curPosOnSep && posShorterThanMaskLength && posGreaterThanZero
2477
+
2478
+ // if we hit a real char, stay where we are
2479
+ if (!continueMovingPosition) break;
2480
+
2481
+ // hitting backspace in a selection, you can possibly go back any further - go forward
2482
+ pos += (key === BACKSPACE && !hasSel) ? -1 : 1;
2483
+
2484
+ }
2485
+
2486
+ if (event.metaKey) { // cmd has been pressed
2487
+ pos = 0;
2488
+ hasSel = true;
2489
+ }
2490
+
2491
+ if (hasSel) {
2492
+ // pos might have moved so re-calc length
2493
+ var selLength = selEnd - pos
2494
+
2495
+ // if we have a selection length we will wipe out entire selection and replace with default template for that range
2496
+ var defaultBlank = options.mask.replace(/[0-9]/g, '_');
2497
+ var defaultBlankSelectionReplacement = defaultBlank.substr(pos, selLength);
2498
+ var selReplacementRemainder = defaultBlankSelectionReplacement.substr(1) // might be empty
2499
+
2500
+ var valueBeforeSel = val.substr(0, pos);
2501
+ var insertChars = digit + selReplacementRemainder;
2502
+ var charsAfterSelection = val.substr(pos + selLength);
2503
+
2504
+ val = valueBeforeSel + insertChars + charsAfterSelection
2505
+
2506
+ } else {
2507
+ var valueBeforeCursor = val.substr(0, pos);
2508
+ var insertChar = digit;
2509
+ var valueAfterNextChar = val.substr(pos + 1);
2510
+
2511
+ val = valueBeforeCursor + insertChar + valueAfterNextChar
2512
+ }
2513
+
2514
+ if ($.trim(val) === '') {
2515
+ // if empty, set to default
2516
+ val = defaultBlank
2517
+ } else {
2518
+ // if at the last character don't need to do anything
2519
+ if (pos === options.mask.length) {
2520
+ event.preventDefault();
2521
+ return false;
2522
+ }
2523
+ }
2524
+
2525
+ // resume cursor location
2526
+ pos += (key === BACKSPACE) ? 0 : 1;
2527
+ // don't stop on a separator, continue whatever direction you were going
2528
+ while (/[^0-9_]/.test(options.mask.substr(pos, 1)) && pos < options.mask.length && pos > 0) {
2529
+ pos += (key === BACKSPACE) ? 0 : 1;
2530
+ }
2531
+
2532
+ if (isValidValue(options.mask, val)) {
2533
+ this.value = val;
2534
+ setCaretPos(this, pos);
2535
+ } else if ($.trim(val) === '') {
2536
+ this.value = options.mask.replace(/[0-9]/g, '_');
2537
+ } else {
2538
+ input.trigger('error_input.xdsoft');
2539
+ }
2540
+ } else {
2541
+ if (([AKEY, CKEY, VKEY, ZKEY, YKEY].indexOf(key) !== -1 && ctrlDown) || [ESC, ARROWUP, ARROWDOWN, ARROWLEFT, ARROWRIGHT, F5, CTRLKEY, TAB, ENTER].indexOf(key) !== -1) {
2542
+ return true;
2543
+ }
2544
+ }
2545
+
2546
+ event.preventDefault();
2547
+ return false;
2548
+ });
2549
+ }
2550
+ }
2551
+
2552
+ _xdsoft_datetime.setCurrentTime(getCurrentValue());
2553
+
2554
+ input
2555
+ .data('xdsoft_datetimepicker', datetimepicker)
2556
+ .on('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', function () {
2557
+ if (input.is(':disabled') || (input.data('xdsoft_datetimepicker').is(':visible') && options.closeOnInputClick)) {
2558
+ return;
2559
+ }
2560
+ if (!options.openOnFocus) {
2561
+ return;
2562
+ }
2563
+ clearTimeout(timer);
2564
+ timer = setTimeout(function () {
2565
+ if (input.is(':disabled')) {
2566
+ return;
2567
+ }
2568
+
2569
+ triggerAfterOpen = true;
2570
+ _xdsoft_datetime.setCurrentTime(getCurrentValue(), true);
2571
+ if(options.mask) {
2572
+ setMask(options);
2573
+ }
2574
+ datetimepicker.trigger('open.xdsoft');
2575
+ }, 100);
2576
+ })
2577
+ .on('keydown.xdsoft', function (event) {
2578
+ var elementSelector,
2579
+ key = event.which;
2580
+ if ([ENTER].indexOf(key) !== -1 && options.enterLikeTab) {
2581
+ elementSelector = $("input:visible,textarea:visible,button:visible,a:visible");
2582
+ datetimepicker.trigger('close.xdsoft');
2583
+ elementSelector.eq(elementSelector.index(this) + 1).focus();
2584
+ return false;
2585
+ }
2586
+ if ([TAB].indexOf(key) !== -1) {
2587
+ datetimepicker.trigger('close.xdsoft');
2588
+ return true;
2589
+ }
2590
+ })
2591
+ .on('blur.xdsoft', function () {
2592
+ datetimepicker.trigger('close.xdsoft');
2593
+ });
2594
+ };
2595
+ destroyDateTimePicker = function (input) {
2596
+ var datetimepicker = input.data('xdsoft_datetimepicker');
2597
+ if (datetimepicker) {
2598
+ datetimepicker.data('xdsoft_datetime', null);
2599
+ datetimepicker.remove();
2600
+ input
2601
+ .data('xdsoft_datetimepicker', null)
2602
+ .off('.xdsoft');
2603
+ $(options.contentWindow).off('resize.xdsoft');
2604
+ $([options.contentWindow, options.ownerDocument.body]).off('mousedown.xdsoft touchstart');
2605
+ if (input.unmousewheel) {
2606
+ input.unmousewheel();
2607
+ }
2608
+ }
2609
+ };
2610
+ $(options.ownerDocument)
2611
+ .off('keydown.xdsoftctrl keyup.xdsoftctrl')
2612
+ .off('keydown.xdsoftcmd keyup.xdsoftcmd')
2613
+ .on('keydown.xdsoftctrl', function (e) {
2614
+ if (e.keyCode === CTRLKEY) {
2615
+ ctrlDown = true;
2616
+ }
2617
+ })
2618
+ .on('keyup.xdsoftctrl', function (e) {
2619
+ if (e.keyCode === CTRLKEY) {
2620
+ ctrlDown = false;
2621
+ }
2622
+ })
2623
+ .on('keydown.xdsoftcmd', function (e) {
2624
+ if (e.keyCode === CMDKEY) {
2625
+ cmdDown = true;
2626
+ }
2627
+ })
2628
+ .on('keyup.xdsoftcmd', function (e) {
2629
+ if (e.keyCode === CMDKEY) {
2630
+ cmdDown = false;
2631
+ }
2632
+ });
2633
+
2634
+ this.each(function () {
2635
+ var datetimepicker = $(this).data('xdsoft_datetimepicker'), $input;
2636
+ if (datetimepicker) {
2637
+ if ($.type(opt) === 'string') {
2638
+ switch (opt) {
2639
+ case 'show':
2640
+ $(this).select().focus();
2641
+ datetimepicker.trigger('open.xdsoft');
2642
+ break;
2643
+ case 'hide':
2644
+ datetimepicker.trigger('close.xdsoft');
2645
+ break;
2646
+ case 'toggle':
2647
+ datetimepicker.trigger('toggle.xdsoft');
2648
+ break;
2649
+ case 'destroy':
2650
+ destroyDateTimePicker($(this));
2651
+ break;
2652
+ case 'reset':
2653
+ this.value = this.defaultValue;
2654
+ if (!this.value || !datetimepicker.data('xdsoft_datetime').isValidDate(dateHelper.parseDate(this.value, options.format))) {
2655
+ datetimepicker.data('changed', false);
2656
+ }
2657
+ datetimepicker.data('xdsoft_datetime').setCurrentTime(this.value);
2658
+ break;
2659
+ case 'validate':
2660
+ $input = datetimepicker.data('input');
2661
+ $input.trigger('blur.xdsoft');
2662
+ break;
2663
+ default:
2664
+ if (datetimepicker[opt] && $.isFunction(datetimepicker[opt])) {
2665
+ result = datetimepicker[opt](opt2);
2666
+ }
2667
+ }
2668
+ } else {
2669
+ datetimepicker
2670
+ .setOptions(opt);
2671
+ }
2672
+ return 0;
2673
+ }
2674
+ if ($.type(opt) !== 'string') {
2675
+ if (!options.lazyInit || options.open || options.inline) {
2676
+ createDateTimePicker($(this));
2677
+ } else {
2678
+ lazyInit($(this));
2679
+ }
2680
+ }
2681
+ });
2682
+
2683
+ return result;
2684
+ };
2685
+
2686
+ $.fn.datetimepicker.defaults = default_options;
2687
+
2688
+ function HighlightedDate(date, desc, style) {
2689
+ "use strict";
2690
+ this.date = date;
2691
+ this.desc = desc;
2692
+ this.style = style;
2693
+ }
2694
+ };
2695
+ ;(function (factory) {
2696
+ if ( typeof define === 'function' && define.amd ) {
2697
+ // AMD. Register as an anonymous module.
2698
+ define(['jquery', 'jquery-mousewheel'], factory);
2699
+ } else if (typeof exports === 'object') {
2700
+ // Node/CommonJS style for Browserify
2701
+ module.exports = factory(require('jquery'));;
2702
+ } else {
2703
+ // Browser globals
2704
+ factory(jQuery);
2705
+ }
2706
+ }(datetimepickerFactory));
2707
+
2708
+
2709
+
2710
+ /*!
2711
+ * jQuery Mousewheel 3.1.13
2712
+ *
2713
+ * Copyright jQuery Foundation and other contributors
2714
+ * Released under the MIT license
2715
+ * http://jquery.org/license
2716
+ */
2717
+
2718
+ (function (factory) {
2719
+ if ( typeof define === 'function' && define.amd ) {
2720
+ // AMD. Register as an anonymous module.
2721
+ define(['jquery'], factory);
2722
+ } else if (typeof exports === 'object') {
2723
+ // Node/CommonJS style for Browserify
2724
+ module.exports = factory;
2725
+ } else {
2726
+ // Browser globals
2727
+ factory(jQuery);
2728
+ }
2729
+ }(function ($) {
2730
+
2731
+ var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
2732
+ toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
2733
+ ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
2734
+ slice = Array.prototype.slice,
2735
+ nullLowestDeltaTimeout, lowestDelta;
2736
+
2737
+ if ( $.event.fixHooks ) {
2738
+ for ( var i = toFix.length; i; ) {
2739
+ $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
2740
+ }
2741
+ }
2742
+
2743
+ var special = $.event.special.mousewheel = {
2744
+ version: '3.1.12',
2745
+
2746
+ setup: function() {
2747
+ if ( this.addEventListener ) {
2748
+ for ( var i = toBind.length; i; ) {
2749
+ this.addEventListener( toBind[--i], handler, false );
2750
+ }
2751
+ } else {
2752
+ this.onmousewheel = handler;
2753
+ }
2754
+ // Store the line height and page height for this particular element
2755
+ $.data(this, 'mousewheel-line-height', special.getLineHeight(this));
2756
+ $.data(this, 'mousewheel-page-height', special.getPageHeight(this));
2757
+ },
2758
+
2759
+ teardown: function() {
2760
+ if ( this.removeEventListener ) {
2761
+ for ( var i = toBind.length; i; ) {
2762
+ this.removeEventListener( toBind[--i], handler, false );
2763
+ }
2764
+ } else {
2765
+ this.onmousewheel = null;
2766
+ }
2767
+ // Clean up the data we added to the element
2768
+ $.removeData(this, 'mousewheel-line-height');
2769
+ $.removeData(this, 'mousewheel-page-height');
2770
+ },
2771
+
2772
+ getLineHeight: function(elem) {
2773
+ var $elem = $(elem),
2774
+ $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
2775
+ if (!$parent.length) {
2776
+ $parent = $('body');
2777
+ }
2778
+ return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
2779
+ },
2780
+
2781
+ getPageHeight: function(elem) {
2782
+ return $(elem).height();
2783
+ },
2784
+
2785
+ settings: {
2786
+ adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
2787
+ normalizeOffset: true // calls getBoundingClientRect for each event
2788
+ }
2789
+ };
2790
+
2791
+ $.fn.extend({
2792
+ mousewheel: function(fn) {
2793
+ return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
2794
+ },
2795
+
2796
+ unmousewheel: function(fn) {
2797
+ return this.unbind('mousewheel', fn);
2798
+ }
2799
+ });
2800
+
2801
+
2802
+ function handler(event) {
2803
+ var orgEvent = event || window.event,
2804
+ args = slice.call(arguments, 1),
2805
+ delta = 0,
2806
+ deltaX = 0,
2807
+ deltaY = 0,
2808
+ absDelta = 0,
2809
+ offsetX = 0,
2810
+ offsetY = 0;
2811
+ event = $.event.fix(orgEvent);
2812
+ event.type = 'mousewheel';
2813
+
2814
+ // Old school scrollwheel delta
2815
+ if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
2816
+ if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
2817
+ if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
2818
+ if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
2819
+
2820
+ // Firefox < 17 horizontal scrolling related to DOMMouseScroll event
2821
+ if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
2822
+ deltaX = deltaY * -1;
2823
+ deltaY = 0;
2824
+ }
2825
+
2826
+ // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
2827
+ delta = deltaY === 0 ? deltaX : deltaY;
2828
+
2829
+ // New school wheel delta (wheel event)
2830
+ if ( 'deltaY' in orgEvent ) {
2831
+ deltaY = orgEvent.deltaY * -1;
2832
+ delta = deltaY;
2833
+ }
2834
+ if ( 'deltaX' in orgEvent ) {
2835
+ deltaX = orgEvent.deltaX;
2836
+ if ( deltaY === 0 ) { delta = deltaX * -1; }
2837
+ }
2838
+
2839
+ // No change actually happened, no reason to go any further
2840
+ if ( deltaY === 0 && deltaX === 0 ) { return; }
2841
+
2842
+ // Need to convert lines and pages to pixels if we aren't already in pixels
2843
+ // There are three delta modes:
2844
+ // * deltaMode 0 is by pixels, nothing to do
2845
+ // * deltaMode 1 is by lines
2846
+ // * deltaMode 2 is by pages
2847
+ if ( orgEvent.deltaMode === 1 ) {
2848
+ var lineHeight = $.data(this, 'mousewheel-line-height');
2849
+ delta *= lineHeight;
2850
+ deltaY *= lineHeight;
2851
+ deltaX *= lineHeight;
2852
+ } else if ( orgEvent.deltaMode === 2 ) {
2853
+ var pageHeight = $.data(this, 'mousewheel-page-height');
2854
+ delta *= pageHeight;
2855
+ deltaY *= pageHeight;
2856
+ deltaX *= pageHeight;
2857
+ }
2858
+
2859
+ // Store lowest absolute delta to normalize the delta values
2860
+ absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
2861
+
2862
+ if ( !lowestDelta || absDelta < lowestDelta ) {
2863
+ lowestDelta = absDelta;
2864
+
2865
+ // Adjust older deltas if necessary
2866
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
2867
+ lowestDelta /= 40;
2868
+ }
2869
+ }
2870
+
2871
+ // Adjust older deltas if necessary
2872
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
2873
+ // Divide all the things by 40!
2874
+ delta /= 40;
2875
+ deltaX /= 40;
2876
+ deltaY /= 40;
2877
+ }
2878
+
2879
+ // Get a whole, normalized value for the deltas
2880
+ delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
2881
+ deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
2882
+ deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
2883
+
2884
+ // Normalise offsetX and offsetY properties
2885
+ if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
2886
+ var boundingRect = this.getBoundingClientRect();
2887
+ offsetX = event.clientX - boundingRect.left;
2888
+ offsetY = event.clientY - boundingRect.top;
2889
+ }
2890
+
2891
+ // Add information to the event object
2892
+ event.deltaX = deltaX;
2893
+ event.deltaY = deltaY;
2894
+ event.deltaFactor = lowestDelta;
2895
+ event.offsetX = offsetX;
2896
+ event.offsetY = offsetY;
2897
+ // Go ahead and set deltaMode to 0 since we converted to pixels
2898
+ // Although this is a little odd since we overwrite the deltaX/Y
2899
+ // properties with normalized deltas.
2900
+ event.deltaMode = 0;
2901
+
2902
+ // Add event and delta to the front of the arguments
2903
+ args.unshift(event, delta, deltaX, deltaY);
2904
+
2905
+ // Clearout lowestDelta after sometime to better
2906
+ // handle multiple device types that give different
2907
+ // a different lowestDelta
2908
+ // Ex: trackpad = 3 and mouse wheel = 120
2909
+ if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
2910
+ nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
2911
+
2912
+ return ($.event.dispatch || $.event.handle).apply(this, args);
2913
+ }
2914
+
2915
+ function nullLowestDelta() {
2916
+ lowestDelta = null;
2917
+ }
2918
+
2919
+ function shouldAdjustOldDeltas(orgEvent, absDelta) {
2920
+ // If this is an older event and the delta is divisable by 120,
2921
+ // then we are assuming that the browser is treating this as an
2922
+ // older mouse wheel event and that we should divide the deltas
2923
+ // by 40 to try and get a more usable deltaFactor.
2924
+ // Side note, this actually impacts the reported scroll distance
2925
+ // in older browsers and can cause scrolling to be slower than native.
2926
+ // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
2927
+ return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
2928
+ }
2929
+
2930
+ }));