@ozdao/prometheus-framework 0.2.183 → 0.2.184

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. package/dist/builder.js +60 -33
  2. package/dist/builder.mjs +60 -33
  3. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  5. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  7. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
  9. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  11. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
  13. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
  15. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
  17. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
  19. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
  21. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  31. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  33. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
  35. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
  41. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
  45. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
  47. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
  51. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  55. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  57. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +4 -4
  61. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
  63. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
  65. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
  75. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  77. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
  83. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
  85. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  87. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  89. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -6
  91. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  93. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  95. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  97. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  99. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  101. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
  103. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
  105. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  107. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  111. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  115. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
  119. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -2
  121. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
  123. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +4 -4
  125. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +4 -4
  127. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  129. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  131. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
  133. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
  135. package/package.json +1 -1
  136. package/src/builder/ssr/ssr-render-html.js +6 -24
  137. package/src/builder/templates/page.js +39 -0
  138. package/src/builder/webpack/webpack.config.spa.js +3 -4
  139. package/src/builder/templates/page.html +0 -37
  140. package/src/builder/templates/screen.html +0 -33
package/dist/builder.js CHANGED
@@ -24,21 +24,21 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  const require$$0 = require("path");
25
25
  const require$$1$1 = require("webpack");
26
26
  const require$$2$1 = require("compression");
27
- const require$$3$1 = require("readline");
27
+ const require$$3 = require("readline");
28
28
  const require$$4 = require("chalk");
29
29
  const require$$5 = require("webpack-dev-middleware");
30
30
  const require$$1 = require("mustache");
31
31
  const require$$2 = require("chokidar");
32
- const require$$3 = require("fs");
33
32
  const require$$1$2 = require("express");
34
33
  const require$$6 = require("connect-history-api-fallback");
34
+ const require$$0$1 = require("fs");
35
35
  const require$$2$2 = require("vue-loader");
36
- const require$$3$2 = require("mini-css-extract-plugin");
36
+ const require$$3$1 = require("mini-css-extract-plugin");
37
37
  const require$$4$1 = require("clean-webpack-plugin");
38
38
  const require$$5$1 = require("webpack-bundle-analyzer");
39
39
  const require$$6$1 = require("dotenv-webpack");
40
40
  const require$$1$3 = require("glob-all");
41
- const require$$3$3 = require("webpack-merge");
41
+ const require$$3$2 = require("webpack-merge");
42
42
  const require$$4$2 = require("webpack-stats-plugin");
43
43
  const require$$6$2 = require("css-minimizer-webpack-plugin");
44
44
  const require$$7 = require("terser-webpack-plugin");
@@ -51,17 +51,51 @@ const require$$4$3 = require("webpack-manifest-plugin");
51
51
  function getDefaultExportFromCjs(x) {
52
52
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
53
53
  }
54
+ var page = `
55
+ <!-- <!DOCTYPE html> -->
56
+ <html {{{ meta.htmlAttrs }}}>
57
+ <head {{{ meta.headAttrs }}}>
58
+ {{{ meta.head }}}
59
+ <link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png">
60
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
61
+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
62
+ <link rel="manifest" href="/favicon/site.webmanifest">
63
+ <link rel="mask-icon" href="/favicon/safari-pinned-tab.svg" color="#5bbad5">
64
+ <meta name="msapplication-TileColor" content="#000000">
65
+ <meta name="theme-color" content="#ffffff">
66
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
67
+ {{{ head }}}
68
+ <!-- Sign in with Apple -->
69
+ <!-- <script type="text/javascript" src="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js"></script> -->
70
+ </head>
71
+ <!-- Google tag (gtag.js) -->
72
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{googleTagId}}"></script>
73
+
74
+ <body {{{ meta.bodyAttrs }}}>
75
+ <div id="app">{{{ appHtml }}}</div>
76
+
77
+ <script type="application/json" data-user-state>
78
+ {{{ userState }}}
79
+ </script>
80
+
81
+ <script>
82
+ window.dataLayer = window.dataLayer || [];
83
+ function gtag(){dataLayer.push(arguments);}
84
+ gtag('js', new Date());
85
+
86
+ gtag('config', '{{googleTagId}}');
87
+ </script>
88
+
89
+ {{{ meta.body }}} {{{ body }}}
90
+ </body>
91
+ </html>
92
+ `;
54
93
  const path$9 = require$$0;
55
94
  const Mustache$1 = require$$1;
56
95
  const chokidar = require$$2;
57
- const { promises: { readFile } } = require$$3;
58
- const templatePath$1 = path$9.resolve(__dirname, "../templates/page.html");
59
- let template;
96
+ const template = page;
97
+ const templatePath = path$9.resolve(__dirname, "../templates/page.js");
60
98
  const renderHtml$1 = async (stuff) => {
61
- if (!template) {
62
- const buffer = await readFile(templatePath$1);
63
- template = buffer.toString();
64
- }
65
99
  const data = {
66
100
  ...stuff,
67
101
  googleTagId: process.env.GOOGLE_TAG_ID,
@@ -70,20 +104,13 @@ const renderHtml$1 = async (stuff) => {
70
104
  return Mustache$1.render(template, data);
71
105
  };
72
106
  const createHtmlRenderer$1 = (onTemplateUpdate) => {
73
- let shouldReload = true;
74
- let currentTemplate;
75
- chokidar.watch(templatePath$1).on("change", () => {
76
- shouldReload = true;
107
+ let currentTemplate = template;
108
+ chokidar.watch(templatePath).on("change", () => {
109
+ delete require.cache[require.resolve(templatePath)];
110
+ currentTemplate = require(templatePath);
77
111
  onTemplateUpdate();
78
112
  });
79
- const loadTemplate = async () => {
80
- if (!shouldReload) return;
81
- const buffer = await readFile(templatePath$1);
82
- currentTemplate = buffer.toString();
83
- shouldReload = false;
84
- };
85
113
  return async (stuff) => {
86
- await loadTemplate();
87
114
  const data = {
88
115
  ...stuff,
89
116
  googleTagId: process.env.GOOGLE_TAG_ID,
@@ -132,7 +159,7 @@ var ssrTransformWebpackStats = {
132
159
  const path$8 = require$$0;
133
160
  const webpack$6 = require$$1$1;
134
161
  const compression$2 = require$$2$1;
135
- const readline$1 = require$$3$1;
162
+ const readline$1 = require$$3;
136
163
  const chalk$1 = require$$4;
137
164
  const devMiddleware$1 = require$$5;
138
165
  const { createHtmlRenderer } = ssrRenderHtml;
@@ -319,7 +346,7 @@ var ssr_prod = function createSsrProdServer(projectRoot, { clientConfig: clientC
319
346
  const path$6 = require$$0;
320
347
  const webpack$5 = require$$1$1;
321
348
  const compression$1 = require$$2$1;
322
- const readline = require$$3$1;
349
+ const readline = require$$3;
323
350
  const chalk = require$$4;
324
351
  const devMiddleware = require$$5;
325
352
  const history$1 = require$$6;
@@ -387,7 +414,7 @@ var spa_dev = function createSpaDevServer(projectRoot, { spaConfig: spaConfig2,
387
414
  createDevRenderer();
388
415
  return startServer;
389
416
  };
390
- const fs$1 = require$$3;
417
+ const fs = require$$0$1;
391
418
  const path$5 = require$$0;
392
419
  const compression = require$$2$1;
393
420
  const express = require$$1$2;
@@ -403,7 +430,7 @@ var spa_prod = function createSpaProdServer(projectRoot, { createServerPath }) {
403
430
  index: "/index.html"
404
431
  }));
405
432
  app.get("*", (req, res) => {
406
- fs$1.readFile(path$5.resolve(projectRoot, "builds/web/spa", "index.html"), "utf-8", (err, content) => {
433
+ fs.readFile(path$5.resolve(projectRoot, "builds/web/spa", "index.html"), "utf-8", (err, content) => {
407
434
  if (err) {
408
435
  console.log('We cannot open "index.html" file.');
409
436
  res.writeHead(500, {
@@ -432,7 +459,7 @@ var spa_prod = function createSpaProdServer(projectRoot, { createServerPath }) {
432
459
  const path$4 = require$$0;
433
460
  const webpack$4 = require$$1$1;
434
461
  const { VueLoaderPlugin } = require$$2$2;
435
- const MiniCssExtractPlugin = require$$3$2;
462
+ const MiniCssExtractPlugin = require$$3$1;
436
463
  const { CleanWebpackPlugin } = require$$4$1;
437
464
  const BundleAnalyzerPlugin = require$$5$1.BundleAnalyzerPlugin;
438
465
  const Dotenv = require$$6$1;
@@ -554,7 +581,7 @@ var webpack_config_base = (projectRoot) => {
554
581
  };
555
582
  const path$3 = require$$0;
556
583
  const glob = require$$1$3;
557
- const { merge: merge$2 } = require$$3$3;
584
+ const { merge: merge$2 } = require$$3$2;
558
585
  const { StatsWriterPlugin: StatsWriterPlugin$1 } = require$$4$2;
559
586
  const CssMinimizerPlugin$1 = require$$6$2;
560
587
  const TerserPlugin$1 = require$$7;
@@ -654,16 +681,16 @@ var webpack_config_server = (projectRoot) => {
654
681
  };
655
682
  const path$1 = require$$0;
656
683
  const webpack$2 = require$$1$1;
657
- const { merge: merge$1 } = require$$3$3;
684
+ const { merge: merge$1 } = require$$3$2;
658
685
  const CssMinimizerPlugin = require$$6$2;
659
686
  const CopyWebpackPlugin = require$$6$3;
660
687
  const TerserPlugin = require$$7;
661
688
  const HtmlWebpackPlugin = require$$8$1;
662
689
  const { StatsWriterPlugin } = require$$4$2;
663
690
  const Mustache = require$$1;
664
- const fs = require$$3.promises;
691
+ require$$0$1.promises;
665
692
  const getClientConfig = webpack_config_client;
666
- const templatePath = path$1.resolve(__dirname, "../templates/page.html");
693
+ path$1.resolve(__dirname, "../templates/page.html");
667
694
  const isProd = process.env.NODE_ENV === "production";
668
695
  var webpack_config_spa = (projectRoot) => {
669
696
  const spaConfig2 = {
@@ -686,7 +713,7 @@ var webpack_config_spa = (projectRoot) => {
686
713
  }),
687
714
  new HtmlWebpackPlugin({
688
715
  templateContent: async () => {
689
- const template2 = await fs.readFile(templatePath, "utf8");
716
+ const template2 = page;
690
717
  const meta = {
691
718
  htmlAttrs: 'lang="en"',
692
719
  headAttrs: "",
@@ -721,7 +748,7 @@ var webpack_config_spa = (projectRoot) => {
721
748
  const path = require$$0;
722
749
  const webpack$1 = require$$1$1;
723
750
  const nodeExternals = require$$2$3;
724
- const { merge } = require$$3$3;
751
+ const { merge } = require$$3$2;
725
752
  const { WebpackManifestPlugin } = require$$4$3;
726
753
  const getBaseConfig = webpack_config_base;
727
754
  var webpack_config_ssr = (projectRoot) => {
package/dist/builder.mjs CHANGED
@@ -1,21 +1,21 @@
1
1
  import require$$0 from "path";
2
2
  import require$$1$1 from "webpack";
3
3
  import require$$2$1 from "compression";
4
- import require$$3$1 from "readline";
4
+ import require$$3 from "readline";
5
5
  import require$$4 from "chalk";
6
6
  import require$$5 from "webpack-dev-middleware";
7
7
  import require$$1 from "mustache";
8
8
  import require$$2 from "chokidar";
9
- import require$$3 from "fs";
10
9
  import require$$1$2 from "express";
11
10
  import require$$6 from "connect-history-api-fallback";
11
+ import require$$0$1 from "fs";
12
12
  import require$$2$2 from "vue-loader";
13
- import require$$3$2 from "mini-css-extract-plugin";
13
+ import require$$3$1 from "mini-css-extract-plugin";
14
14
  import require$$4$1 from "clean-webpack-plugin";
15
15
  import require$$5$1 from "webpack-bundle-analyzer";
16
16
  import require$$6$1 from "dotenv-webpack";
17
17
  import require$$1$3 from "glob-all";
18
- import require$$3$3 from "webpack-merge";
18
+ import require$$3$2 from "webpack-merge";
19
19
  import require$$4$2 from "webpack-stats-plugin";
20
20
  import require$$6$2 from "css-minimizer-webpack-plugin";
21
21
  import require$$7 from "terser-webpack-plugin";
@@ -28,17 +28,51 @@ import require$$4$3 from "webpack-manifest-plugin";
28
28
  function getDefaultExportFromCjs(x) {
29
29
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
30
30
  }
31
+ var page = `
32
+ <!-- <!DOCTYPE html> -->
33
+ <html {{{ meta.htmlAttrs }}}>
34
+ <head {{{ meta.headAttrs }}}>
35
+ {{{ meta.head }}}
36
+ <link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png">
37
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
38
+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
39
+ <link rel="manifest" href="/favicon/site.webmanifest">
40
+ <link rel="mask-icon" href="/favicon/safari-pinned-tab.svg" color="#5bbad5">
41
+ <meta name="msapplication-TileColor" content="#000000">
42
+ <meta name="theme-color" content="#ffffff">
43
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
44
+ {{{ head }}}
45
+ <!-- Sign in with Apple -->
46
+ <!-- <script type="text/javascript" src="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js"></script> -->
47
+ </head>
48
+ <!-- Google tag (gtag.js) -->
49
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{googleTagId}}"></script>
50
+
51
+ <body {{{ meta.bodyAttrs }}}>
52
+ <div id="app">{{{ appHtml }}}</div>
53
+
54
+ <script type="application/json" data-user-state>
55
+ {{{ userState }}}
56
+ </script>
57
+
58
+ <script>
59
+ window.dataLayer = window.dataLayer || [];
60
+ function gtag(){dataLayer.push(arguments);}
61
+ gtag('js', new Date());
62
+
63
+ gtag('config', '{{googleTagId}}');
64
+ </script>
65
+
66
+ {{{ meta.body }}} {{{ body }}}
67
+ </body>
68
+ </html>
69
+ `;
31
70
  const path$9 = require$$0;
32
71
  const Mustache$1 = require$$1;
33
72
  const chokidar = require$$2;
34
- const { promises: { readFile } } = require$$3;
35
- const templatePath$1 = path$9.resolve(__dirname, "../templates/page.html");
36
- let template;
73
+ const template = page;
74
+ const templatePath = path$9.resolve(__dirname, "../templates/page.js");
37
75
  const renderHtml$1 = async (stuff) => {
38
- if (!template) {
39
- const buffer = await readFile(templatePath$1);
40
- template = buffer.toString();
41
- }
42
76
  const data = {
43
77
  ...stuff,
44
78
  googleTagId: process.env.GOOGLE_TAG_ID,
@@ -47,20 +81,13 @@ const renderHtml$1 = async (stuff) => {
47
81
  return Mustache$1.render(template, data);
48
82
  };
49
83
  const createHtmlRenderer$1 = (onTemplateUpdate) => {
50
- let shouldReload = true;
51
- let currentTemplate;
52
- chokidar.watch(templatePath$1).on("change", () => {
53
- shouldReload = true;
84
+ let currentTemplate = template;
85
+ chokidar.watch(templatePath).on("change", () => {
86
+ delete require.cache[require.resolve(templatePath)];
87
+ currentTemplate = require(templatePath);
54
88
  onTemplateUpdate();
55
89
  });
56
- const loadTemplate = async () => {
57
- if (!shouldReload) return;
58
- const buffer = await readFile(templatePath$1);
59
- currentTemplate = buffer.toString();
60
- shouldReload = false;
61
- };
62
90
  return async (stuff) => {
63
- await loadTemplate();
64
91
  const data = {
65
92
  ...stuff,
66
93
  googleTagId: process.env.GOOGLE_TAG_ID,
@@ -109,7 +136,7 @@ var ssrTransformWebpackStats = {
109
136
  const path$8 = require$$0;
110
137
  const webpack$6 = require$$1$1;
111
138
  const compression$2 = require$$2$1;
112
- const readline$1 = require$$3$1;
139
+ const readline$1 = require$$3;
113
140
  const chalk$1 = require$$4;
114
141
  const devMiddleware$1 = require$$5;
115
142
  const { createHtmlRenderer } = ssrRenderHtml;
@@ -296,7 +323,7 @@ var ssr_prod = function createSsrProdServer(projectRoot, { clientConfig: clientC
296
323
  const path$6 = require$$0;
297
324
  const webpack$5 = require$$1$1;
298
325
  const compression$1 = require$$2$1;
299
- const readline = require$$3$1;
326
+ const readline = require$$3;
300
327
  const chalk = require$$4;
301
328
  const devMiddleware = require$$5;
302
329
  const history$1 = require$$6;
@@ -364,7 +391,7 @@ var spa_dev = function createSpaDevServer(projectRoot, { spaConfig: spaConfig2,
364
391
  createDevRenderer();
365
392
  return startServer;
366
393
  };
367
- const fs$1 = require$$3;
394
+ const fs = require$$0$1;
368
395
  const path$5 = require$$0;
369
396
  const compression = require$$2$1;
370
397
  const express = require$$1$2;
@@ -380,7 +407,7 @@ var spa_prod = function createSpaProdServer(projectRoot, { createServerPath }) {
380
407
  index: "/index.html"
381
408
  }));
382
409
  app.get("*", (req, res) => {
383
- fs$1.readFile(path$5.resolve(projectRoot, "builds/web/spa", "index.html"), "utf-8", (err, content) => {
410
+ fs.readFile(path$5.resolve(projectRoot, "builds/web/spa", "index.html"), "utf-8", (err, content) => {
384
411
  if (err) {
385
412
  console.log('We cannot open "index.html" file.');
386
413
  res.writeHead(500, {
@@ -409,7 +436,7 @@ var spa_prod = function createSpaProdServer(projectRoot, { createServerPath }) {
409
436
  const path$4 = require$$0;
410
437
  const webpack$4 = require$$1$1;
411
438
  const { VueLoaderPlugin } = require$$2$2;
412
- const MiniCssExtractPlugin = require$$3$2;
439
+ const MiniCssExtractPlugin = require$$3$1;
413
440
  const { CleanWebpackPlugin } = require$$4$1;
414
441
  const BundleAnalyzerPlugin = require$$5$1.BundleAnalyzerPlugin;
415
442
  const Dotenv = require$$6$1;
@@ -531,7 +558,7 @@ var webpack_config_base = (projectRoot) => {
531
558
  };
532
559
  const path$3 = require$$0;
533
560
  const glob = require$$1$3;
534
- const { merge: merge$2 } = require$$3$3;
561
+ const { merge: merge$2 } = require$$3$2;
535
562
  const { StatsWriterPlugin: StatsWriterPlugin$1 } = require$$4$2;
536
563
  const CssMinimizerPlugin$1 = require$$6$2;
537
564
  const TerserPlugin$1 = require$$7;
@@ -631,16 +658,16 @@ var webpack_config_server = (projectRoot) => {
631
658
  };
632
659
  const path$1 = require$$0;
633
660
  const webpack$2 = require$$1$1;
634
- const { merge: merge$1 } = require$$3$3;
661
+ const { merge: merge$1 } = require$$3$2;
635
662
  const CssMinimizerPlugin = require$$6$2;
636
663
  const CopyWebpackPlugin = require$$6$3;
637
664
  const TerserPlugin = require$$7;
638
665
  const HtmlWebpackPlugin = require$$8$1;
639
666
  const { StatsWriterPlugin } = require$$4$2;
640
667
  const Mustache = require$$1;
641
- const fs = require$$3.promises;
668
+ require$$0$1.promises;
642
669
  const getClientConfig = webpack_config_client;
643
- const templatePath = path$1.resolve(__dirname, "../templates/page.html");
670
+ path$1.resolve(__dirname, "../templates/page.html");
644
671
  const isProd = process.env.NODE_ENV === "production";
645
672
  var webpack_config_spa = (projectRoot) => {
646
673
  const spaConfig2 = {
@@ -663,7 +690,7 @@ var webpack_config_spa = (projectRoot) => {
663
690
  }),
664
691
  new HtmlWebpackPlugin({
665
692
  templateContent: async () => {
666
- const template2 = await fs.readFile(templatePath, "utf8");
693
+ const template2 = page;
667
694
  const meta = {
668
695
  htmlAttrs: 'lang="en"',
669
696
  headAttrs: "",
@@ -698,7 +725,7 @@ var webpack_config_spa = (projectRoot) => {
698
725
  const path = require$$0;
699
726
  const webpack$1 = require$$1$1;
700
727
  const nodeExternals = require$$2$3;
701
- const { merge } = require$$3$3;
728
+ const { merge } = require$$3$2;
702
729
  const { WebpackManifestPlugin } = require$$4$3;
703
730
  const getBaseConfig = webpack_config_base;
704
731
  var webpack_config_ssr = (projectRoot) => {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");;/* empty css */const M=require("../EmptyState/EmptyState.vue.cjs"),B=require("../Dropdown/Dropdown.vue2.cjs"),N=require("../DatePicker/Calendar.vue2.cjs"),x=require("../BottomSheet/BottomSheet.vue.cjs"),S=require("../../modules/globals/components/blocks/BlockSearch.vue.cjs"),q=require("../../modules/globals/components/blocks/BlockSorting.vue.cjs"),E=require("../../modules/globals/components/blocks/BlockFilter.vue.cjs"),z=require("../../modules/globals/components/elements/ButtonSort.vue.cjs"),O=require("../../modules/globals/components/elements/ButtonDate.vue.cjs"),L=require("../../modules/icons/navigation/IconFilter.vue.cjs");;/* empty css */const F={key:0,class:"flex-nowrap flex gap-thin"},j={__name:"Feed",props:e.mergeModels({showLoadMore:{type:Boolean,default:!0},search:{type:[Boolean,Object],default:!1},states:{type:Object,default:()=>({empty:{title:String,description:String}})},store:{type:Object,default:()=>({read:Function,state:Object})},external:{type:Boolean,default:!1},options:{type:Object,default:()=>({category:null,limit:20,skip:0,owner:null,creator:null,user:null,status:null,period:null,contain:null})}},{search:{},searchModifiers:{},sort:{},sortModifiers:{},filter:{},filterModifiers:{},date:{},dateModifiers:{},items:{},itemsModifiers:{}}),emits:["update:search","update:sort","update:filter","update:date","update:items"],setup(s){const m=e.useModel(s,"search"),a=e.useModel(s,"sort"),o=e.useModel(s,"filter"),r=e.useModel(s,"date"),h=e.useModel(s,"items"),u=s,n=e.ref(h.value||[]),d=e.ref(!1);let p=e.ref(!0),b=e.ref(null),i=e.ref(u.options.skip?u.options.skip:0),v=e.ref(u.options.limit?u.options.limit:10),k=e.ref("");function C(t){k.value=t,i.value=0,v.value=10,f()}const y=async()=>{if(d.value){i.value+=v.value;const t=await u.store.read({skip:i.value,limit:v.value,search:k.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:a.value?a.value.param:null,sortOrder:a.value?a.value.order:null,...u.options});t.length===0||t.length<v.value?d.value=!1:d.value=!0,n.value=[...n.value,...t],h.value&&(h.value=n.value)}},f=async()=>{const t=await u.store.read({skip:i.value,limit:v.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:a.value?a.value.param:null,sortOrder:a.value?a.value.order:null,search:k.value,...u.options});t.length===0||t.length<v.value?d.value=!1:d.value=!0,n.value=t,h.value&&(h.value=n.value),p.value=!1};e.watch(()=>u.external,(t,l)=>{t!==l&&(i.value=0,f())},{deep:!0}),e.watch(()=>r.value,(t,l)=>{t!==l&&(i.value=0,f())},{deep:!0}),e.watch(()=>{var t;return(t=a.value)==null?void 0:t.order},(t,l)=>{t!==l&&(i.value=0,f())}),e.watch(()=>{var t;return(t=a.value)==null?void 0:t.param},(t,l)=>{t!==l&&(i.value=0,f())}),e.watch(()=>u.options,(t,l)=>{(t.organization!==l.organization||t.categories!==l.categories||t.prices!==l.prices||t.delivery!==l.delivery||t.search!==l.search||t.status!==l.status||t.hidden!==l.hidden||t.type!==l.type||t.tags!==l.tags||t.following!==l.following)&&(i.value=0,f())},{deep:!0});let g=null;return e.onMounted(async()=>{await f(),typeof window<"u"&&!u.showLoadMore&&(g=new IntersectionObserver(t=>{t.some(l=>l.isIntersecting)&&y()}),g.observe(b.value))}),e.onUnmounted(()=>{g&&g.disconnect()}),(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m.value||r.value||a.value&&!a.value.hideButton?(e.openBlock(),e.createElementBlock("div",F,[m.value?(e.openBlock(),e.createBlock(S.default,{key:0,placeholder:m.value.placeholder||"Search...",class:e.normalizeClass(m.value.class||"bg-light"),onSearch:C},null,8,["placeholder","class"])):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass([o.value.class||"bg-light","flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100"])},[e.createVNode(L.default,{onClick:l[0]||(l[0]=()=>o.value.active=!o.value.active),class:"w-1r h-auto"})],2),o.value.active?(e.openBlock(),e.createBlock(x.default,{key:0,show:o.value.active,onToggle:l[2]||(l[2]=()=>o.value.active=!1),class:e.normalizeClass(["z-index-10 pos-fixed pos-t-0 pos-r-0",{"pos-t-0":o.value.active,"pos-t-100":!o.value.active}])},{default:e.withCtx(()=>[e.createVNode(E.default,{filter:o.value,"onUpdate:filter":l[1]||(l[1]=c=>o.value=c),options:o.value.options,class:"h-100 w-100 pd-small bg-light"},null,8,["filter","options"])]),_:1},8,["show","class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(B.default,{key:2,label:{component:O.default,props:{date:r.value}},class:e.normalizeClass([r.value.class||"bg-light","flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(N.default,{date:r.value,"onUpdate:date":l[3]||(l[3]=c=>r.value=c),locale:t.$i18n.locale,allowRange:!0,class:"radius-semi w-100 o-hidden bg-light"},null,8,["date","locale"])]),_:1},8,["label","class","align"])):e.createCommentVNode("",!0),a.value&&!a.value.hideButton?(e.openBlock(),e.createBlock(B.default,{key:3,label:{component:z.default,props:{order:a.value.order},class:"w-1r"},class:e.normalizeClass([a.value.class||"bg-light","radius-extra aspect-1x1 h-100"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(q.default,{param:a.value.param,"onUpdate:param":l[4]||(l[4]=c=>a.value.param=c),order:a.value.order,"onUpdate:order":l[5]||(l[5]=c=>a.value.order=c),options:a.value.options,class:"h-100 pd-small radius-semi t-white bg-black"},null,8,["param","order","options"])]),_:1},8,["label","class","align"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:1,tag:"ul",name:"scaleTransition"},{default:e.withCtx(()=>[e.unref(p)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(v),c=>(e.openBlock(),e.createBlock(w.default,{key:"skeleton-"+c,class:"mn-b-small radius-big o-hidden d-block"}))),128)):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),!e.unref(p)&&n.value.length<1?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:2,tag:"ul",name:"feed"},{default:e.withCtx(()=>[!e.unref(p)&&n.value.length<1?(e.openBlock(),e.createBlock(M.default,{key:0,title:s.states.empty.title,description:s.states.empty.description,action:s.states.empty.action,callback:s.states.empty.callback,class:"pd-medium mn-b-thin bg-light radius-big"},null,8,["title","description","action","callback"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.TransitionGroup,{tag:"ul",name:"feed",class:e.normalizeClass(t.$attrs.class)},{default:e.withCtx(()=>[!e.unref(p)&&n.value.length>0?e.renderSlot(t.$slots,"default",{key:0,items:n.value}):e.createCommentVNode("",!0),s.showLoadMore&&d.value&&n.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:y,class:"col-w-100 w-100 bg-main button"}," Load More ")):e.createCommentVNode("",!0),e.createElementVNode("div",{key:"sentinel",ref_key:"sentinel",ref:b,class:"sentinel"},null,512)]),_:3},8,["class"])],64))}};exports.default=j;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");;/* empty css */const M=require("../EmptyState/EmptyState.vue.cjs"),B=require("../Dropdown/Dropdown.vue.cjs"),N=require("../DatePicker/Calendar.vue2.cjs"),x=require("../BottomSheet/BottomSheet.vue.cjs"),S=require("../../modules/globals/components/blocks/BlockSearch.vue.cjs"),q=require("../../modules/globals/components/blocks/BlockSorting.vue.cjs"),E=require("../../modules/globals/components/blocks/BlockFilter.vue.cjs"),z=require("../../modules/globals/components/elements/ButtonSort.vue.cjs"),O=require("../../modules/globals/components/elements/ButtonDate.vue.cjs"),L=require("../../modules/icons/navigation/IconFilter.vue.cjs");;/* empty css */const F={key:0,class:"flex-nowrap flex gap-thin"},j={__name:"Feed",props:e.mergeModels({showLoadMore:{type:Boolean,default:!0},search:{type:[Boolean,Object],default:!1},states:{type:Object,default:()=>({empty:{title:String,description:String}})},store:{type:Object,default:()=>({read:Function,state:Object})},external:{type:Boolean,default:!1},options:{type:Object,default:()=>({category:null,limit:20,skip:0,owner:null,creator:null,user:null,status:null,period:null,contain:null})}},{search:{},searchModifiers:{},sort:{},sortModifiers:{},filter:{},filterModifiers:{},date:{},dateModifiers:{},items:{},itemsModifiers:{}}),emits:["update:search","update:sort","update:filter","update:date","update:items"],setup(s){const m=e.useModel(s,"search"),a=e.useModel(s,"sort"),o=e.useModel(s,"filter"),r=e.useModel(s,"date"),h=e.useModel(s,"items"),u=s,n=e.ref(h.value||[]),d=e.ref(!1);let p=e.ref(!0),b=e.ref(null),i=e.ref(u.options.skip?u.options.skip:0),v=e.ref(u.options.limit?u.options.limit:10),k=e.ref("");function C(t){k.value=t,i.value=0,v.value=10,f()}const y=async()=>{if(d.value){i.value+=v.value;const t=await u.store.read({skip:i.value,limit:v.value,search:k.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:a.value?a.value.param:null,sortOrder:a.value?a.value.order:null,...u.options});t.length===0||t.length<v.value?d.value=!1:d.value=!0,n.value=[...n.value,...t],h.value&&(h.value=n.value)}},f=async()=>{const t=await u.store.read({skip:i.value,limit:v.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:a.value?a.value.param:null,sortOrder:a.value?a.value.order:null,search:k.value,...u.options});t.length===0||t.length<v.value?d.value=!1:d.value=!0,n.value=t,h.value&&(h.value=n.value),p.value=!1};e.watch(()=>u.external,(t,l)=>{t!==l&&(i.value=0,f())},{deep:!0}),e.watch(()=>r.value,(t,l)=>{t!==l&&(i.value=0,f())},{deep:!0}),e.watch(()=>{var t;return(t=a.value)==null?void 0:t.order},(t,l)=>{t!==l&&(i.value=0,f())}),e.watch(()=>{var t;return(t=a.value)==null?void 0:t.param},(t,l)=>{t!==l&&(i.value=0,f())}),e.watch(()=>u.options,(t,l)=>{(t.organization!==l.organization||t.categories!==l.categories||t.prices!==l.prices||t.delivery!==l.delivery||t.search!==l.search||t.status!==l.status||t.hidden!==l.hidden||t.type!==l.type||t.tags!==l.tags||t.following!==l.following)&&(i.value=0,f())},{deep:!0});let g=null;return e.onMounted(async()=>{await f(),typeof window<"u"&&!u.showLoadMore&&(g=new IntersectionObserver(t=>{t.some(l=>l.isIntersecting)&&y()}),g.observe(b.value))}),e.onUnmounted(()=>{g&&g.disconnect()}),(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m.value||r.value||a.value&&!a.value.hideButton?(e.openBlock(),e.createElementBlock("div",F,[m.value?(e.openBlock(),e.createBlock(S.default,{key:0,placeholder:m.value.placeholder||"Search...",class:e.normalizeClass(m.value.class||"bg-light"),onSearch:C},null,8,["placeholder","class"])):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass([o.value.class||"bg-light","flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100"])},[e.createVNode(L.default,{onClick:l[0]||(l[0]=()=>o.value.active=!o.value.active),class:"w-1r h-auto"})],2),o.value.active?(e.openBlock(),e.createBlock(x.default,{key:0,show:o.value.active,onToggle:l[2]||(l[2]=()=>o.value.active=!1),class:e.normalizeClass(["z-index-10 pos-fixed pos-t-0 pos-r-0",{"pos-t-0":o.value.active,"pos-t-100":!o.value.active}])},{default:e.withCtx(()=>[e.createVNode(E.default,{filter:o.value,"onUpdate:filter":l[1]||(l[1]=c=>o.value=c),options:o.value.options,class:"h-100 w-100 pd-small bg-light"},null,8,["filter","options"])]),_:1},8,["show","class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(B.default,{key:2,label:{component:O.default,props:{date:r.value}},class:e.normalizeClass([r.value.class||"bg-light","flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(N.default,{date:r.value,"onUpdate:date":l[3]||(l[3]=c=>r.value=c),locale:t.$i18n.locale,allowRange:!0,class:"radius-semi w-100 o-hidden bg-light"},null,8,["date","locale"])]),_:1},8,["label","class","align"])):e.createCommentVNode("",!0),a.value&&!a.value.hideButton?(e.openBlock(),e.createBlock(B.default,{key:3,label:{component:z.default,props:{order:a.value.order},class:"w-1r"},class:e.normalizeClass([a.value.class||"bg-light","radius-extra aspect-1x1 h-100"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(q.default,{param:a.value.param,"onUpdate:param":l[4]||(l[4]=c=>a.value.param=c),order:a.value.order,"onUpdate:order":l[5]||(l[5]=c=>a.value.order=c),options:a.value.options,class:"h-100 pd-small radius-semi t-white bg-black"},null,8,["param","order","options"])]),_:1},8,["label","class","align"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:1,tag:"ul",name:"scaleTransition"},{default:e.withCtx(()=>[e.unref(p)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(v),c=>(e.openBlock(),e.createBlock(w.default,{key:"skeleton-"+c,class:"mn-b-small radius-big o-hidden d-block"}))),128)):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),!e.unref(p)&&n.value.length<1?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:2,tag:"ul",name:"feed"},{default:e.withCtx(()=>[!e.unref(p)&&n.value.length<1?(e.openBlock(),e.createBlock(M.default,{key:0,title:s.states.empty.title,description:s.states.empty.description,action:s.states.empty.action,callback:s.states.empty.callback,class:"pd-medium mn-b-thin bg-light radius-big"},null,8,["title","description","action","callback"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.TransitionGroup,{tag:"ul",name:"feed",class:e.normalizeClass(t.$attrs.class)},{default:e.withCtx(()=>[!e.unref(p)&&n.value.length>0?e.renderSlot(t.$slots,"default",{key:0,items:n.value}):e.createCommentVNode("",!0),s.showLoadMore&&d.value&&n.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:y,class:"col-w-100 w-100 bg-main button"}," Load More ")):e.createCommentVNode("",!0),e.createElementVNode("div",{key:"sentinel",ref_key:"sentinel",ref:b,class:"sentinel"},null,512)]),_:3},8,["class"])],64))}};exports.default=j;
@@ -2,7 +2,7 @@ import { mergeModels as N, useModel as M, ref as g, watch as $, onMounted as T,
2
2
  import q from "../../modules/icons/skeletons/SkeletonEvent.vue.js";
3
3
  /* empty css */
4
4
  import A from "../EmptyState/EmptyState.vue.js";
5
- import z from "../Dropdown/Dropdown.vue2.js";
5
+ import z from "../Dropdown/Dropdown.vue.js";
6
6
  import D from "../DatePicker/Calendar.vue2.js";
7
7
  import H from "../BottomSheet/BottomSheet.vue.js";
8
8
  import J from "../../modules/globals/components/blocks/BlockSearch.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../Field/Field.vue.cjs"),k=require("../../modules/icons/navigation/IconArrow.vue.cjs"),B=require("vue-i18n"),S={class:"pd-thin radius-extra flex-nowrap flex"},F={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["Lowest THC, please!","Something with banana flavors?","I'm in the mood for trippy vibes."],ru:["Я хочу самый низкий THC","Я хочу чего-нибудь бананового","Я хочу курнуть хейза"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(r,{emit:y}){const t=r,{t:N,locale:s}=B.useI18n();let o=e.ref(0),a=e.ref(t.input),f=e.ref(t.placeholder),i=e.ref(t.enableTyping),p=e.ref(null),d=e.ref(""),c=e.ref(!0),v=null;const m=y;function b(){m("action")}function T(n){m("update:input",n),d.value=n}function g(){o.value=(o.value+1)%t.placeholderTexts[s.value].length}function I(){i.value=!1,clearInterval(p.value),f.value=t.placeholder,d.value||(a.value="")}function x(){!d.value&&t.enableTyping&&(i.value=!0,f.value="",h())}function h(){let n=t.placeholderTexts[s.value][o.value],l=0,u=!1;v=setInterval(()=>{c.value=!c.value},200),p.value=setInterval(()=>{i.value&&(u?(a.value=a.value.slice(0,-1),a.value=n.substring(0,l)+(c.value&&l%2?"|":""),l--):(a.value=n.substring(0,l)+(c.value&&l%2?"|":""),l++),l>n.length&&t.loopTyping&&setTimeout(()=>{u=!0,a.value=n.substring(0,l)},333),l===0&&u&&(u=!1,g(),n=t.placeholderTexts[s.value][o.value]))},t.typingSpeed)}return e.onMounted(()=>{t.enableTyping&&h()}),e.watchEffect(()=>{i.value||(clearInterval(p.value),clearInterval(v))}),(n,l)=>(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(w.default,{field:e.unref(a),"onUpdate:field":[l[0]||(l[0]=u=>e.isRef(a)?a.value=u:a=u),T],placeholder:e.unref(i)?"":r.placeholder,onInput:g,onFocus:I,onBlur:x,class:"w-100 p-medium t-regular uppercase pd-small"},null,8,["field","placeholder"]),r.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:b,class:"t-nowrap t-medium radius-big uppercase cursor-pointer flex flex-v-center pd-r-small pd-l-small w-max hover-bg-fifth t-semi transition-linear transition-timing-1 t-black bg-main"},[e.createElementVNode("span",null,e.toDisplayString(r.action),1),e.createVNode(k.default,{class:"mn-l-thin radius-extra bg-white i-medium"})])):e.createCommentVNode("",!0)]))}};exports.default=F;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../Field/Field.vue2.cjs"),k=require("../../modules/icons/navigation/IconArrow.vue.cjs"),B=require("vue-i18n"),S={class:"pd-thin radius-extra flex-nowrap flex"},F={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["Lowest THC, please!","Something with banana flavors?","I'm in the mood for trippy vibes."],ru:["Я хочу самый низкий THC","Я хочу чего-нибудь бананового","Я хочу курнуть хейза"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(r,{emit:y}){const t=r,{t:N,locale:s}=B.useI18n();let o=e.ref(0),a=e.ref(t.input),f=e.ref(t.placeholder),i=e.ref(t.enableTyping),p=e.ref(null),d=e.ref(""),c=e.ref(!0),v=null;const m=y;function b(){m("action")}function T(n){m("update:input",n),d.value=n}function g(){o.value=(o.value+1)%t.placeholderTexts[s.value].length}function I(){i.value=!1,clearInterval(p.value),f.value=t.placeholder,d.value||(a.value="")}function x(){!d.value&&t.enableTyping&&(i.value=!0,f.value="",h())}function h(){let n=t.placeholderTexts[s.value][o.value],l=0,u=!1;v=setInterval(()=>{c.value=!c.value},200),p.value=setInterval(()=>{i.value&&(u?(a.value=a.value.slice(0,-1),a.value=n.substring(0,l)+(c.value&&l%2?"|":""),l--):(a.value=n.substring(0,l)+(c.value&&l%2?"|":""),l++),l>n.length&&t.loopTyping&&setTimeout(()=>{u=!0,a.value=n.substring(0,l)},333),l===0&&u&&(u=!1,g(),n=t.placeholderTexts[s.value][o.value]))},t.typingSpeed)}return e.onMounted(()=>{t.enableTyping&&h()}),e.watchEffect(()=>{i.value||(clearInterval(p.value),clearInterval(v))}),(n,l)=>(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(w.default,{field:e.unref(a),"onUpdate:field":[l[0]||(l[0]=u=>e.isRef(a)?a.value=u:a=u),T],placeholder:e.unref(i)?"":r.placeholder,onInput:g,onFocus:I,onBlur:x,class:"w-100 p-medium t-regular uppercase pd-small"},null,8,["field","placeholder"]),r.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:b,class:"t-nowrap t-medium radius-big uppercase cursor-pointer flex flex-v-center pd-r-small pd-l-small w-max hover-bg-fifth t-semi transition-linear transition-timing-1 t-black bg-main"},[e.createElementVNode("span",null,e.toDisplayString(r.action),1),e.createVNode(k.default,{class:"mn-l-thin radius-extra bg-white i-medium"})])):e.createCommentVNode("",!0)]))}};exports.default=F;
@@ -1,5 +1,5 @@
1
1
  import { ref as i, onMounted as F, watchEffect as C, openBlock as y, createElementBlock as b, createVNode as x, unref as T, isRef as N, createElementVNode as V, toDisplayString as E, createCommentVNode as A } from "vue";
2
- import H from "../Field/Field.vue.js";
2
+ import H from "../Field/Field.vue2.js";
3
3
  import _ from "../../modules/icons/navigation/IconArrow.vue.js";
4
4
  import { useI18n as j } from "vue-i18n";
5
5
  const D = { class: "pd-thin radius-extra flex-nowrap flex" }, U = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */require("vue-i18n");;/* empty css */const r=require("vue-router");require("../../store/auth.cjs");require("../../../middlewares/client/inputs.validation.cjs");const n={class:"cols-2-1_2 gap-small pd-small bg-white"},u=e.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),s={__name:"Auth",setup(a){return e.ref(null),e.ref(null),e.ref(null),r.useRoute(),r.useRouter(),e.ref("email"),(o,c)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",n,[e.createVNode(t,{class:"pd-medium br-solid br-1px br-grey-transp-25 radius-big w-m-66r t-center"},{default:e.withCtx(({Component:l,route:i})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l),{ref:"page",key:i.path,localPosition:o.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),u])}}};exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */require("vue-i18n");;/* empty css */const r=require("vue-router");require("../../store/auth.cjs");require("../../../middlewares/client/inputs.validation.cjs");const n={class:"cols-2-1_2 gap-small pd-small bg-white"},u=e.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),s={__name:"Auth",setup(a){return e.ref(null),e.ref(null),e.ref(null),r.useRoute(),r.useRouter(),e.ref("email"),(o,c)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",n,[e.createVNode(t,{class:"pd-medium br-solid br-1px br-grey-transp-25 radius-big w-m-66r t-center"},{default:e.withCtx(({Component:l,route:i})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l),{ref:"page",key:i.path,localPosition:o.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),u])}}};exports.default=s;
@@ -1,8 +1,8 @@
1
1
  import { ref as e, resolveComponent as a, openBlock as o, createElementBlock as m, createVNode as t, withCtx as r, Transition as c, createBlock as p, resolveDynamicComponent as u, createElementVNode as d } from "vue";
2
2
  /* empty css */
3
- /* empty css */
3
+ /* empty css */
4
+ /* empty css */
4
5
  /* empty css */
5
- /* empty css */
6
6
  import "vue-i18n";
7
7
  /* empty css */
8
8
  import { useRoute as _, useRouter as f } from "vue-router";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");;/* empty css */const f=require("vue-router"),w=require("vue-i18n"),E=require("../../store/auth.cjs"),p=require("../../store/twofa.cjs"),c=require("../../../globals/store/globals.cjs"),S=require("../../localization/EnterCode.json.cjs"),q={class:"t-center pd-medium"},D={class:"mn-b-medium"},I={class:"mn-b-big t-transp"},k={class:"w-100 mn-b-big flex-nowrap flex"},C={key:1},N={__name:"EnterCode",setup(V){const g=f.useRoute(),v=f.useRouter(),{t:d}=w.useI18n({useScope:"global",...S.default}),o=n.reactive({digits:["","","",""],error:null});n.watch(()=>o.digits[0],s=>{if(s&&String(s).length>1){let e=String(s).split("");console.log(e);let t=[...o.digits];e.forEach((l,r)=>{console.log(r),console.log(t[r]),console.log(l),t[r]=l}),o.digits=t,u(3)}});const m=n.ref(null),i=n.ref(0);async function y(){try{await p.sendCode(E.state.user,g.query.method,g.query.type),i.value=30;const s=setInterval(()=>{i.value>0?i.value-=1:clearInterval(s)},1e3)}catch{c.setError({response:{data:{errorCode:"CODE_NOT_SENT"}}})}}const a=(s,e)=>{if(s.key==="Backspace"&&(o.digits[e]===null||o.digits[e]===void 0||o.digits[e]==="")){s.preventDefault();const t=document.querySelectorAll("input"),l=e>0?t[e-1]:null;l&&(l.focus(),l.setSelectionRange(l.value.length,l.value.length))}},u=s=>{const e=document.querySelectorAll("input"),t=e[s+1],l=s>0?e[s-1]:null;if(o.digits[s]!==""&&o.digits[s]!==null&&o.digits[s]!==void 0&&s<4&&(s<3?t.focus():m.value.focus()),(o.digits[s]===null||o.digits[s]===void 0||o.digits[s]==="")&&s>0&&l.focus(),o.digits.every(r=>r!=="")){const r=o.digits.join(""),b=p.state.code.code.toString();r===b?(p.state.code.isValid=!0,v.push({path:"/auth/enter-password",query:{type:p.state.code.type,method:g.query.method}})):(c.setError({response:{data:{errorCode:"WRONG_CODE"}}}),m.value.focus(),o.digits=["","","",""])}};return(s,e)=>(n.openBlock(),n.createElementBlock("section",q,[n.createElementVNode("h3",D,n.toDisplayString(n.unref(d)("verifyNumberTitle")),1),n.createElementVNode("p",I,n.toDisplayString(n.unref(d)("instructions")),1),n.createElementVNode("div",k,[n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[0]||(e[0]=t=>o.digits[0]=t),ref_key:"firstInput",ref:m,maxlength:"1",onInput:e[1]||(e[1]=t=>u(0)),onPaste:e[2]||(e[2]=t=>s.onPaste(t,0)),onKeydown:e[3]||(e[3]=t=>a(t,0)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[0]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[4]||(e[4]=t=>o.digits[1]=t),maxlength:"1",onInput:e[5]||(e[5]=t=>u(1)),onPaste:e[6]||(e[6]=t=>s.onPaste(t,1)),onKeydown:e[7]||(e[7]=t=>a(t,1)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[1]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[8]||(e[8]=t=>o.digits[2]=t),maxlength:"1",onInput:e[9]||(e[9]=t=>u(2)),onPaste:e[10]||(e[10]=t=>s.onPaste(t,2)),onKeydown:e[11]||(e[11]=t=>a(t,2)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[2]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[12]||(e[12]=t=>o.digits[3]=t),maxlength:"1",onInput:e[13]||(e[13]=t=>u(3)),onPaste:e[14]||(e[14]=t=>s.onPaste(t,3)),onKeydown:e[15]||(e[15]=t=>a(t,3)),class:"w-100 h1 pd-small t-center bg-light radius-small"},null,544),[[n.vModelText,o.digits[3]]])]),i.value<1?(n.openBlock(),n.createElementBlock("a",{key:0,onClick:y,class:"t-blue"},n.toDisplayString(n.unref(d)("resendCode")),1)):(n.openBlock(),n.createElementBlock("span",C,n.toDisplayString(i.value)+" "+n.toDisplayString(n.unref(d)("secondsResend")),1))]))}};exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");;/* empty css */const f=require("vue-router"),w=require("vue-i18n"),E=require("../../store/auth.cjs"),p=require("../../store/twofa.cjs"),c=require("../../../globals/store/globals.cjs"),S=require("../../localization/EnterCode.json.cjs"),q={class:"t-center pd-medium"},D={class:"mn-b-medium"},I={class:"mn-b-big t-transp"},k={class:"w-100 mn-b-big flex-nowrap flex"},C={key:1},N={__name:"EnterCode",setup(V){const g=f.useRoute(),v=f.useRouter(),{t:d}=w.useI18n({useScope:"global",...S.default}),o=n.reactive({digits:["","","",""],error:null});n.watch(()=>o.digits[0],s=>{if(s&&String(s).length>1){let e=String(s).split("");console.log(e);let t=[...o.digits];e.forEach((l,r)=>{console.log(r),console.log(t[r]),console.log(l),t[r]=l}),o.digits=t,u(3)}});const m=n.ref(null),i=n.ref(0);async function y(){try{await p.sendCode(E.state.user,g.query.method,g.query.type),i.value=30;const s=setInterval(()=>{i.value>0?i.value-=1:clearInterval(s)},1e3)}catch{c.setError({response:{data:{errorCode:"CODE_NOT_SENT"}}})}}const a=(s,e)=>{if(s.key==="Backspace"&&(o.digits[e]===null||o.digits[e]===void 0||o.digits[e]==="")){s.preventDefault();const t=document.querySelectorAll("input"),l=e>0?t[e-1]:null;l&&(l.focus(),l.setSelectionRange(l.value.length,l.value.length))}},u=s=>{const e=document.querySelectorAll("input"),t=e[s+1],l=s>0?e[s-1]:null;if(o.digits[s]!==""&&o.digits[s]!==null&&o.digits[s]!==void 0&&s<4&&(s<3?t.focus():m.value.focus()),(o.digits[s]===null||o.digits[s]===void 0||o.digits[s]==="")&&s>0&&l.focus(),o.digits.every(r=>r!=="")){const r=o.digits.join(""),b=p.state.code.code.toString();r===b?(p.state.code.isValid=!0,v.push({path:"/auth/enter-password",query:{type:p.state.code.type,method:g.query.method}})):(c.setError({response:{data:{errorCode:"WRONG_CODE"}}}),m.value.focus(),o.digits=["","","",""])}};return(s,e)=>(n.openBlock(),n.createElementBlock("section",q,[n.createElementVNode("h3",D,n.toDisplayString(n.unref(d)("verifyNumberTitle")),1),n.createElementVNode("p",I,n.toDisplayString(n.unref(d)("instructions")),1),n.createElementVNode("div",k,[n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[0]||(e[0]=t=>o.digits[0]=t),ref_key:"firstInput",ref:m,maxlength:"1",onInput:e[1]||(e[1]=t=>u(0)),onPaste:e[2]||(e[2]=t=>s.onPaste(t,0)),onKeydown:e[3]||(e[3]=t=>a(t,0)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[0]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[4]||(e[4]=t=>o.digits[1]=t),maxlength:"1",onInput:e[5]||(e[5]=t=>u(1)),onPaste:e[6]||(e[6]=t=>s.onPaste(t,1)),onKeydown:e[7]||(e[7]=t=>a(t,1)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[1]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[8]||(e[8]=t=>o.digits[2]=t),maxlength:"1",onInput:e[9]||(e[9]=t=>u(2)),onPaste:e[10]||(e[10]=t=>s.onPaste(t,2)),onKeydown:e[11]||(e[11]=t=>a(t,2)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[2]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[12]||(e[12]=t=>o.digits[3]=t),maxlength:"1",onInput:e[13]||(e[13]=t=>u(3)),onPaste:e[14]||(e[14]=t=>s.onPaste(t,3)),onKeydown:e[15]||(e[15]=t=>a(t,3)),class:"w-100 h1 pd-small t-center bg-light radius-small"},null,544),[[n.vModelText,o.digits[3]]])]),i.value<1?(n.openBlock(),n.createElementBlock("a",{key:0,onClick:y,class:"t-blue"},n.toDisplayString(n.unref(d)("resendCode")),1)):(n.openBlock(),n.createElementBlock("span",C,n.toDisplayString(i.value)+" "+n.toDisplayString(n.unref(d)("secondsResend")),1))]))}};exports.default=N;
@@ -1,5 +1,5 @@
1
1
  import { reactive as P, watch as D, ref as c, openBlock as b, createElementBlock as w, createElementVNode as r, toDisplayString as d, unref as m, withDirectives as g, vModelText as f } from "vue";
2
- /* empty css */
2
+ /* empty css */
3
3
  import { useRoute as q, useRouter as $ } from "vue-router";
4
4
  import { useI18n as K } from "vue-i18n";
5
5
  import { state as N } from "../../store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const l=require("../../../../components/Field/Field.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs"),i=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");;/* empty css */const _={class:"t-left pd-medium"},y={class:"mn-b-small"},g={key:0,class:"mn-b-semi t-transp"},b={key:1,class:"mn-b-semi t-transp"},k={class:"mn-b-semi radius-small o-hidden"},q={key:2,class:"p-medium t-semi mn-b-semi"},B=e.createElementVNode("a",{class:"t-second",href:"/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),E={key:0},P={key:1},v={__name:"EnterPassword",setup(S){const n=e.ref(null),{t:s}=h.useI18n({useScope:"global",...w.default}),r=i.useRoute(),u=i.useRouter();e.ref("phone");async function c(){try{await d.validateInputs(n,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",_,[e.createElementVNode("h3",y,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",b,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",k,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",q,[e.createTextVNode(" By registering, you agree to our "),B])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const l=require("../../../../components/Field/Field.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),i=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");;/* empty css */const _={class:"t-left pd-medium"},y={class:"mn-b-small"},g={key:0,class:"mn-b-semi t-transp"},b={key:1,class:"mn-b-semi t-transp"},k={class:"mn-b-semi radius-small o-hidden"},q={key:2,class:"p-medium t-semi mn-b-semi"},B=e.createElementVNode("a",{class:"t-second",href:"/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),E={key:0},P={key:1},v={__name:"EnterPassword",setup(S){const n=e.ref(null),{t:s}=h.useI18n({useScope:"global",...w.default}),r=i.useRoute(),u=i.useRouter();e.ref("phone");async function c(){try{await d.validateInputs(n,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",_,[e.createElementVNode("h3",y,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",b,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",k,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",q,[e.createTextVNode(" By registering, you agree to our "),B])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=v;
@@ -1,7 +1,7 @@
1
1
  import { ref as u, openBlock as o, createElementBlock as a, createElementVNode as p, toDisplayString as i, unref as e, createVNode as l, createTextVNode as g, createCommentVNode as b, withCtx as P } from "vue";
2
2
  /* empty css */
3
- import c from "../../../../components/Field/Field.vue.js";
4
- import k from "../../../../components/Button/Button.vue.js";
3
+ import c from "../../../../components/Field/Field.vue2.js";
4
+ import k from "../../../../components/Button/Button.vue2.js";
5
5
  import { useRoute as q, useRouter as v } from "vue-router";
6
6
  import { useI18n as E } from "vue-i18n";
7
7
  import { state as s, actions as h } from "../../store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const n=require("../../../../components/Field/Field.vue.cjs"),m=require("../../../../components/Button/Button.vue.cjs"),l=require("vue-router"),t=require("../../store/auth.cjs"),_=require("../../../organizations/store/invites.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const f={class:"t-left pd-medium"},h=e.createElementVNode("h3",{class:"mn-b-small"},"You have been invited to the organization",-1),w=e.createElementVNode("p",{class:"mn-b-semi t-transp"},"Please provide a password to complete the registration.",-1),v={class:"mn-b-semi radius-small o-hidden"},b=e.createElementVNode("span",null,"Join",-1),q={__name:"Invite",setup(g){const i=e.ref(null),a=l.useRoute(),u=l.useRouter();e.onMounted(async()=>{await _.actions.readOne(a.query.inviteCode)});async function c(){try{await d.validateInputs(i,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}try{await t.actions.signup(t.state.user,a.query.type,a.query.inviteCode)}catch(r){console.log(r)}}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(r,s)=>(e.openBlock(),e.createElementBlock("section",f,[h,w,e.createElementVNode("div",v,[e.createVNode(n.default,{field:t.state.user.password,"onUpdate:field":s[0]||(s[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Password",placeholder:"******",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field","validation"]),e.createVNode(n.default,{field:t.state.user.passwordRepeat,"onUpdate:field":s[1]||(s[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Repeat Password",placeholder:"******",class:"bg-light pd-medium radius-small"},null,8,["field"])]),e.createVNode(m.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[b]),_:1})]))}};exports.default=q;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const n=require("../../../../components/Field/Field.vue2.cjs"),m=require("../../../../components/Button/Button.vue2.cjs"),l=require("vue-router"),t=require("../../store/auth.cjs"),_=require("../../../organizations/store/invites.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const f={class:"t-left pd-medium"},h=e.createElementVNode("h3",{class:"mn-b-small"},"You have been invited to the organization",-1),w=e.createElementVNode("p",{class:"mn-b-semi t-transp"},"Please provide a password to complete the registration.",-1),v={class:"mn-b-semi radius-small o-hidden"},b=e.createElementVNode("span",null,"Join",-1),q={__name:"Invite",setup(g){const i=e.ref(null),a=l.useRoute(),u=l.useRouter();e.onMounted(async()=>{await _.actions.readOne(a.query.inviteCode)});async function c(){try{await d.validateInputs(i,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}try{await t.actions.signup(t.state.user,a.query.type,a.query.inviteCode)}catch(r){console.log(r)}}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(r,s)=>(e.openBlock(),e.createElementBlock("section",f,[h,w,e.createElementVNode("div",v,[e.createVNode(n.default,{field:t.state.user.password,"onUpdate:field":s[0]||(s[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Password",placeholder:"******",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field","validation"]),e.createVNode(n.default,{field:t.state.user.passwordRepeat,"onUpdate:field":s[1]||(s[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Repeat Password",placeholder:"******",class:"bg-light pd-medium radius-small"},null,8,["field"])]),e.createVNode(m.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[b]),_:1})]))}};exports.default=q;
@@ -1,7 +1,7 @@
1
1
  import { ref as u, onMounted as c, openBlock as f, createElementBlock as w, createElementVNode as s, createVNode as i, withCtx as _ } from "vue";
2
2
  /* empty css */
3
- import l from "../../../../components/Field/Field.vue.js";
4
- import h from "../../../../components/Button/Button.vue.js";
3
+ import l from "../../../../components/Field/Field.vue2.js";
4
+ import h from "../../../../components/Button/Button.vue2.js";
5
5
  import { useRoute as b, useRouter as v } from "vue-router";
6
6
  import { state as e, actions as y } from "../../store/auth.js";
7
7
  import { actions as g } from "../../../organizations/store/invites.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue.cjs"),u=require("vue-router"),b=require("vue-i18n"),g=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const w={class:"t-left pd-medium"},V={class:"mn-b-small"},N={class:"mn-b-small t-transp"},q={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},y={class:"pos-relative"},E={key:0,class:"mn-b-semi radius-small o-hidden"},C={class:"mn-b-small t-transp"},S={key:0,class:"mn-b-semi radius-small o-hidden"},k={class:"mn-b-small t-transp"},P={__name:"ResetPassword",setup(I){const{t}=b.useI18n({useScope:"global",...g.default}),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",w,[e.createElementVNode("h3",V,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",N,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",q,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",y,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",C,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{onChange:o[1]||(o[1]=l=>s.state.user.phone=l),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),u=require("vue-router"),b=require("vue-i18n"),g=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const w={class:"t-left pd-medium"},V={class:"mn-b-small"},N={class:"mn-b-small t-transp"},q={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},y={class:"pos-relative"},E={key:0,class:"mn-b-semi radius-small o-hidden"},C={class:"mn-b-small t-transp"},S={key:0,class:"mn-b-semi radius-small o-hidden"},k={class:"mn-b-small t-transp"},P={__name:"ResetPassword",setup(I){const{t}=b.useI18n({useScope:"global",...g.default}),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",w,[e.createElementVNode("h3",V,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",N,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",q,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",y,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",C,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{onChange:o[1]||(o[1]=l=>s.state.user.phone=l),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=P;
@@ -1,8 +1,8 @@
1
1
  import { ref as d, openBlock as u, createElementBlock as p, createElementVNode as a, toDisplayString as r, unref as t, createVNode as l, Transition as _, withCtx as c, createCommentVNode as v, createTextVNode as C } from "vue";
2
2
  import E from "../../../../components/Tab/Tab.vue2.js";
3
- import I from "../../../../components/Field/Field.vue.js";
3
+ import I from "../../../../components/Field/Field.vue2.js";
4
4
  import P from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import V from "../../../../components/Button/Button.vue.js";
5
+ import V from "../../../../components/Button/Button.vue2.js";
6
6
  import { useRoute as k, useRouter as x } from "vue-router";
7
7
  import { useI18n as N } from "vue-i18n";
8
8
  import S from "../../localization/ResetPassword.json.js";