@ozdao/prometheus-framework 0.2.159 → 0.2.160

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -0
  2. package/dist/prometheus-framework/src/components/Button/Button.vue.js +95 -0
  3. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -0
  4. package/dist/prometheus-framework/src/components/Field/Field.vue.js +100 -0
  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/components/Tab/Tab.vue.cjs +1 -0
  8. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +36 -0
  9. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  11. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  13. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  15. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  17. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  19. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  21. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  23. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  25. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  27. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  37. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  39. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  41. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  49. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
  53. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  57. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  61. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  63. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  65. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  71. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  75. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  77. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  79. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  89. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  93. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  95. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  97. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  99. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  101. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  105. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  107. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
  113. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  115. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  119. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  123. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  125. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  127. package/package.json +2 -1
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../Loader/Loader.vue2.cjs");;/* empty css */const v=["disabled"],b={key:0},m={key:1},k={key:2,class:"t-semi loading t-black"},y={key:3,class:"error"},p={key:0,class:"button-counter"},g={__name:"Button",props:{submit:{type:Function,default:async()=>{console.log("Button click.")}},text:{type:Object,default:t=>(console.log(t),t={...t.text,success:"✔",error:"✖"})},counter:{type:Object},callback:{type:Function,default:async()=>{console.log("Button callback.")}},callbackDelay:{type:Number,default:750},showSucces:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!0},validation:{type:Boolean,default:!1}},emits:["error"],setup(t,{emit:r}){const o=t,i=r,l=e.ref(null),a=e.ref(null),s=e.ref(!1),n=e.ref(!1);async function d(){l.value.style["pointer-events"]="none",a.value=null,s.value=!0;const c=()=>{l.value&&(l.value.classList.replace("bg-second","bg-main"),l.value.style.pointerEvents="auto",s.value=!1,n.value=!1,a.value=null)};try{await o.submit(),l.value.classList.replace("bg-main","bg-second"),s.value=!1,o.showSucces?(n.value=!0,setTimeout(c,500)):c(),o.callback&&setTimeout(()=>o.callback(),o.callbackDelay)}catch(u){i("error",u),l.value.classList.replace("bg-main","bg-fourth-nano"),a.value=o.error,setTimeout(()=>{c(),l.value.classList.replace("bg-fourth-nano","bg-main")},1330)}}return(c,u)=>(e.openBlock(),e.createElementBlock("button",{onClick:e.withModifiers(d,["stop"]),disabled:t.validation,ref_key:"button",ref:l,class:"button"},[e.createVNode(e.Transition,{name:"FromTop"},{default:e.withCtx(()=>[!s.value&&!a.value&&!n.value||!t.showLoader?(e.openBlock(),e.createElementBlock("span",b,[e.renderSlot(c.$slots,"default")])):s.value&&!a.value&&t.showLoader?(e.openBlock(),e.createElementBlock("span",m,[e.createVNode(f.default,{class:"pos-relative pos-t-0 pos-l-0 loading"})])):n.value&&t.showSucces?(e.openBlock(),e.createElementBlock("span",k,e.toDisplayString(t.text.success),1)):a.value?(e.openBlock(),e.createElementBlock("span",y,e.toDisplayString(a.value),1)):e.createCommentVNode("",!0)]),_:3}),t.counter?(e.openBlock(),e.createElementBlock("p",p,e.toDisplayString(t.counter),1)):e.createCommentVNode("",!0)],8,v))}};exports.default=g;
@@ -0,0 +1,95 @@
1
+ import { ref as r, openBlock as o, createElementBlock as s, withModifiers as h, createVNode as f, Transition as p, withCtx as k, renderSlot as g, toDisplayString as i, createCommentVNode as b } from "vue";
2
+ import w from "../Loader/Loader.vue2.js";
3
+ /* empty css */
4
+ const B = ["disabled"], L = { key: 0 }, S = { key: 1 }, T = {
5
+ key: 2,
6
+ class: "t-semi loading t-black"
7
+ }, _ = {
8
+ key: 3,
9
+ class: "error"
10
+ }, x = {
11
+ key: 0,
12
+ class: "button-counter"
13
+ }, j = {
14
+ __name: "Button",
15
+ props: {
16
+ submit: {
17
+ type: Function,
18
+ default: async () => {
19
+ console.log("Button click.");
20
+ }
21
+ },
22
+ text: {
23
+ type: Object,
24
+ default: (e) => (console.log(e), e = {
25
+ ...e.text,
26
+ success: "✔",
27
+ error: "✖"
28
+ })
29
+ },
30
+ counter: {
31
+ type: Object
32
+ },
33
+ callback: {
34
+ type: Function,
35
+ default: async () => {
36
+ console.log("Button callback.");
37
+ }
38
+ },
39
+ callbackDelay: {
40
+ type: Number,
41
+ default: 750
42
+ },
43
+ showSucces: {
44
+ type: Boolean,
45
+ default: !0
46
+ },
47
+ showLoader: {
48
+ type: Boolean,
49
+ default: !0
50
+ },
51
+ validation: {
52
+ type: Boolean,
53
+ default: !1
54
+ }
55
+ },
56
+ emits: ["error"],
57
+ setup(e, { emit: v }) {
58
+ const l = e, m = v, t = r(null), a = r(null), n = r(!1), u = r(!1);
59
+ async function y() {
60
+ t.value.style["pointer-events"] = "none", a.value = null, n.value = !0;
61
+ const c = () => {
62
+ t.value && (t.value.classList.replace("bg-second", "bg-main"), t.value.style.pointerEvents = "auto", n.value = !1, u.value = !1, a.value = null);
63
+ };
64
+ try {
65
+ await l.submit(), t.value.classList.replace("bg-main", "bg-second"), n.value = !1, l.showSucces ? (u.value = !0, setTimeout(c, 500)) : c(), l.callback && setTimeout(() => l.callback(), l.callbackDelay);
66
+ } catch (d) {
67
+ m("error", d), t.value.classList.replace("bg-main", "bg-fourth-nano"), a.value = l.error, setTimeout(() => {
68
+ c(), t.value.classList.replace("bg-fourth-nano", "bg-main");
69
+ }, 1330);
70
+ }
71
+ }
72
+ return (c, d) => (o(), s("button", {
73
+ onClick: h(y, ["stop"]),
74
+ disabled: e.validation,
75
+ ref_key: "button",
76
+ ref: t,
77
+ class: "button"
78
+ }, [
79
+ f(p, { name: "FromTop" }, {
80
+ default: k(() => [
81
+ !n.value && !a.value && !u.value || !e.showLoader ? (o(), s("span", L, [
82
+ g(c.$slots, "default")
83
+ ])) : n.value && !a.value && e.showLoader ? (o(), s("span", S, [
84
+ f(w, { class: "pos-relative pos-t-0 pos-l-0 loading" })
85
+ ])) : u.value && e.showSucces ? (o(), s("span", T, i(e.text.success), 1)) : a.value ? (o(), s("span", _, i(a.value), 1)) : b("", !0)
86
+ ]),
87
+ _: 3
88
+ }),
89
+ e.counter ? (o(), s("p", x, i(e.counter), 1)) : b("", !0)
90
+ ], 8, B));
91
+ }
92
+ };
93
+ export {
94
+ j as default
95
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const c=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),m={key:0,class:"t-transp mn-r-small"},f={class:"w-100"},v=["type","value","placeholder","tabindex","disabled"],b=["value","placeholder","tabindex","disabled"],y={key:1,class:"t-transp mn-l-small"},x={key:0,class:"mn-t-thin mn-b-thin mn-b-thin invalid-feedback"},k={__name:"Field",props:{label:null,symbol:null,type:"text",placeholder:"Enter something here",field:null,value:null,validation:!1,disabled:null,tabindex:-1},emits:["update:field","focus","blur"],setup(t,{emit:r}){const n=r,d=t;d.value&&n("update:field",d.value);const i=e.ref(null);function u(){var o;i.value&&(i.value.style.height="1rem"),i.value&&(i.value.style.height=((o=i.value)==null?void 0:o.scrollHeight)+"px")}e.onUpdated(()=>{d.type==="textarea"&&e.nextTick(()=>{focus()}),u()}),e.onMounted(()=>{d.type==="textarea"&&e.nextTick(()=>{focus()}),u()});const s=e.ref(d.field);return(o,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([[o.$attrs.class,{"bg-fourth-nano":t.validation}],"flex-center flex-nowrap flex"])},[t.label?(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("span",null,e.toDisplayString(t.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",f,[t.type!=="textarea"?(e.openBlock(),e.createElementBlock("input",{key:0,onInput:l[0]||(l[0]=a=>s.value=n("update:field",a.target.value)),onFocus:l[1]||(l[1]=a=>n("focus",a)),onBlur:l[2]||(l[2]=a=>n("blur",a)),type:t.type,class:"w-100",value:t.field,placeholder:t.placeholder,tabindex:t.tabindex,disabled:t.disabled},null,40,v)):(e.openBlock(),e.createElementBlock("textarea",{key:1,ref_key:"textarea",ref:i,onInput:l[3]||(l[3]=a=>s.value=n("update:field",a.target.value)),onFocus:l[4]||(l[4]=a=>n("focus",a)),onBlur:l[5]||(l[5]=a=>n("blur",a)),class:"w-100",style:{resize:"vertical"},value:t.field,placeholder:t.placeholder,tabindex:t.tabindex,disabled:t.disabled},null,40,b))]),e.renderSlot(o.$slots,"default",{},void 0,!0),t.symbol?(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("span",null,e.toDisplayString(t.symbol),1)])):e.createCommentVNode("",!0)],2),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[t.validation?(e.openBlock(),e.createElementBlock("div",x," * "+e.toDisplayString(t.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64))}},g=c.default(k,[["__scopeId","data-v-5659d4ce"]]);exports.default=g;
@@ -0,0 +1,100 @@
1
+ import { ref as b, onUpdated as y, nextTick as c, onMounted as h, openBlock as i, createElementBlock as d, Fragment as g, createElementVNode as o, normalizeClass as k, toDisplayString as r, createCommentVNode as f, renderSlot as p, createVNode as w, Transition as F, withCtx as B } from "vue";
2
+ /* empty css */
3
+ import z from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const C = {
5
+ key: 0,
6
+ class: "t-transp mn-r-small"
7
+ }, E = { class: "w-100" }, I = ["type", "value", "placeholder", "tabindex", "disabled"], N = ["value", "placeholder", "tabindex", "disabled"], V = {
8
+ key: 1,
9
+ class: "t-transp mn-l-small"
10
+ }, S = {
11
+ key: 0,
12
+ class: "mn-t-thin mn-b-thin mn-b-thin invalid-feedback"
13
+ }, T = {
14
+ __name: "Field",
15
+ props: {
16
+ label: null,
17
+ symbol: null,
18
+ type: "text",
19
+ placeholder: "Enter something here",
20
+ field: null,
21
+ value: null,
22
+ validation: !1,
23
+ disabled: null,
24
+ tabindex: -1
25
+ },
26
+ emits: ["update:field", "focus", "blur"],
27
+ setup(e, { emit: x }) {
28
+ const a = x, s = e;
29
+ s.value && a("update:field", s.value);
30
+ const n = b(null);
31
+ function m() {
32
+ var u;
33
+ n.value && (n.value.style.height = "1rem"), n.value && (n.value.style.height = ((u = n.value) == null ? void 0 : u.scrollHeight) + "px");
34
+ }
35
+ y(() => {
36
+ s.type === "textarea" && c(() => {
37
+ focus();
38
+ }), m();
39
+ }), h(() => {
40
+ s.type === "textarea" && c(() => {
41
+ focus();
42
+ }), m();
43
+ });
44
+ const v = b(s.field);
45
+ return (u, l) => (i(), d(g, null, [
46
+ o("div", {
47
+ class: k([[
48
+ u.$attrs.class,
49
+ {
50
+ "bg-fourth-nano": e.validation
51
+ }
52
+ ], "flex-center flex-nowrap flex"])
53
+ }, [
54
+ e.label ? (i(), d("div", C, [
55
+ o("span", null, r(e.label), 1)
56
+ ])) : f("", !0),
57
+ o("div", E, [
58
+ e.type !== "textarea" ? (i(), d("input", {
59
+ key: 0,
60
+ onInput: l[0] || (l[0] = (t) => v.value = a("update:field", t.target.value)),
61
+ onFocus: l[1] || (l[1] = (t) => a("focus", t)),
62
+ onBlur: l[2] || (l[2] = (t) => a("blur", t)),
63
+ type: e.type,
64
+ class: "w-100",
65
+ value: e.field,
66
+ placeholder: e.placeholder,
67
+ tabindex: e.tabindex,
68
+ disabled: e.disabled
69
+ }, null, 40, I)) : (i(), d("textarea", {
70
+ key: 1,
71
+ ref_key: "textarea",
72
+ ref: n,
73
+ onInput: l[3] || (l[3] = (t) => v.value = a("update:field", t.target.value)),
74
+ onFocus: l[4] || (l[4] = (t) => a("focus", t)),
75
+ onBlur: l[5] || (l[5] = (t) => a("blur", t)),
76
+ class: "w-100",
77
+ style: { resize: "vertical" },
78
+ value: e.field,
79
+ placeholder: e.placeholder,
80
+ tabindex: e.tabindex,
81
+ disabled: e.disabled
82
+ }, null, 40, N))
83
+ ]),
84
+ p(u.$slots, "default", {}, void 0, !0),
85
+ e.symbol ? (i(), d("div", V, [
86
+ o("span", null, r(e.symbol), 1)
87
+ ])) : f("", !0)
88
+ ], 2),
89
+ w(F, { name: "fade" }, {
90
+ default: B(() => [
91
+ e.validation ? (i(), d("div", S, " * " + r(e.validation.message), 1)) : f("", !0)
92
+ ]),
93
+ _: 1
94
+ })
95
+ ], 64));
96
+ }
97
+ }, M = /* @__PURE__ */ z(T, [["__scopeId", "data-v-5659d4ce"]]);
98
+ export {
99
+ M as default
100
+ };
@@ -1 +1 @@
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
+ "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,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.vue2.js";
2
+ import H from "../Field/Field.vue.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 = {
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const d={class:"flex-nowrap flex-v-center flex pos-relative"},m=["onClick"],b={__name:"Tab",props:{tabs:Array,selected:String,callback:Function},emits:["update:selected"],setup(s,{emit:o}){const i=o,t=s,c=e.ref(0);if(t.selected){const l=t.tabs.findIndex(a=>a.value===t.selected);l!==-1&&(c.value=l)}function u(l,a){c.value=l,i("update:selected",a.value),t.callback&&t.callback()}return(l,a)=>(e.openBlock(),e.createElementBlock("div",d,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tabs,(r,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:p=>u(n,r),class:e.normalizeClass([{"t-transp":n!==c.value,"br-solid br-b-3px br-main":n===c.value},"z-index-1 t-center pd-small w-max"])},[e.createElementVNode("label",null,e.toDisplayString(r.name),1)],10,m))),128))]))}};exports.default=b;
@@ -0,0 +1,36 @@
1
+ import { ref as m, openBlock as s, createElementBlock as n, Fragment as p, renderList as b, normalizeClass as f, createElementVNode as v, toDisplayString as k } from "vue";
2
+ /* empty css */
3
+ const _ = { class: "flex-nowrap flex-v-center flex pos-relative" }, x = ["onClick"], C = {
4
+ __name: "Tab",
5
+ props: {
6
+ tabs: Array,
7
+ selected: String,
8
+ callback: Function
9
+ },
10
+ emits: ["update:selected"],
11
+ setup(r, { emit: i }) {
12
+ const d = i, e = r, l = m(0);
13
+ if (e.selected) {
14
+ const t = e.tabs.findIndex((a) => a.value === e.selected);
15
+ t !== -1 && (l.value = t);
16
+ }
17
+ function u(t, a) {
18
+ l.value = t, d("update:selected", a.value), e.callback && e.callback();
19
+ }
20
+ return (t, a) => (s(), n("div", _, [
21
+ (s(!0), n(p, null, b(r.tabs, (o, c) => (s(), n("div", {
22
+ key: c,
23
+ onClick: (g) => u(c, o),
24
+ class: f([{
25
+ "t-transp": c !== l.value,
26
+ "br-solid br-b-3px br-main": c === l.value
27
+ }, "z-index-1 t-center pd-small w-max"])
28
+ }, [
29
+ v("label", null, k(o.name), 1)
30
+ ], 10, x))), 128))
31
+ ]));
32
+ }
33
+ };
34
+ export {
35
+ C as default
36
+ };
@@ -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
- /* empty css */
3
- /* empty css */
4
- /* empty css */
2
+ /* empty css */
3
+ /* empty css */
5
4
  /* 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.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
+ "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,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
- /* empty css */
3
- import c from "../../../../components/Field/Field.vue2.js";
4
- import k from "../../../../components/Button/Button.vue2.js";
2
+ /* empty css */
3
+ import c from "../../../../components/Field/Field.vue.js";
4
+ import k from "../../../../components/Button/Button.vue.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.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
+ "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,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
- /* empty css */
3
- import l from "../../../../components/Field/Field.vue2.js";
4
- import h from "../../../../components/Button/Button.vue2.js";
2
+ /* empty css */
3
+ import l from "../../../../components/Field/Field.vue.js";
4
+ import h from "../../../../components/Button/Button.vue.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.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
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue.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,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
- import E from "../../../../components/Tab/Tab.vue2.js";
3
- import I from "../../../../components/Field/Field.vue2.js";
2
+ import E from "../../../../components/Tab/Tab.vue.js";
3
+ import I from "../../../../components/Field/Field.vue.js";
4
4
  import P from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import V from "../../../../components/Button/Button.vue2.js";
5
+ import V from "../../../../components/Button/Button.vue.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";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Tab/Tab.vue2.cjs"),m=require("../../../../components/Field/Field.vue2.cjs"),w=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue2.cjs"),h=require("vue-router"),N=require("vue-i18n"),y=require("../../localization/SignIn.json.cjs"),s=require("../../store/auth.cjs"),r=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const S={class:""},q=e.createElementVNode("img",{src:"/logo/logo.svg",class:"i-extra radius-small mn-b-small"},null,-1),E={class:"mn-b-medium"},x=e.createElementVNode("br",null,null,-1),C={class:"t-semi"},D={class:"mn-b-big"},P={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},T={class:"pos-relative"},I={class:"mn-b-thin radius-small"},U={class:"mn-b-thin radius-small o-hidden"},k={class:"w-100 mn-b-big"},O={__name:"SignIn",setup(j){const d=e.ref(null),f=e.ref(null),u=e.ref(null),c=h.useRoute(),p=h.useRouter(),{t:l}=N.useI18n({useScope:"global",...y.default}),n=e.ref("phone"),v=o=>new Promise((a,i)=>{const t=document.createElement("script");t.type="text/javascript",t.src=o,t.onload=a,t.onerror=i,document.head.appendChild(t)});e.onMounted(async()=>{await v("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function _(){try{n.value==="phone"&&await r.validateInputs(d,r.validatePhone,s.state.user.phone,"Некорректный телефон"),n.value==="email"&&await r.validateInputs(u,r.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}const o={...s.state.user};await s.actions.login(o,n.value)}function g(){c.query.returnUrl?p.push({path:c.query.returnUrl,query:{afterAuth:"true"}}):p.push({name:"User Profile",params:{_id:s.state.user._id},query:{afterAuth:"true"}})}return(o,a)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",S,[q,e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(l)("title"))+" ",1),x,e.createElementVNode("span",C,e.toDisplayString(e.unref(l)("subtitle")),1)]),e.createElementVNode("p",D,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signup")),1)]),_:1})]),e.createElementVNode("div",P,[e.createVNode(b.default,{selected:n.value,"onUpdate:selected":a[0]||(a[0]=t=>n.value=t),tabs:[{name:e.unref(l)("phone"),value:"phone"},{name:e.unref(l)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",T,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(w.default,{onChange:a[1]||(a[1]=t=>s.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validCharactersOnly:!0,validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(l)("phonePlaceholder"),type:"tel"},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,n.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",U,[e.createVNode(m.default,{field:s.state.user.email,"onUpdate:field":a[2]||(a[2]=t=>s.state.user.email=t),placeholder:e.unref(l)("emailPlaceholder"),validation:u.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,n.value==="email"]])]),_:1})]),e.createVNode(m.default,{field:s.state.user.password,"onUpdate:field":a[3]||(a[3]=t=>s.state.user.password=t),type:"password",validation:f.value,placeholder:e.unref(l)("passwordPlaceholder"),class:"bg-light pd-medium radius-small mn-b-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",k,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("forgotPassword")),1)]),_:1})]),e.createVNode(V.default,{submit:_,callback:g,class:"w-100 bg-main mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signin")),1)]),_:1})])}}};exports.default=O;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Tab/Tab.vue.cjs"),m=require("../../../../components/Field/Field.vue.cjs"),w=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue.cjs"),h=require("vue-router"),N=require("vue-i18n"),y=require("../../localization/SignIn.json.cjs"),s=require("../../store/auth.cjs"),r=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const S={class:""},q=e.createElementVNode("img",{src:"/logo/logo.svg",class:"i-extra radius-small mn-b-small"},null,-1),E={class:"mn-b-medium"},x=e.createElementVNode("br",null,null,-1),C={class:"t-semi"},D={class:"mn-b-big"},P={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},T={class:"pos-relative"},I={class:"mn-b-thin radius-small"},U={class:"mn-b-thin radius-small o-hidden"},k={class:"w-100 mn-b-big"},O={__name:"SignIn",setup(j){const d=e.ref(null),f=e.ref(null),u=e.ref(null),c=h.useRoute(),p=h.useRouter(),{t:l}=N.useI18n({useScope:"global",...y.default}),n=e.ref("phone"),v=o=>new Promise((a,i)=>{const t=document.createElement("script");t.type="text/javascript",t.src=o,t.onload=a,t.onerror=i,document.head.appendChild(t)});e.onMounted(async()=>{await v("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function _(){try{n.value==="phone"&&await r.validateInputs(d,r.validatePhone,s.state.user.phone,"Некорректный телефон"),n.value==="email"&&await r.validateInputs(u,r.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}const o={...s.state.user};await s.actions.login(o,n.value)}function g(){c.query.returnUrl?p.push({path:c.query.returnUrl,query:{afterAuth:"true"}}):p.push({name:"User Profile",params:{_id:s.state.user._id},query:{afterAuth:"true"}})}return(o,a)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",S,[q,e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(l)("title"))+" ",1),x,e.createElementVNode("span",C,e.toDisplayString(e.unref(l)("subtitle")),1)]),e.createElementVNode("p",D,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signup")),1)]),_:1})]),e.createElementVNode("div",P,[e.createVNode(b.default,{selected:n.value,"onUpdate:selected":a[0]||(a[0]=t=>n.value=t),tabs:[{name:e.unref(l)("phone"),value:"phone"},{name:e.unref(l)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",T,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(w.default,{onChange:a[1]||(a[1]=t=>s.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validCharactersOnly:!0,validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(l)("phonePlaceholder"),type:"tel"},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,n.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",U,[e.createVNode(m.default,{field:s.state.user.email,"onUpdate:field":a[2]||(a[2]=t=>s.state.user.email=t),placeholder:e.unref(l)("emailPlaceholder"),validation:u.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,n.value==="email"]])]),_:1})]),e.createVNode(m.default,{field:s.state.user.password,"onUpdate:field":a[3]||(a[3]=t=>s.state.user.password=t),type:"password",validation:f.value,placeholder:e.unref(l)("passwordPlaceholder"),class:"bg-light pd-medium radius-small mn-b-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",k,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("forgotPassword")),1)]),_:1})]),e.createVNode(V.default,{submit:_,callback:g,class:"w-100 bg-main mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signin")),1)]),_:1})])}}};exports.default=O;
@@ -1,8 +1,8 @@
1
1
  import { ref as p, onMounted as k, resolveComponent as E, openBlock as V, createElementBlock as I, createElementVNode as s, createTextVNode as c, toDisplayString as r, unref as l, createVNode as o, withCtx as d, Transition as b, withDirectives as g, vShow as w } from "vue";
2
- import q from "../../../../components/Tab/Tab.vue2.js";
3
- import y from "../../../../components/Field/Field.vue2.js";
2
+ import q from "../../../../components/Tab/Tab.vue.js";
3
+ import y from "../../../../components/Field/Field.vue.js";
4
4
  import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import O from "../../../../components/Button/Button.vue2.js";
5
+ import O from "../../../../components/Button/Button.vue.js";
6
6
  import { useRoute as j, useRouter as A } from "vue-router";
7
7
  import { useI18n as N } from "vue-i18n";
8
8
  import T from "../../localization/SignIn.json.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),_=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),b=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),l=require("../../store/auth.cjs"),N=require("../../store/twofa.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const V={class:"t-left pd-medium"},S={class:"mn-b-small"},E={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-b-semi radius-small"},y={class:"mn-b-small t-transp"},D={class:"mn-b-semi radius-small o-hidden"},x={class:"mn-b-small t-transp"},T={class:"w-100"},k={__name:"SignUp",setup(I){const{t}=g.useI18n({useScope:"global",...w.default}),s=e.ref(null),r=e.ref(null);d.useRoute();const c=d.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await i.validateInputs(s,i.validatePhone,l.state.user.phone,"Некорректный телефон"),a.value==="email"&&await i.validateInputs(r,i.validateEmail,l.state.user.email,"Некорректный email")}catch{throw new Error}try{await N.sendCode(l.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(u,n)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",V,[e.createElementVNode("h3",S,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("div",E,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":n[0]||(n[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",C,[e.createElementVNode("p",y,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{onChange:n[1]||(n[1]=o=>l.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:s.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",D,[e.createElementVNode("p",x,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:l.state.user.email,"onUpdate:field":n[2]||(n[2]=o=>l.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(b.default,{submit:m,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",T,[e.createVNode(h,{to:"/auth/signin",class:"underline mn-b-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue.cjs"),f=require("../../../../components/Field/Field.vue.cjs"),_=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),b=require("../../../../components/Button/Button.vue.cjs"),d=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),l=require("../../store/auth.cjs"),N=require("../../store/twofa.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const V={class:"t-left pd-medium"},S={class:"mn-b-small"},E={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-b-semi radius-small"},y={class:"mn-b-small t-transp"},D={class:"mn-b-semi radius-small o-hidden"},x={class:"mn-b-small t-transp"},T={class:"w-100"},k={__name:"SignUp",setup(I){const{t}=g.useI18n({useScope:"global",...w.default}),s=e.ref(null),r=e.ref(null);d.useRoute();const c=d.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await i.validateInputs(s,i.validatePhone,l.state.user.phone,"Некорректный телефон"),a.value==="email"&&await i.validateInputs(r,i.validateEmail,l.state.user.email,"Некорректный email")}catch{throw new Error}try{await N.sendCode(l.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(u,n)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",V,[e.createElementVNode("h3",S,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("div",E,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":n[0]||(n[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",C,[e.createElementVNode("p",y,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{onChange:n[1]||(n[1]=o=>l.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:s.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",D,[e.createElementVNode("p",x,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:l.state.user.email,"onUpdate:field":n[2]||(n[2]=o=>l.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(b.default,{submit:m,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",T,[e.createVNode(h,{to:"/auth/signin",class:"underline mn-b-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=k;
@@ -1,8 +1,8 @@
1
1
  import { ref as d, resolveComponent as E, openBlock as S, createElementBlock as x, createElementVNode as o, toDisplayString as r, unref as t, createVNode as a, Transition as h, withCtx as m, withDirectives as _, vShow as f, createTextVNode as v } from "vue";
2
- import N from "../../../../components/Tab/Tab.vue2.js";
3
- import V from "../../../../components/Field/Field.vue2.js";
2
+ import N from "../../../../components/Tab/Tab.vue.js";
3
+ import V from "../../../../components/Field/Field.vue.js";
4
4
  import y from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import D from "../../../../components/Button/Button.vue2.js";
5
+ import D from "../../../../components/Button/Button.vue.js";
6
6
  import { useRoute as I, useRouter as O } from "vue-router";
7
7
  import { useI18n as P } from "vue-i18n";
8
8
  import T from "../../localization/SignUp.json.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */;/* empty css */require("axios");;/* empty css */const _=require("../blocks/CardBlogpost.vue.cjs"),n=require("../../store/blogposts.cjs"),f=require("../../../auth/store/auth.cjs"),b=require("vue-router");;/* empty css */const v=l=>(e.pushScopeId("data-v-bdf0e48a"),l=l(),e.popScopeId(),l),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},q=["onClick"],y=["onClick"],C={__name:"Community",async setup(l){let s,u;const i=b.useRouter();[s,u]=e.withAsyncContext(()=>n.read()),await s,u(),console.log(n.state),e.ref({title:"",content:"",categories:[]});const d=async t=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(t),await n.remove(t))};let c=e.ref("all");const a=e.computed(()=>c.value==="all"?n.state.all:n.state.all.filter(t=>t.categories.includes(c.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const r=t.blocks.find(o=>o.type.name==="ImageUpload");if(r)return r.content}return null}),(t,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,q),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,y)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(C,[["__scopeId","data-v-bdf0e48a"]]);exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */;/* empty css */require("axios");;/* empty css */const _=require("../blocks/CardBlogpost.vue.cjs"),n=require("../../store/blogposts.cjs"),f=require("../../../auth/store/auth.cjs"),b=require("vue-router");;/* empty css */const v=l=>(e.pushScopeId("data-v-bdf0e48a"),l=l(),e.popScopeId(),l),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},q=["onClick"],y=["onClick"],C={__name:"Community",async setup(l){let s,u;const i=b.useRouter();[s,u]=e.withAsyncContext(()=>n.read()),await s,u(),console.log(n.state),e.ref({title:"",content:"",categories:[]});const d=async t=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(t),await n.remove(t))};let c=e.ref("all");const a=e.computed(()=>c.value==="all"?n.state.all:n.state.all.filter(t=>t.categories.includes(c.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const r=t.blocks.find(o=>o.type.name==="ImageUpload");if(r)return r.content}return null}),(t,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,q),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,y)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(C,[["__scopeId","data-v-bdf0e48a"]]);exports.default=B;
@@ -1,9 +1,9 @@
1
1
  import { withAsyncContext as h, ref as u, computed as d, openBlock as r, createElementBlock as p, createElementVNode as o, unref as v, Fragment as w, renderList as g, createBlock as k, withCtx as y, pushScopeId as C, popScopeId as x } from "vue";
2
- /* empty css */
2
+ /* empty css */
3
3
  import B from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
- /* empty css */
6
+ /* empty css */
7
7
  import "axios";
8
8
  /* empty css */
9
9
  import $ from "../blocks/CardBlogpost.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.vue2.cjs");;/* empty css */;/* empty css */const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),y=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),C=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),x=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},T=e.createElementVNode("div",{class:"w-full h-full"},null,-1),z={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},O=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),U=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),M={key:0,class:"mn-b-thin"},S={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await x.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo})});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.createElementVNode("section",E,[T,e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",A,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(V.default,{onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[O,e.createVNode(N.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags,class:"mn-b-small"},null,8,["tags"]),U,e.createVNode(y.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),D,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(B.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(C.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.vue2.cjs");;/* empty css */;/* empty css */const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),y=require("../../../../components/Field/Field.vue.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),C=require("../../../../components/Button/Button.vue.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),x=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},T=e.createElementVNode("div",{class:"w-full h-full"},null,-1),z={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},O=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),U=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),M={key:0,class:"mn-b-thin"},S={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await x.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo})});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.createElementVNode("section",E,[T,e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",A,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(V.default,{onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[O,e.createVNode(N.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags,class:"mn-b-small"},null,8,["tags"]),U,e.createVNode(y.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),D,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(B.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(C.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
@@ -7,9 +7,9 @@ import N from "../../../../components/Popup/Popup.vue2.js";
7
7
  /* empty css */
8
8
  import O from "../../../../components/FieldTags/BlockTags.vue.js";
9
9
  import E from "../../../../components/Checkbox/Checkbox.vue.js";
10
- import F from "../../../../components/Field/Field.vue2.js";
10
+ import F from "../../../../components/Field/Field.vue.js";
11
11
  import L from "../../../../components/SelectMulti/SelectMulti.vue.js";
12
- import M from "../../../../components/Button/Button.vue2.js";
12
+ import M from "../../../../components/Button/Button.vue.js";
13
13
  import { useRoute as R, useRouter as S } from "vue-router";
14
14
  import { read as H, clean as j, state as q, update as k, create as y, remove as G } from "../../store/blogposts.js";
15
15
  import { state as f } from "../../../auth/store/auth.js";