@ozdao/prometheus-framework 0.2.189 → 0.2.190

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  2. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  3. package/dist/prometheus-framework/src/components/LocationSelection/LocationSelection.vue.cjs +1 -0
  4. package/dist/prometheus-framework/src/components/LocationSelection/LocationSelection.vue.js +96 -0
  5. package/dist/prometheus-framework/src/components/Sidebar/Sidebar.vue.cjs +1 -0
  6. package/dist/prometheus-framework/src/components/Sidebar/Sidebar.vue.js +74 -0
  7. package/dist/prometheus-framework/src/components/Status/Status.vue.cjs +1 -0
  8. package/dist/prometheus-framework/src/components/Status/Status.vue.js +29 -0
  9. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  11. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  13. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  15. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  17. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  21. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  31. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/globals/globals.client.js +21 -18
  33. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +68 -42
  37. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -0
  38. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +197 -0
  39. package/dist/prometheus-framework/src/modules/globals/views/components/pages/401.vue.cjs +1 -0
  40. package/dist/prometheus-framework/src/modules/globals/views/components/pages/401.vue.js +10 -0
  41. package/dist/prometheus-framework/src/modules/globals/views/components/pages/404.vue.cjs +1 -0
  42. package/dist/prometheus-framework/src/modules/globals/views/components/pages/404.vue.js +10 -0
  43. package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigation.vue.cjs +1 -0
  44. package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigation.vue.js +157 -0
  45. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -0
  46. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Navigation.vue.js +95 -0
  47. package/dist/prometheus-framework/src/modules/globals/views/components/sections/Walkthrough.vue.cjs +1 -0
  48. package/dist/prometheus-framework/src/modules/globals/views/components/sections/Walkthrough.vue.js +126 -0
  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 +2 -2
  53. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +2 -2
  59. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  61. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.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 +4 -4
  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/OrganizationEdit.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  69. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
  71. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +4 -4
  77. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  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/ImagesThumbnails.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  87. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  93. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  95. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  97. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  99. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +4 -4
  101. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  105. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
  107. package/dist/style.css +1 -1
  108. package/package.json +1 -1
  109. package/src/components/LocationSelection/LocationSelection.vue +5 -6
  110. package/src/modules/globals/globals.client.js +9 -4
  111. package/src/modules/globals/views/components/layouts/App.vue +21 -0
  112. package/src/modules/globals/views/components/layouts/Client.vue +25 -47
  113. package/src/modules/globals/views/components/partials/BottomNavigation.vue +0 -2
  114. package/src/modules/globals/views/components/partials/Header.vue +14 -10
  115. package/src/modules/globals/views/components/partials/Navigation.vue +4 -4
  116. package/src/modules/globals/views/components/sections/Walkthrough.vue +1 -1
@@ -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 B=require("../../../constructor/components/sections/Constructor.vue.cjs"),T=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");;/* empty css */const k=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue2.cjs"),i=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/FieldTags/BlockTags.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Upload/Upload.vue.cjs"),h=require("../../../../components/UploadImage/UploadImage.vue.cjs"),q=require("../../../../components/EditImages/EditImages.vue.cjs"),L=require("../../../../components/Button/Button.vue2.cjs"),N=require("../../../icons/navigation/IconDelete.vue.cjs"),D=require("vue-router"),u=require("../../store/events.cjs"),n=require("../../../auth/views/store/auth.cjs"),M=require("../../../organizations/store/organizations.cjs");;/* empty css */const O={key:0,class:"h-min-100 pd-thin"},R={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},S=e.createElementVNode("h4",null,"Upload Event Cover",-1),F={key:0,class:"mn-b-small"},G={key:2,class:"mn-b-small"},I={key:4,class:"mn-b-semi"},A=e.createElementVNode("h4",{class:"mn-b-thin"}," Hero Section ",-1),z=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Hero Section ",-1),H=e.createElementVNode("p",null,"Need to upload in webm format because of needs of optimization",-1),$=e.createElementVNode("h5",{class:"mn-b-thin"}," Ticket ",-1),Y={class:"mn-b-small gap-small cols-2-fit-content"},j={class:"gap-thin flex-nowrap flex w-100"},J=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),K=e.createElementVNode("h4",{class:"mn-b-thin"}," Guest Section ",-1),Q={class:"gap-thin cols-3"},W=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Guests Section ",-1),X={class:"gap-thin flex-nowrap flex w-100"},Z={class:"w-100"},ee={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},te=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),le=e.createElementVNode("h4",{class:"mn-b-thin"}," Lineup Section ",-1),ae={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},se=e.createElementVNode("h5",{class:"mn-b-thin"}," Background in Lineup Section ",-1),ie=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),ne=e.createElementVNode("h4",{class:"mn-b-thin"}," Previous Party Section ",-1),oe=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Previous Partys Section ",-1),de=e.createElementVNode("h3",{class:"mn-b-small"},"Date",-1),re=e.createElementVNode("h3",{class:"mn-b-small"},"Description",-1),ue={key:5,class:"pd-b-extra w-100 bg-light pd-big radius-big"},ce={key:6,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},pe={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},me=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),fe=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),ge={key:0,class:"mn-b-thin"},he={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},be={__name:"EditEvent",setup(ve){const p=D.useRoute(),m=D.useRouter();let t=e.ref(null),b=e.ref(null);const v=e.ref([]),o=e.ref(null),d=e.ref(new Date);e.onMounted(async()=>{if(p.params.url){const a=await u.read({user:n.state.user._id,url:p.params.url});t.value=a.pop(),console.log(t.value);const l=t.value.date.start,c=t.value.date.end;d.value=[l,c]}else{u.clean(),t.value=u.state.current;const a=new Date,l=new Date;d.value=[a,l]}t.value.owner||(t.value.owner={target:n.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:n.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(o.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const s=await M.actions.read({user:n.state.user._id,postable:n.state.user._id,limit:100});b.value=s.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(!1);function w(){g.value=!0}function E(){g.value=!1}function U(){v.value.length>0&&v.value.map(s=>s.text),t.value.status="draft",t.value.date={start:d.value[0],end:d.value[1]},p.params.url?u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)}):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)})}function x(){o.value&&(t.value.owner={target:o.value._id,type:"organization"}),o.value||(t.value.creator.hidden=!1),o.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.date={start:d.value[0],end:d.value[1]},console.log(d.value),p.params.url?(console.log(t.value),u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})}function y(){confirm("Are you sure you want to delete this event?")&&u.remove(t.value._id).then(s=>{m.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(s=>{console.error(s)})}return(s,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",O,[e.createElementVNode("div",R,[e.createVNode(h.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"specials",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo"]),S]),e.createVNode(i.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-b-semi w-100 bg-light pd-medium radius-small"},null,8,["field"]),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",F," Tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mn-b-semi w-100 bg-light pd-medium radius-small",onClick:a[3]||(a[3]=l=>e.unref(m).push({name:"Edit Event Tickets",params:{url:e.unref(p).params.url}}))}," Edit tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",G," Special Details ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(V.default,{key:3,label:"Special",radio:e.unref(t).special,"onUpdate:radio":a[4]||(a[4]=l=>e.unref(t).special=!e.unref(t).special),class:"mn-b-semi w-100 bg-black t-white pd-medium radius-small"},null,8,["radio"])):e.createCommentVNode("",!0),e.unref(t).special?(e.openBlock(),e.createElementBlock("div",I,[A,e.createVNode(i.default,{field:e.unref(t).specialData.subtitle,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).specialData.subtitle=l),placeholder:"Event subtitle",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(q.default,{images:e.unref(t).specialData.logos,uploadPath:"/specials",text:{title:"Drag & Drop Your Logos Here",subtitle:"Files supported: JPG, PNG, GIF"},options:{showTitle:!0,showText:!1},"onUpdate:images":a[6]||(a[6]=l=>e.unref(t).specialData.logos=l),class:"mn-b-thin bg-light radius-small"},null,8,["images"]),z,H,e.createVNode(f.default,{field:e.unref(t).specialData.video,"onUpdate:field":a[7]||(a[7]=l=>e.unref(t).specialData.video=l),placeholder:"Upload video",onFileChange:a[8]||(a[8]=l=>e.unref(t).specialData.video=l),uploadPath:"specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),$,e.createElementVNode("div",Y,[e.createVNode(h.default,{photo:e.unref(t).specialData.ticketImage,"onUpdate:photo":a[9]||(a[9]=l=>e.unref(t).specialData.ticketImage=l),uploadPath:"/specials",class:"aspect-1x1 w-4r o-hidden radius-extra"},null,8,["photo"]),e.createElementVNode("div",j,[e.createVNode(i.default,{field:e.unref(t).specialData.ticketPrice,"onUpdate:field":a[10]||(a[10]=l=>e.unref(t).specialData.ticketPrice=l),type:"number",placeholder:"Ticket price in baht",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketText,"onUpdate:field":a[11]||(a[11]=l=>e.unref(t).specialData.ticketText=l),placeholder:"Promotion text for ticket in hero ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketTextButton,"onUpdate:field":a[12]||(a[12]=l=>e.unref(t).specialData.ticketTextButton=l),placeholder:"Text on 'Buy Ticket' button ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"])])]),J,K,e.createVNode(i.default,{field:e.unref(t).specialData.guestTitle,"onUpdate:field":a[13]||(a[13]=l=>e.unref(t).specialData.guestTitle=l),placeholder:"Title for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestDescription,"onUpdate:field":a[14]||(a[14]=l=>e.unref(t).specialData.guestDescription=l),placeholder:"Description for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createElementVNode("div",Q,[e.createVNode(i.default,{field:e.unref(t).specialData.guestFacebook,"onUpdate:field":a[15]||(a[15]=l=>e.unref(t).specialData.guestFacebook=l),placeholder:"Facebook of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestInstagram,"onUpdate:field":a[16]||(a[16]=l=>e.unref(t).specialData.guestInstagram=l),placeholder:"Instagram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTwitter,"onUpdate:field":a[17]||(a[17]=l=>e.unref(t).specialData.guestTwitter=l),placeholder:"Twitter of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTelegram,"onUpdate:field":a[18]||(a[18]=l=>e.unref(t).specialData.guestTelegram=l),placeholder:"Telegram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSoundcloud,"onUpdate:field":a[19]||(a[19]=l=>e.unref(t).specialData.guestSoundcloud=l),placeholder:"Link to Main Guest soundcloud track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSpotify,"onUpdate:field":a[20]||(a[20]=l=>e.unref(t).specialData.guestSpotify=l),placeholder:"Link to Main guest spotify track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestYoutube,"onUpdate:field":a[21]||(a[21]=l=>e.unref(t).specialData.guestYoutube=l),placeholder:"Link to Main guest youtube video",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"])]),W,e.createVNode(f.default,{field:e.unref(t).specialData.guestVideo,"onUpdate:field":a[22]||(a[22]=l=>e.unref(t).specialData.guestVideo=l),placeholder:"Upload video",onFileChange:a[23]||(a[23]=l=>e.unref(t).specialData.guestVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),e.createVNode(k.default,{title:"Guests",placeholder:"No guests added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.guests.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 mn-b-thin t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.guests,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small gap-small cols-2-fit-content",key:c},[e.createVNode(h.default,{photo:l.photo,"onUpdate:photo":r=>l.photo=r,uploadPath:"/specials",class:"aspect-1x1 w-8r o-hidden radius-extra"},null,8,["photo","onUpdate:photo"]),e.createElementVNode("div",X,[e.createElementVNode("div",Z,[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.description,"onUpdate:field":r=>l.description=r,placeholder:"Description",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"])]),e.createElementVNode("div",ee,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.guests.splice(c,1),class:"i-medium"},null,8,["onClick"])])])]))),128))]),_:1},8,["actions"]),te,le,e.createVNode(k.default,{title:"Line Up",placeholder:"No line ups added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.lineup.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.lineup,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-thin gap-small flex-nowrap flex",key:c},[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.time,"onUpdate:field":r=>l.time=r,placeholder:"Time",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",ae,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.lineup.splice(c,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),se,e.createVNode(f.default,{field:e.unref(t).specialData.lineupBackground,"onUpdate:field":a[24]||(a[24]=l=>e.unref(t).specialData.lineupBackground=l),placeholder:"Upload image",onFileChange:a[25]||(a[25]=l=>e.unref(t).specialData.lineupBackground=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),ie,ne,oe,e.createVNode(i.default,{field:e.unref(t).specialData.previousTitle,"onUpdate:field":a[26]||(a[26]=l=>e.unref(t).specialData.previousTitle=l),placeholder:"Title",value:"Explore our exclusive party archive",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousDescription,"onUpdate:field":a[27]||(a[27]=l=>e.unref(t).specialData.previousDescription=l),label:"Description",value:"Experience the ultimate party vibe at The Commune! Elevate your evening with distinctive and exhilarating activities, ensuring an unforgettable time. Dive into the excitement and make every moment special.",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLinkText,"onUpdate:field":a[28]||(a[28]=l=>e.unref(t).specialData.previousLinkText=l),label:"Button",value:"Check In Instagram",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLink,"onUpdate:field":a[29]||(a[29]=l=>e.unref(t).specialData.previousLink=l),label:"Link",value:"https://www.instagram.com/thecommune.phuket/",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).specialData.previousVideo,"onUpdate:field":a[30]||(a[30]=l=>e.unref(t).specialData.previousVideo=l),placeholder:"Upload image",onFileChange:a[31]||(a[31]=l=>e.unref(t).specialData.previousVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"])])):e.createCommentVNode("",!0),de,e.createVNode(e.unref(T.default),{modelValue:d.value,"onUpdate:modelValue":a[32]||(a[32]=l=>d.value=l),range:"",class:"z-index-3 mn-b-semi"},null,8,["modelValue"]),re,e.unref(t)?(e.openBlock(),e.createElementBlock("section",ue,[e.createVNode(B.default,{content:e.unref(t).content,onUpdate:a[33]||(a[33]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",ce,[e.createElementVNode("div",pe,[e.unref(p).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[34]||(a[34]=l=>y()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[35]||(a[35]=l=>U()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[36]||(a[36]=l=>w()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(C.default,{title:"Publish",onClosePopup:E,isPopupOpen:g.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[me,e.createVNode(P.default,{onTagsChanged:a[37]||(a[37]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),fe,e.createVNode(_.default,{modelValue:o.value,"onUpdate:modelValue":a[38]||(a[38]=l=>o.value=l),options:e.unref(b),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"]),o.value?(e.openBlock(),e.createElementBlock("h5",ge,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(V.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[39]||(a[39]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(L.default,{submit:x,callback:s.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])])):e.createCommentVNode("",!0)}};exports.default=be;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const B=require("../../../constructor/components/sections/Constructor.vue.cjs"),T=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");;/* empty css */const k=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue.cjs"),i=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/FieldTags/BlockTags.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Upload/Upload.vue.cjs"),h=require("../../../../components/UploadImage/UploadImage.vue.cjs"),q=require("../../../../components/EditImages/EditImages.vue.cjs"),L=require("../../../../components/Button/Button.vue2.cjs"),N=require("../../../icons/navigation/IconDelete.vue.cjs"),D=require("vue-router"),u=require("../../store/events.cjs"),n=require("../../../auth/views/store/auth.cjs"),M=require("../../../organizations/store/organizations.cjs");;/* empty css */const O={key:0,class:"h-min-100 pd-thin"},R={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},S=e.createElementVNode("h4",null,"Upload Event Cover",-1),F={key:0,class:"mn-b-small"},G={key:2,class:"mn-b-small"},I={key:4,class:"mn-b-semi"},A=e.createElementVNode("h4",{class:"mn-b-thin"}," Hero Section ",-1),z=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Hero Section ",-1),H=e.createElementVNode("p",null,"Need to upload in webm format because of needs of optimization",-1),$=e.createElementVNode("h5",{class:"mn-b-thin"}," Ticket ",-1),Y={class:"mn-b-small gap-small cols-2-fit-content"},j={class:"gap-thin flex-nowrap flex w-100"},J=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),K=e.createElementVNode("h4",{class:"mn-b-thin"}," Guest Section ",-1),Q={class:"gap-thin cols-3"},W=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Guests Section ",-1),X={class:"gap-thin flex-nowrap flex w-100"},Z={class:"w-100"},ee={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},te=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),le=e.createElementVNode("h4",{class:"mn-b-thin"}," Lineup Section ",-1),ae={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},se=e.createElementVNode("h5",{class:"mn-b-thin"}," Background in Lineup Section ",-1),ie=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),ne=e.createElementVNode("h4",{class:"mn-b-thin"}," Previous Party Section ",-1),oe=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Previous Partys Section ",-1),de=e.createElementVNode("h3",{class:"mn-b-small"},"Date",-1),re=e.createElementVNode("h3",{class:"mn-b-small"},"Description",-1),ue={key:5,class:"pd-b-extra w-100 bg-light pd-big radius-big"},ce={key:6,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},pe={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},me=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),fe=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),ge={key:0,class:"mn-b-thin"},he={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},be={__name:"EditEvent",setup(ve){const p=D.useRoute(),m=D.useRouter();let t=e.ref(null),b=e.ref(null);const v=e.ref([]),o=e.ref(null),d=e.ref(new Date);e.onMounted(async()=>{if(p.params.url){const a=await u.read({user:n.state.user._id,url:p.params.url});t.value=a.pop(),console.log(t.value);const l=t.value.date.start,c=t.value.date.end;d.value=[l,c]}else{u.clean(),t.value=u.state.current;const a=new Date,l=new Date;d.value=[a,l]}t.value.owner||(t.value.owner={target:n.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:n.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(o.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const s=await M.actions.read({user:n.state.user._id,postable:n.state.user._id,limit:100});b.value=s.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(!1);function w(){g.value=!0}function E(){g.value=!1}function U(){v.value.length>0&&v.value.map(s=>s.text),t.value.status="draft",t.value.date={start:d.value[0],end:d.value[1]},p.params.url?u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)}):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)})}function x(){o.value&&(t.value.owner={target:o.value._id,type:"organization"}),o.value||(t.value.creator.hidden=!1),o.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.date={start:d.value[0],end:d.value[1]},console.log(d.value),p.params.url?(console.log(t.value),u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})}function y(){confirm("Are you sure you want to delete this event?")&&u.remove(t.value._id).then(s=>{m.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(s=>{console.error(s)})}return(s,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",O,[e.createElementVNode("div",R,[e.createVNode(h.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"specials",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo"]),S]),e.createVNode(i.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-b-semi w-100 bg-light pd-medium radius-small"},null,8,["field"]),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",F," Tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mn-b-semi w-100 bg-light pd-medium radius-small",onClick:a[3]||(a[3]=l=>e.unref(m).push({name:"Edit Event Tickets",params:{url:e.unref(p).params.url}}))}," Edit tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",G," Special Details ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(V.default,{key:3,label:"Special",radio:e.unref(t).special,"onUpdate:radio":a[4]||(a[4]=l=>e.unref(t).special=!e.unref(t).special),class:"mn-b-semi w-100 bg-black t-white pd-medium radius-small"},null,8,["radio"])):e.createCommentVNode("",!0),e.unref(t).special?(e.openBlock(),e.createElementBlock("div",I,[A,e.createVNode(i.default,{field:e.unref(t).specialData.subtitle,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).specialData.subtitle=l),placeholder:"Event subtitle",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(q.default,{images:e.unref(t).specialData.logos,uploadPath:"/specials",text:{title:"Drag & Drop Your Logos Here",subtitle:"Files supported: JPG, PNG, GIF"},options:{showTitle:!0,showText:!1},"onUpdate:images":a[6]||(a[6]=l=>e.unref(t).specialData.logos=l),class:"mn-b-thin bg-light radius-small"},null,8,["images"]),z,H,e.createVNode(f.default,{field:e.unref(t).specialData.video,"onUpdate:field":a[7]||(a[7]=l=>e.unref(t).specialData.video=l),placeholder:"Upload video",onFileChange:a[8]||(a[8]=l=>e.unref(t).specialData.video=l),uploadPath:"specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),$,e.createElementVNode("div",Y,[e.createVNode(h.default,{photo:e.unref(t).specialData.ticketImage,"onUpdate:photo":a[9]||(a[9]=l=>e.unref(t).specialData.ticketImage=l),uploadPath:"/specials",class:"aspect-1x1 w-4r o-hidden radius-extra"},null,8,["photo"]),e.createElementVNode("div",j,[e.createVNode(i.default,{field:e.unref(t).specialData.ticketPrice,"onUpdate:field":a[10]||(a[10]=l=>e.unref(t).specialData.ticketPrice=l),type:"number",placeholder:"Ticket price in baht",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketText,"onUpdate:field":a[11]||(a[11]=l=>e.unref(t).specialData.ticketText=l),placeholder:"Promotion text for ticket in hero ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketTextButton,"onUpdate:field":a[12]||(a[12]=l=>e.unref(t).specialData.ticketTextButton=l),placeholder:"Text on 'Buy Ticket' button ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"])])]),J,K,e.createVNode(i.default,{field:e.unref(t).specialData.guestTitle,"onUpdate:field":a[13]||(a[13]=l=>e.unref(t).specialData.guestTitle=l),placeholder:"Title for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestDescription,"onUpdate:field":a[14]||(a[14]=l=>e.unref(t).specialData.guestDescription=l),placeholder:"Description for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createElementVNode("div",Q,[e.createVNode(i.default,{field:e.unref(t).specialData.guestFacebook,"onUpdate:field":a[15]||(a[15]=l=>e.unref(t).specialData.guestFacebook=l),placeholder:"Facebook of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestInstagram,"onUpdate:field":a[16]||(a[16]=l=>e.unref(t).specialData.guestInstagram=l),placeholder:"Instagram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTwitter,"onUpdate:field":a[17]||(a[17]=l=>e.unref(t).specialData.guestTwitter=l),placeholder:"Twitter of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTelegram,"onUpdate:field":a[18]||(a[18]=l=>e.unref(t).specialData.guestTelegram=l),placeholder:"Telegram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSoundcloud,"onUpdate:field":a[19]||(a[19]=l=>e.unref(t).specialData.guestSoundcloud=l),placeholder:"Link to Main Guest soundcloud track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSpotify,"onUpdate:field":a[20]||(a[20]=l=>e.unref(t).specialData.guestSpotify=l),placeholder:"Link to Main guest spotify track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestYoutube,"onUpdate:field":a[21]||(a[21]=l=>e.unref(t).specialData.guestYoutube=l),placeholder:"Link to Main guest youtube video",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"])]),W,e.createVNode(f.default,{field:e.unref(t).specialData.guestVideo,"onUpdate:field":a[22]||(a[22]=l=>e.unref(t).specialData.guestVideo=l),placeholder:"Upload video",onFileChange:a[23]||(a[23]=l=>e.unref(t).specialData.guestVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),e.createVNode(k.default,{title:"Guests",placeholder:"No guests added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.guests.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 mn-b-thin t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.guests,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small gap-small cols-2-fit-content",key:c},[e.createVNode(h.default,{photo:l.photo,"onUpdate:photo":r=>l.photo=r,uploadPath:"/specials",class:"aspect-1x1 w-8r o-hidden radius-extra"},null,8,["photo","onUpdate:photo"]),e.createElementVNode("div",X,[e.createElementVNode("div",Z,[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.description,"onUpdate:field":r=>l.description=r,placeholder:"Description",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"])]),e.createElementVNode("div",ee,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.guests.splice(c,1),class:"i-medium"},null,8,["onClick"])])])]))),128))]),_:1},8,["actions"]),te,le,e.createVNode(k.default,{title:"Line Up",placeholder:"No line ups added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.lineup.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.lineup,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-thin gap-small flex-nowrap flex",key:c},[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.time,"onUpdate:field":r=>l.time=r,placeholder:"Time",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",ae,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.lineup.splice(c,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),se,e.createVNode(f.default,{field:e.unref(t).specialData.lineupBackground,"onUpdate:field":a[24]||(a[24]=l=>e.unref(t).specialData.lineupBackground=l),placeholder:"Upload image",onFileChange:a[25]||(a[25]=l=>e.unref(t).specialData.lineupBackground=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),ie,ne,oe,e.createVNode(i.default,{field:e.unref(t).specialData.previousTitle,"onUpdate:field":a[26]||(a[26]=l=>e.unref(t).specialData.previousTitle=l),placeholder:"Title",value:"Explore our exclusive party archive",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousDescription,"onUpdate:field":a[27]||(a[27]=l=>e.unref(t).specialData.previousDescription=l),label:"Description",value:"Experience the ultimate party vibe at The Commune! Elevate your evening with distinctive and exhilarating activities, ensuring an unforgettable time. Dive into the excitement and make every moment special.",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLinkText,"onUpdate:field":a[28]||(a[28]=l=>e.unref(t).specialData.previousLinkText=l),label:"Button",value:"Check In Instagram",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLink,"onUpdate:field":a[29]||(a[29]=l=>e.unref(t).specialData.previousLink=l),label:"Link",value:"https://www.instagram.com/thecommune.phuket/",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).specialData.previousVideo,"onUpdate:field":a[30]||(a[30]=l=>e.unref(t).specialData.previousVideo=l),placeholder:"Upload image",onFileChange:a[31]||(a[31]=l=>e.unref(t).specialData.previousVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"])])):e.createCommentVNode("",!0),de,e.createVNode(e.unref(T.default),{modelValue:d.value,"onUpdate:modelValue":a[32]||(a[32]=l=>d.value=l),range:"",class:"z-index-3 mn-b-semi"},null,8,["modelValue"]),re,e.unref(t)?(e.openBlock(),e.createElementBlock("section",ue,[e.createVNode(B.default,{content:e.unref(t).content,onUpdate:a[33]||(a[33]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",ce,[e.createElementVNode("div",pe,[e.unref(p).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[34]||(a[34]=l=>y()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[35]||(a[35]=l=>U()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[36]||(a[36]=l=>w()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(C.default,{title:"Publish",onClosePopup:E,isPopupOpen:g.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[me,e.createVNode(P.default,{onTagsChanged:a[37]||(a[37]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),fe,e.createVNode(_.default,{modelValue:o.value,"onUpdate:modelValue":a[38]||(a[38]=l=>o.value=l),options:e.unref(b),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"]),o.value?(e.openBlock(),e.createElementBlock("h5",ge,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(V.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[39]||(a[39]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(L.default,{submit:x,callback:s.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])])):e.createCommentVNode("",!0)}};exports.default=be;
@@ -5,7 +5,7 @@ import A from "../../../constructor/components/sections/Constructor.vue.js";
5
5
  import B from "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js";
6
6
  /* empty css */
7
7
  import E from "../../../../components/Block/Block.vue.js";
8
- import I from "../../../../components/Popup/Popup.vue2.js";
8
+ import I from "../../../../components/Popup/Popup.vue.js";
9
9
  import n from "../../../../components/Field/Field.vue2.js";
10
10
  import z from "../../../../components/FieldTags/BlockTags.vue.js";
11
11
  import P from "../../../../components/Checkbox/Checkbox.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../../../../components/Feed/Feed.vue.cjs"),N=require("../../../../components/Block/Block.vue.cjs"),x=require("../../../../components/Popup/Popup.vue2.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),V=require("../elements/ButtonCheck.vue.cjs"),q=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs"),b=require("vue-router"),E=require("../../store/events.cjs"),C=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const m=require("../../store/tickets.cjs");;/* empty css */const T={key:0,class:"h-100 pd-thin"},P={class:"mn-b-medium flex-v-center flex-nowrap flex"},S=e.createElementVNode("h2",{class:"mn-r-medium"},"Tickets",-1),D=["onClick"],U={class:"radius-big bg-light gap-small pd-medium flex-v-center flex-nowrap flex pos-relative mn-b-thin"},A=["href"],F=["src"],O={class:"mn-r-auto"},M={class:"h4"},R={class:"h5 t-transp mn-b-thin"},I={class:"pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase"},L={__name:"EditEventTickets",setup(Q){var h;const g=b.useRoute();b.useRouter();let n=e.ref(null);const c=e.ref([{name:"",email:"",target:(h=n.value)==null?void 0:h._id,type:"event",quantity:1}]),i=e.ref(!1);function _(r){var l;i.value=!0,c.value=[{name:"",email:"",target:(l=n.value)==null?void 0:l._id,type:"event",quantity:1}]}function p(){i.value=!1}const s=e.ref(!1);e.onMounted(async()=>{const r=await E.read({user:C.state.user._id,url:g.params.url});n.value=r.pop()});async function w(){try{const r=await m.actions.create(c.value);s.value=!s.value}catch(r){console.log(r)}}async function f(r,l){if(confirm("Are you sure you want to deactivate this event?"))try{const t=await m.actions.update({...r,status:l});s.value=!s.value}catch(t){console.error(t)}}return(r,l)=>e.unref(n)?(e.openBlock(),e.createElementBlock("article",T,[e.createElementVNode("header",P,[S,e.createElementVNode("button",{onClick:l[0]||(l[0]=t=>_()),class:"radius-extra uppercase button-small flex-child flex-child-shrink-0 hover-scale-1 cursor-pointer t-white bg-second"}," Add Tickets "),e.createVNode(V.default,{onQrcodecheck:l[1]||(l[1]=t=>s.value=!s.value),class:"w-100 pd-medium mn-auto"})]),e.createVNode(x.default,{title:"Добавить участника",onClosePopup:p,isPopupOpen:i.value,class:"w-max-40r"},{default:e.withCtx(()=>[e.createVNode(N.default,{title:"Add tickets",placeholder:"No parameters added yet",class:"cols-1 mn-b-thin gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:a},[e.createVNode(u.default,{field:t.name,"onUpdate:field":o=>t.name=o,placeholder:"Name",class:"w-50 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.email,"onUpdate:field":o=>t.email=o,placeholder:"Email",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.quantity,"onUpdate:field":o=>t.quantity=o,placeholder:"Quantity",type:"number",class:"w-25 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),a<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l[2]||(l[2]=()=>c.value.push({name:"",value:"",target:e.unref(n)._id,type:"event",quantity:1})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>c.value.splice(a,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(q.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,D))]))),128)),e.createVNode(d.default,{submit:w,callback:p,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Create Tickets ")]),_:1})]),_:1})]),_:1},8,["isPopupOpen"]),e.createVNode(y.default,{search:!0,states:{empty:{title:"No Tickets Found",description:"Currently, there are no tickets."}},store:{read:t=>m.actions.read(t),state:null},options:{target:e.unref(n)._id},external:s.value},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(a,o)=>{var v,k;return e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("a",{href:a.image,target:"_blank"},[e.createElementVNode("img",{src:a.qrcode,class:"radius-small h-5r w-5r"},null,8,F)],8,A),e.createElementVNode("div",O,[e.createElementVNode("p",M,e.toDisplayString(((v=a.client_refactor)==null?void 0:v.name)||"No name")+", "+e.toDisplayString(a.role),1),e.createElementVNode("p",R,e.toDisplayString(((k=a.client_refactor)==null?void 0:k.email)||"No email"),1),e.createElementVNode("span",I,e.toDisplayString(a.status),1)]),a.status!=="deactivated"?(e.openBlock(),e.createBlock(d.default,{key:0,submit:()=>f(a,"deactivated"),callback:r.redirectTo,class:"w-min h-min pd-small bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Deactivate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0),a.status==="deactivated"||a.status==="used"?(e.openBlock(),e.createBlock(d.default,{key:1,submit:()=>f(a,"unused"),callback:r.redirectTo,class:"w-min h-min pd-small bg-green t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Activate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0)])}),256))]),_:1},8,["store","options","external"])])):e.createCommentVNode("",!0)}};exports.default=L;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../../../../components/Feed/Feed.vue.cjs"),N=require("../../../../components/Block/Block.vue.cjs"),x=require("../../../../components/Popup/Popup.vue.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),V=require("../elements/ButtonCheck.vue.cjs"),q=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs"),b=require("vue-router"),E=require("../../store/events.cjs"),C=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const m=require("../../store/tickets.cjs");;/* empty css */const T={key:0,class:"h-100 pd-thin"},P={class:"mn-b-medium flex-v-center flex-nowrap flex"},S=e.createElementVNode("h2",{class:"mn-r-medium"},"Tickets",-1),D=["onClick"],U={class:"radius-big bg-light gap-small pd-medium flex-v-center flex-nowrap flex pos-relative mn-b-thin"},A=["href"],F=["src"],O={class:"mn-r-auto"},M={class:"h4"},R={class:"h5 t-transp mn-b-thin"},I={class:"pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase"},L={__name:"EditEventTickets",setup(Q){var h;const g=b.useRoute();b.useRouter();let n=e.ref(null);const c=e.ref([{name:"",email:"",target:(h=n.value)==null?void 0:h._id,type:"event",quantity:1}]),i=e.ref(!1);function _(r){var l;i.value=!0,c.value=[{name:"",email:"",target:(l=n.value)==null?void 0:l._id,type:"event",quantity:1}]}function p(){i.value=!1}const s=e.ref(!1);e.onMounted(async()=>{const r=await E.read({user:C.state.user._id,url:g.params.url});n.value=r.pop()});async function w(){try{const r=await m.actions.create(c.value);s.value=!s.value}catch(r){console.log(r)}}async function f(r,l){if(confirm("Are you sure you want to deactivate this event?"))try{const t=await m.actions.update({...r,status:l});s.value=!s.value}catch(t){console.error(t)}}return(r,l)=>e.unref(n)?(e.openBlock(),e.createElementBlock("article",T,[e.createElementVNode("header",P,[S,e.createElementVNode("button",{onClick:l[0]||(l[0]=t=>_()),class:"radius-extra uppercase button-small flex-child flex-child-shrink-0 hover-scale-1 cursor-pointer t-white bg-second"}," Add Tickets "),e.createVNode(V.default,{onQrcodecheck:l[1]||(l[1]=t=>s.value=!s.value),class:"w-100 pd-medium mn-auto"})]),e.createVNode(x.default,{title:"Добавить участника",onClosePopup:p,isPopupOpen:i.value,class:"w-max-40r"},{default:e.withCtx(()=>[e.createVNode(N.default,{title:"Add tickets",placeholder:"No parameters added yet",class:"cols-1 mn-b-thin gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:a},[e.createVNode(u.default,{field:t.name,"onUpdate:field":o=>t.name=o,placeholder:"Name",class:"w-50 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.email,"onUpdate:field":o=>t.email=o,placeholder:"Email",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.quantity,"onUpdate:field":o=>t.quantity=o,placeholder:"Quantity",type:"number",class:"w-25 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),a<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l[2]||(l[2]=()=>c.value.push({name:"",value:"",target:e.unref(n)._id,type:"event",quantity:1})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>c.value.splice(a,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(q.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,D))]))),128)),e.createVNode(d.default,{submit:w,callback:p,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Create Tickets ")]),_:1})]),_:1})]),_:1},8,["isPopupOpen"]),e.createVNode(y.default,{search:!0,states:{empty:{title:"No Tickets Found",description:"Currently, there are no tickets."}},store:{read:t=>m.actions.read(t),state:null},options:{target:e.unref(n)._id},external:s.value},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(a,o)=>{var v,k;return e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("a",{href:a.image,target:"_blank"},[e.createElementVNode("img",{src:a.qrcode,class:"radius-small h-5r w-5r"},null,8,F)],8,A),e.createElementVNode("div",O,[e.createElementVNode("p",M,e.toDisplayString(((v=a.client_refactor)==null?void 0:v.name)||"No name")+", "+e.toDisplayString(a.role),1),e.createElementVNode("p",R,e.toDisplayString(((k=a.client_refactor)==null?void 0:k.email)||"No email"),1),e.createElementVNode("span",I,e.toDisplayString(a.status),1)]),a.status!=="deactivated"?(e.openBlock(),e.createBlock(d.default,{key:0,submit:()=>f(a,"deactivated"),callback:r.redirectTo,class:"w-min h-min pd-small bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Deactivate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0),a.status==="deactivated"||a.status==="used"?(e.openBlock(),e.createBlock(d.default,{key:1,submit:()=>f(a,"unused"),callback:r.redirectTo,class:"w-min h-min pd-small bg-green t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Activate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0)])}),256))]),_:1},8,["store","options","external"])])):e.createCommentVNode("",!0)}};exports.default=L;
@@ -1,7 +1,7 @@
1
1
  import { ref as p, onMounted as B, unref as _, openBlock as i, createElementBlock as o, createElementVNode as r, createVNode as l, withCtx as u, Fragment as $, renderList as q, createTextVNode as v, toDisplayString as f, createBlock as P, createCommentVNode as b } from "vue";
2
2
  import V from "../../../../components/Feed/Feed.vue.js";
3
3
  import F from "../../../../components/Block/Block.vue.js";
4
- import O from "../../../../components/Popup/Popup.vue2.js";
4
+ import O from "../../../../components/Popup/Popup.vue.js";
5
5
  import g from "../../../../components/Field/Field.vue2.js";
6
6
  import w from "../../../../components/Button/Button.vue2.js";
7
7
  import S from "../elements/ButtonCheck.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Feed/Feed.vue.cjs"),f=require("../../../../components/Popup/Popup.vue2.cjs"),m=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),b=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),g=require("../../store/gallery.cjs"),h={class:"cols-1 gap-thin pd-thin"},P={class:"w-100 h-100 h-min-10r pos-relative"},_=["src","onClick"],k={__name:"Gallery",setup(w){const d=e.ref([]),o=e.ref("all");let r=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),s=e.ref({start:null,end:null});const n=e.ref(null),u=e.ref(!1);function p(a){u.value=!0,n.value=a}function c(){u.value=!1,n.value=null}return(a,l)=>(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(b.default,{title:a.$t("gallery.title"),"onUpdate:tabs_current":l[0]||(l[0]=t=>o.value=t),tabs_current:o.value,tabs:[{name:"All",value:"all"},{name:"Place",value:"place"},{name:"Drinks",value:"drinks"},{name:"People",value:"people"},{name:"Events",value:"events"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["title","tabs_current"]),e.createVNode(f.default,{onClosePopup:c,isPopupOpen:u.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(m.default,{photoUrl:(a.FILE_SERVER_URL||"")+n.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(v.default,{items:d.value,"onUpdate:items":l[1]||(l[1]=t=>d.value=t),sort:e.unref(r),"onUpdate:sort":l[2]||(l[2]=t=>e.isRef(r)?r.value=t:r=t),date:e.unref(s),"onUpdate:date":l[3]||(l[3]=t=>e.isRef(s)?s.value=t:s=t),showLoadMore:!1,states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(g.default).read(t)},options:{limit:15,status:"published",...o.value!=="all"&&{tags:o.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,i=>(e.openBlock(),e.createElementBlock("div",{key:i._id,class:"bg-light radius-medium o-hidden flex-column pos-relative flex-wrap"},[e.createElementVNode("div",P,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+i.cover,class:"w-100 h-100 object-fit-cover bg-black",onClick:E=>p(i)},null,8,_)])]))),128))]),_:1},8,["items","sort","date","store","options"])]))}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Feed/Feed.vue.cjs"),f=require("../../../../components/Popup/Popup.vue.cjs"),m=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),b=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),g=require("../../store/gallery.cjs"),h={class:"cols-1 gap-thin pd-thin"},P={class:"w-100 h-100 h-min-10r pos-relative"},_=["src","onClick"],k={__name:"Gallery",setup(w){const d=e.ref([]),o=e.ref("all");let r=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),s=e.ref({start:null,end:null});const n=e.ref(null),u=e.ref(!1);function p(a){u.value=!0,n.value=a}function c(){u.value=!1,n.value=null}return(a,l)=>(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(b.default,{title:a.$t("gallery.title"),"onUpdate:tabs_current":l[0]||(l[0]=t=>o.value=t),tabs_current:o.value,tabs:[{name:"All",value:"all"},{name:"Place",value:"place"},{name:"Drinks",value:"drinks"},{name:"People",value:"people"},{name:"Events",value:"events"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["title","tabs_current"]),e.createVNode(f.default,{onClosePopup:c,isPopupOpen:u.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(m.default,{photoUrl:(a.FILE_SERVER_URL||"")+n.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(v.default,{items:d.value,"onUpdate:items":l[1]||(l[1]=t=>d.value=t),sort:e.unref(r),"onUpdate:sort":l[2]||(l[2]=t=>e.isRef(r)?r.value=t:r=t),date:e.unref(s),"onUpdate:date":l[3]||(l[3]=t=>e.isRef(s)?s.value=t:s=t),showLoadMore:!1,states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(g.default).read(t)},options:{limit:15,status:"published",...o.value!=="all"&&{tags:o.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,i=>(e.openBlock(),e.createElementBlock("div",{key:i._id,class:"bg-light radius-medium o-hidden flex-column pos-relative flex-wrap"},[e.createElementVNode("div",P,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+i.cover,class:"w-100 h-100 object-fit-cover bg-black",onClick:E=>p(i)},null,8,_)])]))),128))]),_:1},8,["items","sort","date","store","options"])]))}};exports.default=k;
@@ -1,6 +1,6 @@
1
1
  import { ref as t, openBlock as d, createElementBlock as m, createVNode as n, withCtx as f, unref as c, isRef as _, Fragment as P, renderList as w, createElementVNode as b } from "vue";
2
2
  import k from "../../../../components/Feed/Feed.vue.js";
3
- import E from "../../../../components/Popup/Popup.vue2.js";
3
+ import E from "../../../../components/Popup/Popup.vue.js";
4
4
  import y from "../../../../components/PhotoViewer/PhotoViewer.vue.js";
5
5
  import U from "../../../globals/views/components/sections/SectionPageTitle.vue.js";
6
6
  import R from "../../store/gallery.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("vue-router");;/* empty css */const w=require("../../../../components/Button/Button.vue2.cjs");;/* empty css */const B=require("../../../../components/Chips/Chips.vue.cjs");;/* empty css */const _=require("../../../../components/Popup/Popup.vue2.cjs"),E=require("../../../../components/Feed/Feed.vue.cjs"),U=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),k=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const o=require("../../store/gallery.cjs"),A=require("../../../globals/views/components/blocks/CardHeader.vue.cjs"),I=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),O=require("../../../../components/EditImages/EditImages.vue.cjs"),T=require("../../../../components/FieldTags/BlockTags.vue.cjs"),R={class:"cols-1 gap-thin pd-thin"},S={class:"pos-relative"},D=["src","onClick"],F={class:"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra"},j={class:"pd-small"},L=["src"],G={class:"flex-nowrap flex gap-thin"},M={__name:"BackofficeGallery",setup(z){const h=C.useRoute(),i=e.ref("all");let c=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),p=e.ref({start:null,end:null});const f=e.ref(!1);function x(a){f.value=!0,u.value=a}function y(){f.value=!1,u.value=null}const m=e.ref(!1);function V(a){m.value=!0,u.value=a}function v(){m.value=!1,u.value=null,n.value=[],r.value={tags:null,image:null}}const u=e.ref(null);e.ref("all");const r=e.ref({tags:null,image:null}),n=e.ref([]),N=a=>{n.value=a},d=e.ref([]),q=async a=>{await o.default.delete(a._id),o.default.removeItem(a,d.value)},g=async(a,s)=>{a.status=s,await o.default.update(a),o.default.updateItem(a,d.value)},b=async a=>{if(n.length<1){alert("Upload at least 1 image");return}let s=await o.default.create({images:n.value,tags:r.value.tags,status:a,owner:{type:"Organization",target:h.params._id},creator:{type:"User",target:k.state.user._id}});for(let t of s)o.default.addItem(t,d.value)};return(a,s)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(I.default,{title:"Gallery","onUpdate:tabs_current":s[0]||(s[0]=t=>i.value=t),tabs_current:i.value,tabs:[{name:"All",value:"all"},{name:"Featured",value:"featured"},{name:"Published",value:"published"},{name:"Draft",value:"draft"},{name:"Archived",value:"archived"}],actions:[{method:()=>V(null),label:"Add Photo"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","actions"]),e.createVNode(E.default,{items:d.value,"onUpdate:items":s[1]||(s[1]=t=>d.value=t),sort:e.unref(c),"onUpdate:sort":s[2]||(s[2]=t=>e.isRef(c)?c.value=t:c=t),date:e.unref(p),"onUpdate:date":s[3]||(s[3]=t=>e.isRef(p)?p.value=t:p=t),states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(o.default).read(t)},options:{limit:15,owner:e.unref(h).params._id,...i.value!=="all"&&{status:i.value}},class:"cols-3 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,l=>{var P;return e.openBlock(),e.createElementBlock("div",{key:l._id,class:"bg-light radius-small flex-column pos-relative flex-wrap"},[e.createVNode(A.default,{entity:l,entityType:"photo",user:k.state.user._id,owner:l.creator,creator:l.creator,date:l.createdAt,actions:[{method:()=>q(l),label:"Delete"},{method:()=>g(l,"archived"),label:"Archive"},l.status==="draft"?{method:()=>g(l,"published"),label:"Publish"}:{method:()=>g(l,"draft"),label:"Draft"}],class:"pd-small mn-b-small"},null,8,["entity","user","owner","creator","date","actions"]),e.createElementVNode("div",S,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+l.cover,class:"w-100 h-20r object-fit-contain bg-black",onClick:H=>x(l)},null,8,D),e.createElementVNode("div",F,e.toDisplayString(l.status),1)]),e.createElementVNode("div",j,[((P=l.tags)==null?void 0:P.length)>0?(e.openBlock(),e.createBlock(B.default,{key:0,chips:l.tags},null,8,["chips"])):e.createCommentVNode("",!0)])])}),128))]),_:1},8,["items","sort","date","store","options"]),e.createVNode(_.default,{onClosePopup:y,isPopupOpen:f.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(U.default,{photoUrl:u.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(_.default,{title:"Add Photo",onClosePopup:v,isPopupOpen:m.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[r.value.cover?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.value.cover,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,L)):e.createCommentVNode("",!0),e.createVNode(O.default,{images:n.value,uploadPath:"/photos","onUpdate:images":N,class:"mn-b-semi bg-light radius-medium"},null,8,["images"]),e.createVNode(T.default,{onTagsChanged:s[4]||(s[4]=t=>r.value.tags=t),tags:r.value.tags,tagsSuggested:[{text:"people"},{text:"events"},{text:"place"},{text:"food"},{text:"drinks"},{text:"special"}],class:"mn-b-semi"},null,8,["tags"]),e.createElementVNode("div",G,[e.createVNode(w.default,{submit:()=>b("draft"),callback:v,class:"t-nowrap bg-second w-100"},{default:e.withCtx(()=>[e.createTextVNode(" To drafts ")]),_:1},8,["submit"]),e.createVNode(w.default,{submit:()=>b("published"),callback:v,class:"bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Publish ")]),_:1},8,["submit"])])]),_:1},8,["isPopupOpen"])]))}};exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("vue-router");;/* empty css */const w=require("../../../../components/Button/Button.vue2.cjs");;/* empty css */const B=require("../../../../components/Chips/Chips.vue2.cjs");;/* empty css */const _=require("../../../../components/Popup/Popup.vue.cjs"),E=require("../../../../components/Feed/Feed.vue.cjs"),U=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),k=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const o=require("../../store/gallery.cjs"),A=require("../../../globals/views/components/blocks/CardHeader.vue.cjs"),I=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),O=require("../../../../components/EditImages/EditImages.vue.cjs"),T=require("../../../../components/FieldTags/BlockTags.vue.cjs"),R={class:"cols-1 gap-thin pd-thin"},S={class:"pos-relative"},D=["src","onClick"],F={class:"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra"},j={class:"pd-small"},L=["src"],G={class:"flex-nowrap flex gap-thin"},M={__name:"BackofficeGallery",setup(z){const h=C.useRoute(),i=e.ref("all");let c=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),p=e.ref({start:null,end:null});const f=e.ref(!1);function x(a){f.value=!0,u.value=a}function y(){f.value=!1,u.value=null}const m=e.ref(!1);function V(a){m.value=!0,u.value=a}function v(){m.value=!1,u.value=null,n.value=[],r.value={tags:null,image:null}}const u=e.ref(null);e.ref("all");const r=e.ref({tags:null,image:null}),n=e.ref([]),N=a=>{n.value=a},d=e.ref([]),q=async a=>{await o.default.delete(a._id),o.default.removeItem(a,d.value)},g=async(a,s)=>{a.status=s,await o.default.update(a),o.default.updateItem(a,d.value)},b=async a=>{if(n.length<1){alert("Upload at least 1 image");return}let s=await o.default.create({images:n.value,tags:r.value.tags,status:a,owner:{type:"Organization",target:h.params._id},creator:{type:"User",target:k.state.user._id}});for(let t of s)o.default.addItem(t,d.value)};return(a,s)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(I.default,{title:"Gallery","onUpdate:tabs_current":s[0]||(s[0]=t=>i.value=t),tabs_current:i.value,tabs:[{name:"All",value:"all"},{name:"Featured",value:"featured"},{name:"Published",value:"published"},{name:"Draft",value:"draft"},{name:"Archived",value:"archived"}],actions:[{method:()=>V(null),label:"Add Photo"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","actions"]),e.createVNode(E.default,{items:d.value,"onUpdate:items":s[1]||(s[1]=t=>d.value=t),sort:e.unref(c),"onUpdate:sort":s[2]||(s[2]=t=>e.isRef(c)?c.value=t:c=t),date:e.unref(p),"onUpdate:date":s[3]||(s[3]=t=>e.isRef(p)?p.value=t:p=t),states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(o.default).read(t)},options:{limit:15,owner:e.unref(h).params._id,...i.value!=="all"&&{status:i.value}},class:"cols-3 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,l=>{var P;return e.openBlock(),e.createElementBlock("div",{key:l._id,class:"bg-light radius-small flex-column pos-relative flex-wrap"},[e.createVNode(A.default,{entity:l,entityType:"photo",user:k.state.user._id,owner:l.creator,creator:l.creator,date:l.createdAt,actions:[{method:()=>q(l),label:"Delete"},{method:()=>g(l,"archived"),label:"Archive"},l.status==="draft"?{method:()=>g(l,"published"),label:"Publish"}:{method:()=>g(l,"draft"),label:"Draft"}],class:"pd-small mn-b-small"},null,8,["entity","user","owner","creator","date","actions"]),e.createElementVNode("div",S,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+l.cover,class:"w-100 h-20r object-fit-contain bg-black",onClick:H=>x(l)},null,8,D),e.createElementVNode("div",F,e.toDisplayString(l.status),1)]),e.createElementVNode("div",j,[((P=l.tags)==null?void 0:P.length)>0?(e.openBlock(),e.createBlock(B.default,{key:0,chips:l.tags},null,8,["chips"])):e.createCommentVNode("",!0)])])}),128))]),_:1},8,["items","sort","date","store","options"]),e.createVNode(_.default,{onClosePopup:y,isPopupOpen:f.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(U.default,{photoUrl:u.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(_.default,{title:"Add Photo",onClosePopup:v,isPopupOpen:m.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[r.value.cover?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.value.cover,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,L)):e.createCommentVNode("",!0),e.createVNode(O.default,{images:n.value,uploadPath:"/photos","onUpdate:images":N,class:"mn-b-semi bg-light radius-medium"},null,8,["images"]),e.createVNode(T.default,{onTagsChanged:s[4]||(s[4]=t=>r.value.tags=t),tags:r.value.tags,tagsSuggested:[{text:"people"},{text:"events"},{text:"place"},{text:"food"},{text:"drinks"},{text:"special"}],class:"mn-b-semi"},null,8,["tags"]),e.createElementVNode("div",G,[e.createVNode(w.default,{submit:()=>b("draft"),callback:v,class:"t-nowrap bg-second w-100"},{default:e.withCtx(()=>[e.createTextVNode(" To drafts ")]),_:1},8,["submit"]),e.createVNode(w.default,{submit:()=>b("published"),callback:v,class:"bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Publish ")]),_:1},8,["submit"])])]),_:1},8,["isPopupOpen"])]))}};exports.default=M;
@@ -2,10 +2,10 @@ import { ref as s, openBlock as d, createElementBlock as h, createVNode as o, un
2
2
  import { useRoute as j } from "vue-router";
3
3
  /* empty css */
4
4
  import I from "../../../../components/Button/Button.vue2.js";
5
- /* empty css */
6
- import G from "../../../../components/Chips/Chips.vue.js";
5
+ /* empty css */
6
+ import G from "../../../../components/Chips/Chips.vue2.js";
7
7
  /* empty css */
8
- import O from "../../../../components/Popup/Popup.vue2.js";
8
+ import O from "../../../../components/Popup/Popup.vue.js";
9
9
  import z from "../../../../components/Feed/Feed.vue.js";
10
10
  import q from "../../../../components/PhotoViewer/PhotoViewer.vue.js";
11
11
  import { state as D } from "../../../auth/views/store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./views/localization/get-browser-locale.cjs"),g=require("./views/router/scrollBehavior.cjs"),s=require("./views/components/layouts/App.vue.cjs"),i=require("./views/mixins/mixins.cjs"),r=require("./views/store/globals.cjs");function b(e,t,a,n={}){n.route,e.config.globalProperties.DOMAIN_URL=process.env.DOMAIN_URL,e.config.globalProperties.API_URL=process.env.API_URL,e.config.globalProperties.MOBILE_APP=process.env.MOBILE_APP,e.config.globalProperties.FILE_SERVER_URL=process.env.FILE_SERVER_URL,e.config.globalProperties.GOOGLE_MAPS_API_KEY=process.env.GOOGLE_MAPS_API_KEY,e.mixin(i.globalMixins),a.beforeEach((c,P,o)=>{const l=c.params.locale;return l?e.config.globalProperties.$i18n.availableLocales.includes(l)?(e.config.globalProperties.$i18n.locale=l,o()):o({path:"/404"}):o()}),t.addStore("globals",r)}const f={initialize:b,views:{store:{storeGlobals:r},router:{},components:{layoutApp:s.default}}};exports.getBrowserLocale=u.default;exports.scrollBehavior=g.default;exports.layoutApp=s.default;exports.mixins=i;exports.storeGlobals=r;exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("./views/localization/get-browser-locale.cjs"),g=require("./views/router/scrollBehavior.cjs"),n=require("./views/components/layouts/App.vue.cjs"),s=require("./views/components/layouts/Client.vue.cjs"),a=require("./views/mixins/mixins.cjs"),i=require("./views/store/globals.cjs");function P(e,c,o,u={}){const l=u.route||"Home";e.config.globalProperties.DOMAIN_URL=process.env.DOMAIN_URL,e.config.globalProperties.API_URL=process.env.API_URL,e.config.globalProperties.MOBILE_APP=process.env.MOBILE_APP,e.config.globalProperties.FILE_SERVER_URL=process.env.FILE_SERVER_URL,e.config.globalProperties.GOOGLE_MAPS_API_KEY=process.env.GOOGLE_MAPS_API_KEY,e.mixin(a.globalMixins),o.beforeEach((d,_,r)=>{const t=d.params.locale;return t?e.config.globalProperties.$i18n.availableLocales.includes(t)?(e.config.globalProperties.$i18n.locale=t,r()):r({path:"/404"}):r()}),c.addStore("globals",i),o.addRoute(l,{path:"/404",name:"notfound",component:()=>Promise.resolve().then(()=>require("./views/components/pages/404.vue.cjs"))}),o.addRoute(l,{path:"/401",name:"unauthorized",component:()=>Promise.resolve().then(()=>require("./views/components/pages/401.vue.cjs"))}),o.addRoute(l,{path:"/:pathMatch(.*)*",name:"NotFound",redirect:{name:"notfound"}})}const b={initialize:P,views:{store:{storeGlobals:i},router:{},components:{layoutClient:s.default,layoutApp:n.default}}};exports.getBrowserLocale=f.default;exports.scrollBehavior=g.default;exports.layoutApp=n.default;exports.layoutClient=s.default;exports.mixins=a;exports.storeGlobals=i;exports.default=b;
@@ -1,36 +1,39 @@
1
- import { default as u } from "./views/localization/get-browser-locale.js";
2
- import { default as A } from "./views/router/scrollBehavior.js";
3
- import n from "./views/components/layouts/App.vue.js";
4
- import { globalMixins as c } from "./views/mixins/mixins.js";
1
+ import { default as R } from "./views/localization/get-browser-locale.js";
2
+ import { default as I } from "./views/router/scrollBehavior.js";
3
+ import c from "./views/components/layouts/App.vue.js";
4
+ import m from "./views/components/layouts/Client.vue.js";
5
+ import { globalMixins as f } from "./views/mixins/mixins.js";
5
6
  import * as P from "./views/mixins/mixins.js";
6
- import * as l from "./views/store/globals.js";
7
- function f(o, s, i, a = {}) {
8
- a.route, o.config.globalProperties.DOMAIN_URL = process.env.DOMAIN_URL, o.config.globalProperties.API_URL = process.env.API_URL, o.config.globalProperties.MOBILE_APP = process.env.MOBILE_APP, o.config.globalProperties.FILE_SERVER_URL = process.env.FILE_SERVER_URL, o.config.globalProperties.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY, o.mixin(c), i.beforeEach((t, g, e) => {
9
- const r = t.params.locale;
10
- return r ? o.config.globalProperties.$i18n.availableLocales.includes(r) ? (o.config.globalProperties.$i18n.locale = r, e()) : e({ path: "/404" }) : e();
11
- }), s.addStore("globals", l);
7
+ import * as a from "./views/store/globals.js";
8
+ function p(o, i, e, s = {}) {
9
+ const t = s.route || "Home";
10
+ o.config.globalProperties.DOMAIN_URL = process.env.DOMAIN_URL, o.config.globalProperties.API_URL = process.env.API_URL, o.config.globalProperties.MOBILE_APP = process.env.MOBILE_APP, o.config.globalProperties.FILE_SERVER_URL = process.env.FILE_SERVER_URL, o.config.globalProperties.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY, o.mixin(f), e.beforeEach((n, u, r) => {
11
+ const l = n.params.locale;
12
+ return l ? o.config.globalProperties.$i18n.availableLocales.includes(l) ? (o.config.globalProperties.$i18n.locale = l, r()) : r({ path: "/404" }) : r();
13
+ }), i.addStore("globals", a), e.addRoute(t, { path: "/404", name: "notfound", component: () => import("./views/components/pages/404.vue.js") }), e.addRoute(t, { path: "/401", name: "unauthorized", component: () => import("./views/components/pages/401.vue.js") }), e.addRoute(t, { path: "/:pathMatch(.*)*", name: "NotFound", redirect: { name: "notfound" } });
12
14
  }
13
15
  const b = {
14
- initialize: f,
16
+ initialize: p,
15
17
  views: {
16
18
  store: {
17
- storeGlobals: l
19
+ storeGlobals: a
18
20
  },
19
21
  router: {
20
22
  // routerOrders
21
23
  },
22
24
  components: {
23
25
  // Pages
24
- // layoutClient,
25
- layoutApp: n
26
+ layoutClient: m,
27
+ layoutApp: c
26
28
  }
27
29
  }
28
30
  };
29
31
  export {
30
32
  b as default,
31
- u as getBrowserLocale,
32
- n as layoutApp,
33
+ R as getBrowserLocale,
34
+ c as layoutApp,
35
+ m as layoutClient,
33
36
  P as mixins,
34
- A as scrollBehavior,
35
- l as storeGlobals
37
+ I as scrollBehavior,
38
+ a as storeGlobals
36
39
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("vue-router"),C=require("../../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),V=require("../../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../../../components/Tooltip/Tooltip.vue2.cjs"),v=require("../../../../../components/Dropdown/Dropdown.vue.cjs");;/* empty css */;/* empty css */require("../../../../auth/views/store/auth.cjs");require("../../../../organizations/store/memberships.cjs");const $=require("../../../../icons/navigation/IconEllipsis.vue.cjs"),S={key:0,class:"pd-b-zero"},z={class:"w-100 flex-v-center flex-nojustify flex"},D={class:"w-100 flex-nowrap flex-v-center flex"},M=["src"],q={key:2,class:"t-semi"},R={key:1,class:"mn-l-micro mn-r-micro"},F={key:2,class:"pos-relative"},P={key:3},T={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},U={key:0,class:"w-4r pos-relative i-thin"},L={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},I=["src"],O={class:"bg-black flex-column flex gap-thin pd-thin radius-small"},j=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),A=["onClick"],H={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type","actions"],setup(t){x.useRouter();function E(n){const r=new Date,d=new Date(n),m=Math.abs(r-d),u=Math.floor(m/1e3),a=Math.floor(u/60),s=Math.floor(a/60),i=Math.floor(s/24),c=Math.floor(i/7);return c>0?`${c} week${c>1?"s":""} ago`:i>0?`${i} day${i>1?"s":""} ago`:s>0?`${s} hour${s>1?"s":""} ago`:a>0?`${a} minute${a>1?"s":""} ago`:"Just now"}return(n,r)=>{var m,u,a,s,i,c,k,h,g,b,f,y,w,B,p;const d=e.resolveComponent("router-link");return t.owner?(e.openBlock(),e.createElementBlock("header",S,[e.createElementVNode("div",z,[e.createElementVNode("div",D,[((a=(u=(m=t.owner.target)==null?void 0:m.profile)==null?void 0:u.photo)==null?void 0:a.length)>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(n.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium object-fit-cover mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,M)):e.createCommentVNode("",!0),!((i=(s=t.owner.target)==null?void 0:s.profile)!=null&&i.photo)&&t.type!=="short"?(e.openBlock(),e.createBlock(C.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",q,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(((k=(c=t.owner.target)==null?void 0:c.profile)==null?void 0:k.name)||((h=t.creator.target)==null?void 0:h.username)||"Anonymous"),1),!t.creator.hidden&&((b=(g=t.owner.target)==null?void 0:g.profile)==null?void 0:b.name)!==((y=(f=t.creator.target)==null?void 0:f.profile)==null?void 0:y.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(o=>{var l;return n.$router.push({name:"User Profile",params:{_id:(l=t.creator.target)==null?void 0:l._id}})},["stop"]))}," · by "+e.toDisplayString(((B=(w=t.creator.target)==null?void 0:w.profile)==null?void 0:B.name)||((p=t.creator.target)==null?void 0:p.username)||"Anonymous"),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",R,"·")):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",F,[t.date?(e.openBlock(),e.createBlock(N.default,{key:0,text:n.formatDate(t.date)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E(t.date)),1)]),_:1},8,["text"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",P," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",T,[t.members?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("span",L,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(o,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o?(e.openBlock(),e.createElementBlock("img",{key:l,src:(n.FILE_SERVER_URL||"")+o,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-light radius-big"},null,12,I)):(e.openBlock(),e.createBlock(C.default,{key:1,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-light radius-big"},null,8,["style"]))],64))),256))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user?(e.openBlock(),e.createBlock(v.default,{key:3,label:{component:$.default,class:"t-transp i-regular"},align:"right",class:"cursor-pointer z-index-2"},{default:e.withCtx(()=>[e.createElementVNode("section",O,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(V.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[j]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0),t.actions&&t.actions.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.actions,o=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.to?(e.openBlock(),e.createBlock(d,{key:o.to,to:o.to,class:e.normalizeClass(o.class||"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["to","class"])):e.createCommentVNode("",!0),o.method?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o.method,class:e.normalizeClass(o.class||"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button")},e.toDisplayString(o.label),11,A)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=H;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("vue-router"),C=require("../../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),V=require("../../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../../../components/Tooltip/Tooltip.vue2.cjs"),v=require("../../../../../components/Dropdown/Dropdown.vue2.cjs");;/* empty css */;/* empty css */require("../../../../auth/views/store/auth.cjs");require("../../../../organizations/store/memberships.cjs");const $=require("../../../../icons/navigation/IconEllipsis.vue.cjs"),S={key:0,class:"pd-b-zero"},z={class:"w-100 flex-v-center flex-nojustify flex"},D={class:"w-100 flex-nowrap flex-v-center flex"},M=["src"],q={key:2,class:"t-semi"},R={key:1,class:"mn-l-micro mn-r-micro"},F={key:2,class:"pos-relative"},P={key:3},T={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},U={key:0,class:"w-4r pos-relative i-thin"},L={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},I=["src"],O={class:"bg-black flex-column flex gap-thin pd-thin radius-small"},j=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),A=["onClick"],H={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type","actions"],setup(t){x.useRouter();function E(n){const r=new Date,d=new Date(n),m=Math.abs(r-d),u=Math.floor(m/1e3),a=Math.floor(u/60),s=Math.floor(a/60),i=Math.floor(s/24),c=Math.floor(i/7);return c>0?`${c} week${c>1?"s":""} ago`:i>0?`${i} day${i>1?"s":""} ago`:s>0?`${s} hour${s>1?"s":""} ago`:a>0?`${a} minute${a>1?"s":""} ago`:"Just now"}return(n,r)=>{var m,u,a,s,i,c,k,h,g,b,f,y,w,B,p;const d=e.resolveComponent("router-link");return t.owner?(e.openBlock(),e.createElementBlock("header",S,[e.createElementVNode("div",z,[e.createElementVNode("div",D,[((a=(u=(m=t.owner.target)==null?void 0:m.profile)==null?void 0:u.photo)==null?void 0:a.length)>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(n.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium object-fit-cover mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,M)):e.createCommentVNode("",!0),!((i=(s=t.owner.target)==null?void 0:s.profile)!=null&&i.photo)&&t.type!=="short"?(e.openBlock(),e.createBlock(C.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",q,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(((k=(c=t.owner.target)==null?void 0:c.profile)==null?void 0:k.name)||((h=t.creator.target)==null?void 0:h.username)||"Anonymous"),1),!t.creator.hidden&&((b=(g=t.owner.target)==null?void 0:g.profile)==null?void 0:b.name)!==((y=(f=t.creator.target)==null?void 0:f.profile)==null?void 0:y.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(o=>{var l;return n.$router.push({name:"User Profile",params:{_id:(l=t.creator.target)==null?void 0:l._id}})},["stop"]))}," · by "+e.toDisplayString(((B=(w=t.creator.target)==null?void 0:w.profile)==null?void 0:B.name)||((p=t.creator.target)==null?void 0:p.username)||"Anonymous"),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",R,"·")):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",F,[t.date?(e.openBlock(),e.createBlock(N.default,{key:0,text:n.formatDate(t.date)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E(t.date)),1)]),_:1},8,["text"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",P," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",T,[t.members?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("span",L,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(o,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o?(e.openBlock(),e.createElementBlock("img",{key:l,src:(n.FILE_SERVER_URL||"")+o,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-light radius-big"},null,12,I)):(e.openBlock(),e.createBlock(C.default,{key:1,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-light radius-big"},null,8,["style"]))],64))),256))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user?(e.openBlock(),e.createBlock(v.default,{key:3,label:{component:$.default,class:"t-transp i-regular"},align:"right",class:"cursor-pointer z-index-2"},{default:e.withCtx(()=>[e.createElementVNode("section",O,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(V.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[j]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0),t.actions&&t.actions.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.actions,o=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.to?(e.openBlock(),e.createBlock(d,{key:o.to,to:o.to,class:e.normalizeClass(o.class||"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["to","class"])):e.createCommentVNode("",!0),o.method?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o.method,class:e.normalizeClass(o.class||"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button")},e.toDisplayString(o.label),11,A)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=H;
@@ -3,7 +3,7 @@ import { useRouter as T } from "vue-router";
3
3
  import V from "../../../../icons/placeholders/PlaceholderUserpic.vue.js";
4
4
  import A from "../../../../reports/components/sections/FormReport.vue.js";
5
5
  import B from "../../../../../components/Tooltip/Tooltip.vue2.js";
6
- import N from "../../../../../components/Dropdown/Dropdown.vue.js";
6
+ import N from "../../../../../components/Dropdown/Dropdown.vue2.js";
7
7
  /* empty css */
8
8
  /* empty css */
9
9
  import "../../../../auth/views/store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),g=require("../../../../../../../node_modules/@unhead/vue/dist/shared/vue.f36acd1f.cjs"),v=require("vue-i18n"),w=require("vue-router"),i="https://weeder.delivery",f={__name:"App",props:{messages:{type:Object,required:!0}},setup(l){const u=l,{t:e,locale:_}=v.useI18n({messages:u.messages}),c=t.computed(()=>s(`${i}${o.path}`)),o=w.useRoute(),d=["en","ru"];function s(r){return r.endsWith("/")?r.slice(0,-1):r}const p=t.computed(()=>({title:e("meta.title"),description:e("meta.description"),meta:[{charset:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1, shrink-to-fit=no"},{hid:"description",name:"description",content:e("meta.description")},{hid:"keywords",name:"keywords",content:e("meta.keywords")},{hid:"og:title",property:"og:title",content:e("meta.og.title")},{hid:"og:description",property:"og:description",content:e("meta.og.description")},{hid:"og:image",property:"og:image",content:i+"/favicon/cover.jpg"},{hid:"og:url",property:"og:url",content:c.value},{hid:"twitter:title",name:"twitter:title",content:e("meta.twitter.title")},{hid:"twitter:description",name:"twitter:description",content:e("meta.twitter.description")},{hid:"twitter:image",name:"twitter:image",content:i+"/favicon/cover.jpg"},{hid:"twitter:card",name:"twitter:card",content:e("meta.twitter.card")}],link:[{hid:"canonical",rel:"canonical",href:c.value},...m.value],htmlAttrs:{lang:e("meta.htmlAttrs.lang")}})),m=t.computed(()=>d.map(r=>{let n=o.path;console.log(o),o.params.locale?n=n.replace(`/${o.params.locale}`,`/${r}`):n=`/${r}${n}`;const a=s(`${i}${n}`);return{hid:"alternate",rel:"alternate",hreflang:r,href:a}}));return g.u(p.value),(r,n)=>{const a=t.resolveComponent("router-view");return t.openBlock(),t.createBlock(a,null,{default:t.withCtx(({Component:h})=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(h)))]),_:1})}}};exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../../../../node_modules/@unhead/vue/dist/shared/vue.f36acd1f.cjs"),w=require("vue-i18n"),f=require("vue-router"),p=require("../../store/globals.cjs"),a="https://weeder.delivery",y={__name:"App",props:{messages:{type:Object,required:!0},logotype:{type:Object}},setup(c){const d=c,{t,locale:k}=w.useI18n({messages:d.messages}),s=e.computed(()=>l(`${a}${n.path}`)),n=f.useRoute(),m=["en","ru"];function l(o){return o.endsWith("/")?o.slice(0,-1):o}const u=e.computed(()=>({title:t("meta.title"),description:t("meta.description"),meta:[{charset:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1, shrink-to-fit=no"},{hid:"description",name:"description",content:t("meta.description")},{hid:"keywords",name:"keywords",content:t("meta.keywords")},{hid:"og:title",property:"og:title",content:t("meta.og.title")},{hid:"og:description",property:"og:description",content:t("meta.og.description")},{hid:"og:image",property:"og:image",content:a+"/favicon/cover.jpg"},{hid:"og:url",property:"og:url",content:s.value},{hid:"twitter:title",name:"twitter:title",content:t("meta.twitter.title")},{hid:"twitter:description",name:"twitter:description",content:t("meta.twitter.description")},{hid:"twitter:image",name:"twitter:image",content:a+"/favicon/cover.jpg"},{hid:"twitter:card",name:"twitter:card",content:t("meta.twitter.card")}],link:[{hid:"canonical",rel:"canonical",href:s.value},...h.value],htmlAttrs:{lang:t("meta.htmlAttrs.lang")}})),h=e.computed(()=>m.map(o=>{let r=n.path;console.log(n),n.params.locale?r=r.replace(`/${n.params.locale}`,`/${o}`):r=`/${o}${r}`;const i=l(`${a}${r}`);return{hid:"alternate",rel:"alternate",hreflang:o,href:i}}));return v.u(u.value),(o,r)=>{const i=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.Transition,{name:"moveFromTop",mode:"out-in",appear:""},{default:e.withCtx(()=>[o.MOBILE_APP?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i,{key:0,name:"Header",ref:"header",class:e.normalizeClass(["transition-ease-in-out pos-relative br-b br-solid br-grey-transp-10 pos-t-0",{"pos-l-70":p.state.isOpenSidebar,"pos-l-0":!p.state.isOpenSidebar}]),theme:o.headerTheme,logotype:c.logotype},null,8,["theme","logotype","class"]))]),_:1}),e.createVNode(i,null,{default:e.withCtx(({Component:g})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g)))]),_:1})],64)}}};exports.default=y;
@@ -1,66 +1,92 @@
1
- import { computed as a, resolveComponent as f, openBlock as l, createBlock as m, withCtx as v, resolveDynamicComponent as _ } from "vue";
2
- import { u as y } from "../../../../../../../node_modules/@unhead/vue/dist/shared/vue.f36acd1f.js";
3
- import { useI18n as k } from "vue-i18n";
4
- import { useRoute as $ } from "vue-router";
5
- const o = "https://weeder.delivery", B = {
1
+ import { computed as a, resolveComponent as k, openBlock as s, createElementBlock as _, Fragment as b, createVNode as p, Transition as $, withCtx as d, createBlock as u, normalizeClass as A, createCommentVNode as C, resolveDynamicComponent as O } from "vue";
2
+ import { u as j } from "../../../../../../../node_modules/@unhead/vue/dist/shared/vue.f36acd1f.js";
3
+ import { useI18n as B } from "vue-i18n";
4
+ import { useRoute as T } from "vue-router";
5
+ import { state as h } from "../../store/globals.js";
6
+ const i = "https://weeder.delivery", L = {
6
7
  __name: "App",
7
8
  props: {
8
9
  messages: {
9
10
  type: Object,
10
11
  required: !0
12
+ },
13
+ logotype: {
14
+ type: Object
11
15
  }
12
16
  },
13
- setup(p) {
14
- const d = p, { t, locale: A } = k({
15
- messages: d.messages
16
- }), c = a(() => s(`${o}${n.path}`)), n = $(), u = ["en", "ru"];
17
- function s(e) {
18
- return e.endsWith("/") ? e.slice(0, -1) : e;
17
+ setup(c) {
18
+ const g = c, { t: e, locale: P } = B({
19
+ messages: g.messages
20
+ }), l = a(() => m(`${i}${o.path}`)), o = T(), w = ["en", "ru"];
21
+ function m(t) {
22
+ return t.endsWith("/") ? t.slice(0, -1) : t;
19
23
  }
20
- const h = a(() => ({
21
- title: t("meta.title"),
22
- description: t("meta.description"),
24
+ const f = a(() => ({
25
+ title: e("meta.title"),
26
+ description: e("meta.description"),
23
27
  meta: [
24
28
  { charset: "utf-8" },
25
29
  { name: "viewport", content: "width=device-width, initial-scale=1, shrink-to-fit=no" },
26
- { hid: "description", name: "description", content: t("meta.description") },
27
- { hid: "keywords", name: "keywords", content: t("meta.keywords") },
28
- { hid: "og:title", property: "og:title", content: t("meta.og.title") },
29
- { hid: "og:description", property: "og:description", content: t("meta.og.description") },
30
- { hid: "og:image", property: "og:image", content: o + "/favicon/cover.jpg" },
31
- { hid: "og:url", property: "og:url", content: c.value },
32
- { hid: "twitter:title", name: "twitter:title", content: t("meta.twitter.title") },
33
- { hid: "twitter:description", name: "twitter:description", content: t("meta.twitter.description") },
34
- { hid: "twitter:image", name: "twitter:image", content: o + "/favicon/cover.jpg" },
35
- { hid: "twitter:card", name: "twitter:card", content: t("meta.twitter.card") }
30
+ { hid: "description", name: "description", content: e("meta.description") },
31
+ { hid: "keywords", name: "keywords", content: e("meta.keywords") },
32
+ { hid: "og:title", property: "og:title", content: e("meta.og.title") },
33
+ { hid: "og:description", property: "og:description", content: e("meta.og.description") },
34
+ { hid: "og:image", property: "og:image", content: i + "/favicon/cover.jpg" },
35
+ { hid: "og:url", property: "og:url", content: l.value },
36
+ { hid: "twitter:title", name: "twitter:title", content: e("meta.twitter.title") },
37
+ { hid: "twitter:description", name: "twitter:description", content: e("meta.twitter.description") },
38
+ { hid: "twitter:image", name: "twitter:image", content: i + "/favicon/cover.jpg" },
39
+ { hid: "twitter:card", name: "twitter:card", content: e("meta.twitter.card") }
36
40
  ],
37
41
  link: [
38
- { hid: "canonical", rel: "canonical", href: c.value },
39
- ...g.value
42
+ { hid: "canonical", rel: "canonical", href: l.value },
43
+ ...v.value
40
44
  ],
41
- htmlAttrs: { lang: t("meta.htmlAttrs.lang") }
42
- })), g = a(() => u.map((e) => {
43
- let r = n.path;
44
- console.log(n), n.params.locale ? r = r.replace(`/${n.params.locale}`, `/${e}`) : r = `/${e}${r}`;
45
- const i = s(`${o}${r}`);
45
+ htmlAttrs: { lang: e("meta.htmlAttrs.lang") }
46
+ })), v = a(() => w.map((t) => {
47
+ let r = o.path;
48
+ console.log(o), o.params.locale ? r = r.replace(`/${o.params.locale}`, `/${t}`) : r = `/${t}${r}`;
49
+ const n = m(`${i}${r}`);
46
50
  return {
47
51
  hid: "alternate",
48
52
  rel: "alternate",
49
- hreflang: e,
50
- href: i
53
+ hreflang: t,
54
+ href: n
51
55
  };
52
56
  }));
53
- return y(h.value), (e, r) => {
54
- const i = f("router-view");
55
- return l(), m(i, null, {
56
- default: v(({ Component: w }) => [
57
- (l(), m(_(w)))
58
- ]),
59
- _: 1
60
- });
57
+ return j(f.value), (t, r) => {
58
+ const n = k("router-view");
59
+ return s(), _(b, null, [
60
+ p($, {
61
+ name: "moveFromTop",
62
+ mode: "out-in",
63
+ appear: ""
64
+ }, {
65
+ default: d(() => [
66
+ t.MOBILE_APP ? C("", !0) : (s(), u(n, {
67
+ key: 0,
68
+ name: "Header",
69
+ ref: "header",
70
+ class: A(["transition-ease-in-out pos-relative br-b br-solid br-grey-transp-10 pos-t-0", {
71
+ "pos-l-70": h.isOpenSidebar,
72
+ "pos-l-0": !h.isOpenSidebar
73
+ }]),
74
+ theme: t.headerTheme,
75
+ logotype: c.logotype
76
+ }, null, 8, ["theme", "logotype", "class"]))
77
+ ]),
78
+ _: 1
79
+ }),
80
+ p(n, null, {
81
+ default: d(({ Component: y }) => [
82
+ (s(), u(O(y)))
83
+ ]),
84
+ _: 1
85
+ })
86
+ ], 64);
61
87
  };
62
88
  }
63
89
  };
64
90
  export {
65
- B as default
91
+ L as default
66
92
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("vue-router"),o=require("../../store/globals.cjs"),w=require("../../../../../components/Loader/Loader.vue2.cjs"),b=require("../../../../../components/Status/Status.vue.cjs"),O=require("../../../../../components/Sidebar/Sidebar.vue.cjs"),y=require("../../../../../components/Popup/Popup.vue.cjs");require("vue-i18n");;/* empty css */const P=require("../../../../../components/LocationSelection/LocationSelection.vue.cjs"),N=require("../partials/Navigation.vue.cjs");require("../../../../products/store/categories.cjs");const q=require("../partials/BottomNavigation.vue.cjs"),V=require("../../../../orders/components/partials/ShopCart.vue.cjs"),L=require("../../../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs");;/* empty css */const x={id:"app-wrapper",class:"pos-relative"},T={key:0,class:"w-100"},E={__name:"Client",setup($){let i;__MOBILE_APP__?i=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../sections/Walkthrough.vue.cjs")).then(t=>t.default)):i=null;const s=e.ref(!1);async function g(){const t=await L.Preferences.get({key:"first-use"});s.value=t.value?JSON.parse(t.value):!0}const k=t=>{s.value=t},c=v.useRoute();v.useRouter();let p=e.ref(!1);const u=e.ref(null),B=e.ref(null),f=e.ref(c.query.referalCode);function C(){o.state.isOpenLocationPopup=!1}function _(){document.getElementById("app").scrollIntoView()}const n=e.ref(0);let l=!1;const a=e.ref(null);e.computed(()=>n.value>50?"light":c.meta.header_theme||"light");const h=()=>{if(n.value=event.target.scrollTop,n.value>50&&!l){l=!0,a.value.$el.classList.add("scrolled");const r=-a.value.$el.getBoundingClientRect().top;a.value.$el.style.transform=`translateY(${r}px)`,setTimeout(()=>{a.value.$el.style.transform="translateY(0)"},0)}else if(n.value<=75&&l){l=!1,a.value.$el.classList.remove("scrolled");const r=a.value.$el.getBoundingClientRect().top;a.value.$el.style.transform=`translateY(${r}px)`,setTimeout(()=>{a.value.$el.style.transform="translateY(0)"},0)}};return e.onMounted(async()=>{await g(),"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/service-worker.js").then(r=>{console.log("SW registered: ",r)}).catch(r=>{console.log("SW registration failed: ",r)})}),u&&(p.value=!0);const t=localStorage.getItem("position");t?o.state.position=JSON.parse(t):o.state.isOpenLocationPopup=!0,f.value&&localStorage.setItem("referalCode",f.value)}),(t,r)=>{const S=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",x,[e.createVNode(e.Transition,{name:"moveFromTop",appear:""},{default:e.withCtx(()=>[u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w.default,{key:0,class:"pos-fixed"}))]),_:1}),e.createVNode(e.Transition,{name:"scaleTransition",mode:"out-in"},{default:e.withCtx(()=>[t.MOBILE_APP&&s.value?(e.openBlock(),e.createElementBlock("section",T,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i)),{onUpdateFirstUse:k,slides:[1,2,3],class:"tab"},null,32))])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"moveFromTop",mode:"out-in",appear:""},{default:e.withCtx(()=>[e.unref(p)&&o.state.isOpenSidebar?(e.openBlock(),e.createBlock(O.default,{key:0,stateSidebar:o.state.isOpenSidebar,onCloseSidebar:r[0]||(r[0]=()=>{o.state.isOpenSidebar=!o.state.isOpenSidebar}),class:e.normalizeClass(["transition-ease-in-out pos-absolute w-70 z-index-0 bg-light",{"pos-l-70-negative":!o.state.isOpenSidebar,"pos-l-0":o.state.isOpenSidebar}])},{default:e.withCtx(()=>[e.createVNode(N.default,{class:"h3 pd-big cols-1"})]),_:1},8,["stateSidebar","class"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(y.default,{onClosePopup:C,isPopupOpen:o.state.isOpenLocationPopup,class:"bg-white pd-semi w-m-33r radius-big"},{default:e.withCtx(()=>[e.createVNode(P.default)]),_:1},8,["isPopupOpen"]),!s.value&&t.MOBILE_APP||!t.MOBILE_APP?(e.openBlock(),e.createElementBlock("section",{key:0,id:"screen",ref_key:"screen",ref:B,onScroll:h,onClick:r[1]||(r[1]=m=>o.state.isOpenSidebar?d=>o.state.isOpenSidebar=!1:d=>{console.log("not succes")}),class:e.normalizeClass(["transition-ease-in-out h-min-100 w-100 bg-white pos-relative o-scroll",{"pos-l-70":o.state.isOpenSidebar,"pos-l-0":!o.state.isOpenSidebar}])},[e.createVNode(V.default),o.state.error.show?(e.openBlock(),e.createBlock(b.default,{key:0,data:o.state.error,class:"z-index-7"},null,8,["data"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(({Component:m,route:d})=>[e.createVNode(e.Transition,{onBeforeEnter:_,name:"scaleIn",mode:"out-in",appear:""},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(m),{ref_key:"page",ref:u,key:d.path}))]),_:2},1024)]),_:1})]),_:1}))],34)):e.createCommentVNode("",!0),t.MOBILE_APP&&e.unref(c).meta.title_hide?(e.openBlock(),e.createBlock(q.default,{key:1,class:"pd-small z-index-2"})):e.createCommentVNode("",!0)])}}};exports.default=E;