first commit

This commit is contained in:
fabio
2026-02-18 21:10:23 +01:00
commit dec68aff39
91 changed files with 823 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.DS_store

9
LICENSE Normal file
View File

@@ -0,0 +1,9 @@
Copyright (C) 2000 Carsten Haitzler and various contributors (see AUTHORS)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies of the Software and its Copyright notices. In addition publicly documented acknowledgment must be given that this software has been used if no source code of this software is made available publicly. This includes acknowledgments in either Copyright notices, Manuals, Publicity and Marketing documents or any documentation provided with any product containing this software. This License does not apply to any software that links to the libraries provided by this software (statically or dynamically), but only to the software provided.
Please see the COPYING.PLAIN for a plain-english explanation of this notice and it's intent.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

37
README.md Normal file
View File

@@ -0,0 +1,37 @@
# Server build & embed helpers
Short instructions to build and embed the SPA into the Go server binary.
- Build for host (mac/linux):
```sh
make build-embed
```
- Build Windows executable (cross-compile) from mac/linux (requires Go installed):
```sh
# run PowerShell script (requires pwsh)
make windows
# or do it manually from the repository root:
cd server
cp -R ../app/dist/spa/. server/static/
GOOS=windows GOARCH=amd64 go build -o server/server_windows.exe main.go
```
After building, run the binary (host OS):
```sh
PORT=8080 ./server/server.bin
```
- Build mac binaries (darwin amd64 + arm64):
```sh
make mac
# or manually:
cd server
GOOS=darwin GOARCH=amd64 go build -o server/server_darwin_amd64 main.go
GOOS=darwin GOARCH=arm64 go build -o server/server_darwin_arm64 main.go
```

View File

@@ -0,0 +1,99 @@
%PDF-1.4
%“Œ‹ž ReportLab Generated PDF document http://www.reportlab.com
1 0 obj
<<
/F1 2 0 R /F2 3 0 R /F3 4 0 R
>>
endobj
2 0 obj
<<
/BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font
>>
endobj
3 0 obj
<<
/BaseFont /Symbol /Name /F2 /Subtype /Type1 /Type /Font
>>
endobj
4 0 obj
<<
/BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding /Name /F3 /Subtype /Type1 /Type /Font
>>
endobj
5 0 obj
<<
/Contents 10 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 9 0 R /Resources <<
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
>> /Rotate 0 /Trans <<
>>
/Type /Page
>>
endobj
6 0 obj
<<
/Contents 11 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 9 0 R /Resources <<
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
>> /Rotate 0 /Trans <<
>>
/Type /Page
>>
endobj
7 0 obj
<<
/PageMode /UseNone /Pages 9 0 R /Type /Catalog
>>
endobj
8 0 obj
<<
/Author (\(anonymous\)) /CreationDate (D:20251229164830+00'00') /Creator (\(unspecified\)) /Keywords () /ModDate (D:20251229164830+00'00') /Producer (ReportLab PDF Library - www.reportlab.com)
/Subject (\(unspecified\)) /Title (\(anonymous\)) /Trapped /False
>>
endobj
9 0 obj
<<
/Count 2 /Kids [ 5 0 R 6 0 R ] /Type /Pages
>>
endobj
10 0 obj
<<
/Filter [ /ASCII85Decode /FlateDecode ] /Length 2025
>>
stream
GatU3gN)"=&:O:SoHWlEJL%CI_\bJ\iZ!tOD3\JJdQf-0Bp@#$c2-b8k9;(#V51Ccfb-*se#0*>?Z;^"+'8IQ@XtKgoPRoQ4kOSe*B4/R/7GeDqgR[2aaj]Wak3"TVA%IpNP=6\]/.rZbN$/IfYmV;YHQ:Ce4Cn2RJPqMmVbGUgp<OoDi?%X^9H[emc!3NqKWAh@.Oh-]p`^!`>aj(:ArNL4Rl,5"@ZTJYW7JVbn<),N1[Zp"2Eh`%D+\ufZiCO2RKa+:[$"8'!\o),.X?X;?e!T4.8\E'N2bG6pi)-&Fa4+7A_(N\`>K-/0Gk*_UuE]5oudBLQi-j'ndkNSf+kF#Ef8t$[CXV],nK"dY"<sd:E%D#^JjlPeZ<k\dlr0+t4^%G91*/Q'1N=JW0Nk:T\o;dTSMMGEKJA*STET#BIrYm/iD*-]tt_$IOdpGpEZ/Q>m3#*\CA)U;-e&+Qah:7DAPL5&=@iHN=_A7M,YM8BgR^D4W/]U$B0e\C4T\K6cE%]_KB.`/9lu=qs/++VtD"joJ1C1`52</GRB_"Y^?cS>tL_PUoRdE[T$TA3e3;%"=X7(jT]OU4e^X,m[Bp<65h\j-J.0J`56u+uB'o+gZYbjtaee/Mbp_6$$1@SC,f)]23#<_NhZPQBf1Q-ltq9KtAU@Hb;?bbok82U0r-Yd3Pe+d&Pqb,$DpoG]=p:3^j)kV\(DH0NVhX":oPse?+m;%O*Ls&Z<Hmkm3_u+lNsIJ-B:'+:&[Td$G9FG<Knp2n(mSB(7Chqa+ii%Pu[Nb5I%4H8i$na+4AZV,Yj7=I*Ds$%ACl(TM'j_i^_8ndO3<?a]tT%"FC`Va[s#2hue!@!l3V'!<\^qZ?EU%25/r4jY8`(M7*3s6ir=s2C=?)Gs)rjb?4f`Wa^3E,=#T+`=Q8l,'K+abV[)<]9eiT_?qL.n"<<KY9B3Vka(h1JLXLJd,J5>qVKo6m8.Q7]CHa3F>iaSD#]'Io8Qg?+/,<iWfp5W>PB";k_S(B3f_AZkU&bKcs*n5QmOhhj#U]K"KYL^/>smA8(O4Q4CRbAuY77@kQ58Q5-+InCiite,RBgDQN+AS5KcZm>MkeWYc_r1h8uedh5WPTTCn&.gXt[M!Gt1[mVDkaX#G;7UV@E8F]rHee79"EifOkjL(=NpZ2LY9J&9c[3jWk._qtTj+@fl8Kh)=_T!bO:</jmP!`Y?.>TljW(NG-ZXhB,8ZDh"/?PcO)O?g:&7*[^lf*[$X,jrq[[nON1hPRt8k]k6aL"G5I(,l&R4793j>jBQD7Atn)Q,<>dXM'7qY*rBi93@*MJ^h=hpR/b-'n)B0FWLG$lKA63nQC<M_,<NnlEN]lk7GjFVn$4`Z_au"7*pH1#HBB_>[4bT7bkVT2gPDK;7p.10"K#,'tq]?q>NO2?_iFjl39S5eq(1FQiQ"mhUG)K65u?8>DPR,5Qti"-t.G)_I,kc:H49A"??SOYQ;u]J9*e3.<'E6kA&T(a*V+mKB)6m<K00+m9+Pg8oNR!nVX])]^1)2M7fg2[3YYf_$`R`K]jE6RtdcjIl.\-*9f\#PnRolYFb.3A&=RW+CkH3:Q%i@^XR$bIdX5'Q8P9[:eq^pdANne):>YU";2TZgt\QiQ-[0ec'`-7V#M2(`$>cL`4O#q`SbpWm.NZ[L(l:C]Ir5Dan;lmN0r;eYX4@'t_LP>YUnQmfT;=p-"6dTi>`B">ZJc+D1Ob`a\$n5@)SnMb<W5rbMdNF]Jp_'Fh=fL$D:QP2)utJq5)@SV<M0=h/>/e1[T&3pLp^i)-;!?V.gBQ*L3,5b@)JRE<aD&QqC%UBcj\lbs46rb@0t("T@%Mar2p0ksm);jmVK[U:l==,YhF#D=p`]N<5+K@T"&Gr;)#"gB8<WlcIuC7;;]X312Ds1Y$a_nJ2Q@I6.&Y&84er[A4`X@o75MdWYgqf])K>H,c4h,@&0RU*nAEj\+\<q3:oSJDH(%sGsa?,N"<D-0%C*piZU)8BXW1fDtF4bHWq%k,,J=]NdWoiZe&lp!<loI0~>endstream
endobj
11 0 obj
<<
/Filter [ /ASCII85Decode /FlateDecode ] /Length 849
>>
stream
Gat=)9lJc?%)(h*n<eB4)EVh#N_.rH"Zi:u_03ph[:tt[/U<ML6[nt^=\[_Taah0_!CnEmoA_&9_2tkAhpVp?Z%gG%"AoTn*26u*_"o*if"F;]-q#C:9W"#iF?5n3"s49PJM)8=)stgSE.t<oQ2"OfX44m&^g*e@AC9+#$coP'2fTh`V'p&e'38g0KCs.bT0([q^-4ehc+;7D&>R@o6+0%FWt@`e#Q.%%qC>tck.kqGGYWsWW'-@ml!k`Ks2#ir;A(,tY`6$n"?Db2kX)CO_<dH5%2j@FUFg&:f_I@Q5u@rHnGO=<2!([86HO@N>\.keZ.`j&h`KSYjJ!srK-W`7ZoLPH``O6(Ke?=4i?Uk5)sIj2bOQF.otams6dZIL$C!QJ#[E9unVTi)/H[fj)Wg&-=JukIVDk^EP0uV"%<O%uP$?FBi%DX<-rX+q-u$kCTL*0a)9SL09'Wu6Fc5&&J>O5h2th#j:KT,aTu<[u(Y@1U2,FSp7F`^V+Dgl]m"MO+aG9:Ab@W/>1`\I=puE;1&(j[g.^[9"4kTDuZ8%)f;$Ee2F*7sM8S3b?KE(:s8+b,P/6,.g_Cq)(\D?Ii\V`ab@(1ur-D,Bs:V:FNY1WNI<`k[)(s;TeWJ.aYjf.?n;`cm#Th'.H2gE]L<ee<W_"U1UoAfesDFCg09e[I#K)NnSd$m8ODuMkL2B#)@H9_7%mk<TH[2Uc!<F)>Ihoo'1%Oh?.TV<Wh=EdZ7GkJK#EXPd/i<?0sG0jpHk=*>S))lkP2kspI!c&Fs2k><g!QMl:.pdGk(N/N+C"'6KMuamHo&'(HZlj(mlP6V0bo'X`RG!2HOl=LTH#fVQ(CbTS=o~>endstream
endobj
xref
0 12
0000000000 65535 f
0000000073 00000 n
0000000124 00000 n
0000000231 00000 n
0000000308 00000 n
0000000420 00000 n
0000000624 00000 n
0000000828 00000 n
0000000896 00000 n
0000001179 00000 n
0000001244 00000 n
0000003361 00000 n
trailer
<<
/ID
[<408ac9e8feadd6a710d7f45edbbb5b30><408ac9e8feadd6a710d7f45edbbb5b30>]
% ReportLab generated PDF document -- digest (http://www.reportlab.com)
/Info 8 0 R
/Root 7 0 R
/Size 12
>>
startxref
4301
%%EOF

View File

@@ -0,0 +1,74 @@
%PDF-1.4
%“Œ‹ž ReportLab Generated PDF document http://www.reportlab.com
1 0 obj
<<
/F1 2 0 R /F2 3 0 R
>>
endobj
2 0 obj
<<
/BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font
>>
endobj
3 0 obj
<<
/BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding /Name /F2 /Subtype /Type1 /Type /Font
>>
endobj
4 0 obj
<<
/Contents 8 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 7 0 R /Resources <<
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
>> /Rotate 0 /Trans <<
>>
/Type /Page
>>
endobj
5 0 obj
<<
/PageMode /UseNone /Pages 7 0 R /Type /Catalog
>>
endobj
6 0 obj
<<
/Author (\(anonymous\)) /CreationDate (D:20251209171836+00'00') /Creator (\(unspecified\)) /Keywords () /ModDate (D:20251209171836+00'00') /Producer (ReportLab PDF Library - www.reportlab.com)
/Subject (\(unspecified\)) /Title (\(anonymous\)) /Trapped /False
>>
endobj
7 0 obj
<<
/Count 1 /Kids [ 4 0 R ] /Type /Pages
>>
endobj
8 0 obj
<<
/Filter [ /ASCII85Decode /FlateDecode ] /Length 619
>>
stream
Gau1+9lHLd&;KZQ'm"IHa(>(d\$TkG8?(T**.:u-QqR[qA/BXOf6>%+EYK2?P-ko-B(sjQba/<bNu5T6"n3ajn%T#3(X``uJ*o[M$bt-3dmQ=UN+.Tj0ot??jqf"VL4C^"r)UJQn\^6\>S(m.jgr-e?pu6oR,_lje"sKI@IW7T(2>[FeIef$0-L2ukr6--^We+nq<T&?]iQF#6fMmBm`m';3Wng.EV`TQX._FtK@Z2dZGaSNh,;qW[;<4D))N`l\4H_[)RjpuS\NhVb\*:gLO=hbE^VPY_.Pn*>b]=]='d#bAlt:N#2uOMgM"ZSKZ0mbi%7*ICAta]V`-D;M(%*,IoB.[4n[ius+ct0)d/kDNZ?5Jni,9%;Ip->Y"QoJ6X(PLo9+1SH!f1i!1k_K`^?tp[0F6<1*]*15bg;VFAA?MlGqjg[>e4u+pj,W-)'8bj,(UdE'9Fj906H-&Y'O$Sbd>6Ijo<JB+j3D@P#m]LOJ3B=3<P5Ob2ZTU!U>$WEFM\"$$B#?-'k<!q'#Z$>6S"BMinm"ug<b\K:>Z7&RK^FitYaMuKX1/P#*(e+QFt\=(rJNb0XE:[PLohRqS38uT99Qc"7S;H_],O/Oc.%g-aC63~>endstream
endobj
xref
0 9
0000000000 65535 f
0000000073 00000 n
0000000114 00000 n
0000000221 00000 n
0000000333 00000 n
0000000536 00000 n
0000000604 00000 n
0000000887 00000 n
0000000946 00000 n
trailer
<<
/ID
[<dc206b45333a375bc1c3f18795c2df17><dc206b45333a375bc1c3f18795c2df17>]
% ReportLab generated PDF document -- digest (http://www.reportlab.com)
/Info 6 0 R
/Root 5 0 R
/Size 9
>>
startxref
1655
%%EOF

View File

@@ -0,0 +1,74 @@
%PDF-1.4
%“Œ‹ž ReportLab Generated PDF document http://www.reportlab.com
1 0 obj
<<
/F1 2 0 R /F2 3 0 R
>>
endobj
2 0 obj
<<
/BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font
>>
endobj
3 0 obj
<<
/BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding /Name /F2 /Subtype /Type1 /Type /Font
>>
endobj
4 0 obj
<<
/Contents 8 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 7 0 R /Resources <<
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
>> /Rotate 0 /Trans <<
>>
/Type /Page
>>
endobj
5 0 obj
<<
/PageMode /UseNone /Pages 7 0 R /Type /Catalog
>>
endobj
6 0 obj
<<
/Author (\(anonymous\)) /CreationDate (D:20251209171836+00'00') /Creator (\(unspecified\)) /Keywords () /ModDate (D:20251209171836+00'00') /Producer (ReportLab PDF Library - www.reportlab.com)
/Subject (\(unspecified\)) /Title (\(anonymous\)) /Trapped /False
>>
endobj
7 0 obj
<<
/Count 1 /Kids [ 4 0 R ] /Type /Pages
>>
endobj
8 0 obj
<<
/Filter [ /ASCII85Decode /FlateDecode ] /Length 619
>>
stream
Gau1+9lHLd&;KZQ'm"IHa(>(d\$TkG8?(T**.:u-QqR[qA/BXOf6>%+EYK2?P-ko-B(sjQba/<bNu5T6"n3ajn%T#3(X``uJ*o[M$bt-3dmQ=UN+.Tj0ot??jqf"VL4C^"r)UJQn\^6\>S(m.jgr-e?pu6oR,_lje"sKI@IW7T(2>[FeIef$0-L2ukr6--^We+nq<T&?]iQF#6fMmBm`m';3Wng.EV`TQX._FtK@Z2dZGaSNh,;qW[;<4D))N`l\4H_[)RjpuS\NhVb\*:gLO=hbE^VPY_.Pn*>b]=]='d#bAlt:N#2uOMgM"ZSKZ0mbi%7*ICAta]V`-D;M(%*,IoB.[4n[ius+ct0)d/kDNZ?5Jni,9%;Ip->Y"QoJ6X(PLo9+1SH!f1i!1k_K`^?tp[0F6<1*]*15bg;VFAA?MlGqjg[>e4u+pj,W-)'8bj,(UdE'9Fj906H-&Y'O$Sbd>6Ijo<JB+j3D@P#m]LOJ3B=3<P5Ob2ZTU!U>$WEFM\"$$B#?-'k<!q'#Z$>6S"BMinm"ug<b\K:>Z7&RK^FitYaMuKX1/P#*(e+QFt\=(rJNb0XE:[PLohRqS38uT99Qc"7S;H_],O/Oc.%g-aC63~>endstream
endobj
xref
0 9
0000000000 65535 f
0000000073 00000 n
0000000114 00000 n
0000000221 00000 n
0000000333 00000 n
0000000536 00000 n
0000000604 00000 n
0000000887 00000 n
0000000946 00000 n
trailer
<<
/ID
[<dc206b45333a375bc1c3f18795c2df17><dc206b45333a375bc1c3f18795c2df17>]
% ReportLab generated PDF document -- digest (http://www.reportlab.com)
/Info 6 0 R
/Root 5 0 R
/Size 9
>>
startxref
1655
%%EOF

View File

@@ -0,0 +1,74 @@
%PDF-1.4
%“Œ‹ž ReportLab Generated PDF document http://www.reportlab.com
1 0 obj
<<
/F1 2 0 R /F2 3 0 R
>>
endobj
2 0 obj
<<
/BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font
>>
endobj
3 0 obj
<<
/BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding /Name /F2 /Subtype /Type1 /Type /Font
>>
endobj
4 0 obj
<<
/Contents 8 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 7 0 R /Resources <<
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
>> /Rotate 0 /Trans <<
>>
/Type /Page
>>
endobj
5 0 obj
<<
/PageMode /UseNone /Pages 7 0 R /Type /Catalog
>>
endobj
6 0 obj
<<
/Author (\(anonymous\)) /CreationDate (D:20251209171836+00'00') /Creator (\(unspecified\)) /Keywords () /ModDate (D:20251209171836+00'00') /Producer (ReportLab PDF Library - www.reportlab.com)
/Subject (\(unspecified\)) /Title (\(anonymous\)) /Trapped /False
>>
endobj
7 0 obj
<<
/Count 1 /Kids [ 4 0 R ] /Type /Pages
>>
endobj
8 0 obj
<<
/Filter [ /ASCII85Decode /FlateDecode ] /Length 886
>>
stream
Gau1-bAQ&g&4Q?mMHMu/lABm<]-^70"DJp]MJg)#-/)`WOUagVW5$%kb#XoS<b`A$!&$IaeJs`nB*^Kl&G)BV!9YeY\0=1C868(SR1JO6>c*^_$/)G>@YdQ1MrQ)&2_a0WJ6Gb<?.-j*+f$E!\No.DbB4aM2jsnA&7[iI@<s(s-/h-jHEGitnJ4#V_8e-?,%pBd*gBn[>*ed`ddN:3!tmT"_"YFLb>#g[gdg7c.%V#(hPk#5O8-@]g`]t_Itbc7+.-4Wg`FLPO$T4`WYO(VXSK23<Q1fmY`c#^RQn-,Ej'$f7a]%g_Oq8W3g/*9FIF2I$PGl]55du7$"'VQa#\,>)(o(%Gf83#/",!no,kB$OoZAaVF<dFY]h/jDbO8+I3>WG_Hofrduk$^!==+0Hnm%2V*:!^CPfdHSF')XElK9C9A9j:-=_Y<6Yin.o38Ggqs->VJlTL3WgW_6MaX9oOY$0V8AW$iEh79(6Ba8",-q3JE^mGJkJ&SoCq3G47:iW0".)TA8Yqg,dQY/`):L?Womq)0c8'.^OO8[GL$(N_T.,q;#)h`jr;Q-^'J@hW;u"@$/q5d[1QBSY`CV_14JoaCl3$#*(4OQ8>-[I\ijl3pV+n&BNIgf_Kk#FfXZd:LC%9J_p7pK7JjM;nQjpUjRURp`0W+Hol9h&RdrfqjPM!%]D`.dFRc1,(=!V'-XX1&.hXZ,#cT<uO"O>a*kBHNnDfUh3Y4kSLTBFPQ\laOOJHP":?P7fMVCUBca6i[i]8mZp&b]VDU_S'VN#$NWMr&4=UG8=d<^6-fAI?Ib`%_]<fP6,rl`JV0__I_,<^.)VF&U`4;H]$g2!*Ufj,[nb[eau#?T$[hKKpYq@-7T)\MQeZ3Bq=g0_l0iekLb~>endstream
endobj
xref
0 9
0000000000 65535 f
0000000073 00000 n
0000000114 00000 n
0000000221 00000 n
0000000333 00000 n
0000000536 00000 n
0000000604 00000 n
0000000887 00000 n
0000000946 00000 n
trailer
<<
/ID
[<8691e2956541560fed096e42ad1ac7e8><8691e2956541560fed096e42ad1ac7e8>]
% ReportLab generated PDF document -- digest (http://www.reportlab.com)
/Info 6 0 R
/Root 5 0 R
/Size 9
>>
startxref
1922
%%EOF

19
go.mod Normal file
View File

@@ -0,0 +1,19 @@
module testServer
go 1.25.4
require github.com/gofiber/fiber/v2 v2.52.5
require (
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.51.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
golang.org/x/sys v0.15.0 // indirect
)

27
go.sum Normal file
View File

@@ -0,0 +1,27 @@
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/gofiber/fiber/v2 v2.52.5 h1:tWoP1MJQjGEe4GB5TUGOi7P2E0ZMMRx5ZTG4rT+yGMo=
github.com/gofiber/fiber/v2 v2.52.5/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ=
github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU=
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM=
github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.51.0 h1:8b30A5JlZ6C7AS81RsWjYMQmrZG6feChmgAolCl1SqA=
github.com/valyala/fasthttp v1.51.0/go.mod h1:oI2XroL+lI7vdXyYoQk03bXBThfFl2cVdIA3Xl7cH8g=
github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=

11
info.md Normal file
View File

@@ -0,0 +1,11 @@
# 1) build frontend
cd app
pnpm run build
# 2) copia la SPA nella cartella server/static
cd ..
rm -rf server/static/* && cp -R app/dist/spa/. server/static/
# 3) cross-compile per Windows (amd64)
cd server
GOOS=windows GOARCH=amd64 go build -o server_windows.exe main.go

334
main.go Normal file
View File

@@ -0,0 +1,334 @@
package main
import (
"fmt"
"log"
"os"
"path/filepath"
"regexp"
"strings"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors"
"github.com/gofiber/fiber/v2/middleware/logger"
"github.com/gofiber/fiber/v2/middleware/recover"
)
var safePathTokenRe = regexp.MustCompile(`[^a-zA-Z0-9._-]+`)
func safePathToken(s string) string {
s = strings.TrimSpace(s)
s = strings.ReplaceAll(s, string(filepath.Separator), "_")
// In case the client sent URL-like separators.
s = strings.ReplaceAll(s, "/", "_")
s = strings.ReplaceAll(s, "\\", "_")
s = safePathTokenRe.ReplaceAllString(s, "_")
s = strings.Trim(s, "._-")
if s == "" || s == "." {
return ""
}
if len(s) > 128 {
s = s[:128]
}
return s
}
func safeFilename(name string) string {
name = strings.TrimSpace(name)
name = filepath.Base(name)
if name == "" || name == "." || name == ".." {
return ""
}
// Disallow any remaining separators just in case.
name = strings.ReplaceAll(name, string(filepath.Separator), "_")
name = strings.ReplaceAll(name, "/", "_")
name = strings.ReplaceAll(name, "\\", "_")
if name == "" || name == "." || name == ".." {
return ""
}
if len(name) > 255 {
name = name[:255]
}
return name
}
func main() {
port := os.Getenv("PORT")
if port == "" {
port = "8082"
}
app := fiber.New(fiber.Config{
DisableStartupMessage: true,
})
app.Use(recover.New())
app.Use(logger.New())
app.Use(cors.New(cors.Config{
AllowOrigins: "*",
AllowHeaders: "Origin, Content-Type, Accept, Authorization",
AllowMethods: "GET,POST,PUT,PATCH,DELETE,OPTIONS",
}))
// Ensure preflight requests are handled.
app.Options("/*", func(c *fiber.Ctx) error {
return c.SendStatus(fiber.StatusNoContent)
})
app.Get("/health", func(c *fiber.Ctx) error {
return c.Status(fiber.StatusOK).SendString("ok")
})
// Serve built SPA from disk (no embedding).
// Expected layout:
// server/static/index.html
// server/static/assets/...
app.Static("/", "./static")
app.Post("/upload", func(c *fiber.Ctx) error {
form, err := c.MultipartForm()
if err != nil {
return fiber.NewError(fiber.StatusBadRequest, "invalid multipart form")
}
user := safePathToken(c.FormValue("user"))
session := safePathToken(c.FormValue("session"))
prop := safePathToken(c.FormValue("prop"))
if user == "" {
return fiber.NewError(fiber.StatusBadRequest, "missing form field: user")
}
if session == "" {
return fiber.NewError(fiber.StatusBadRequest, "missing form field: session")
}
files := form.File["documents"]
if len(files) == 0 {
return fiber.NewError(fiber.StatusBadRequest, "missing files: documents")
}
dir := filepath.Join("docs", user, session)
if prop != "" {
dir = filepath.Join(dir, prop)
}
if err := os.MkdirAll(dir, 0o755); err != nil {
return fiber.NewError(fiber.StatusInternalServerError, "cannot create upload directory")
}
uploaded := make([]string, 0, len(files))
for _, file := range files {
name := safeFilename(file.Filename)
if name == "" {
return fiber.NewError(fiber.StatusBadRequest, "invalid filename")
}
dst := filepath.Join(dir, name)
if err := c.SaveFile(file, dst); err != nil {
return fiber.NewError(fiber.StatusInternalServerError, fmt.Sprintf("cannot save file %s", name))
}
uploaded = append(uploaded, name)
}
return c.JSON(fiber.Map{
"ok": true,
"files": uploaded,
})
})
app.Post("/loadattachments", func(c *fiber.Ctx) error {
// Accept either JSON body { id, session } or form fields.
var body struct {
ID string `json:"id"`
Session string `json:"session"`
Prop string `json:"prop"`
}
_ = c.BodyParser(&body)
id := safePathToken(body.ID)
if id == "" {
id = safePathToken(c.FormValue("id"))
}
session := safePathToken(body.Session)
if session == "" {
session = safePathToken(c.FormValue("session"))
}
prop := safePathToken(body.Prop)
if prop == "" {
prop = safePathToken(c.FormValue("prop"))
}
if id == "" {
return fiber.NewError(fiber.StatusBadRequest, "missing field: id")
}
if session == "" {
return fiber.NewError(fiber.StatusBadRequest, "missing field: session")
}
dir := filepath.Join("docs", id, session)
if prop != "" {
dir = filepath.Join(dir, prop)
}
entries, err := os.ReadDir(dir)
if err != nil {
if os.IsNotExist(err) {
return c.JSON([]string{})
}
return fiber.NewError(fiber.StatusInternalServerError, "cannot read attachments directory")
}
files := make([]string, 0, len(entries))
for _, e := range entries {
if e.IsDir() {
continue
}
name := e.Name()
if name == "" || name == "." {
continue
}
files = append(files, name)
}
return c.JSON(files)
})
app.Post("/loadattachmentslist", func(c *fiber.Ctx) error {
// Returns a JSON object keyed by the actual subfolder name.
// Example: { "salaryCertificate": ["file1.pdf"], "avsCertificate": ["file2.pdf"] }
// It scans docs/<id>/<session>/ and for each subdirectory lists its files.
var body struct {
ID string `json:"id"`
Session string `json:"session"`
}
_ = c.BodyParser(&body)
id := safePathToken(body.ID)
if id == "" {
id = safePathToken(c.FormValue("id"))
}
session := safePathToken(body.Session)
if session == "" {
session = safePathToken(c.FormValue("session"))
}
if id == "" {
return fiber.NewError(fiber.StatusBadRequest, "missing field: id")
}
if session == "" {
return fiber.NewError(fiber.StatusBadRequest, "missing field: session")
}
baseDir := filepath.Join("docs", id, session)
entries, err := os.ReadDir(baseDir)
if err != nil {
if os.IsNotExist(err) {
return c.JSON(fiber.Map{})
}
return fiber.NewError(fiber.StatusInternalServerError, "cannot read session directory")
}
result := make(map[string][]string)
for _, entry := range entries {
if !entry.IsDir() {
continue
}
folderName := entry.Name()
if safePathToken(folderName) == "" {
continue
}
propDir := filepath.Join(baseDir, folderName)
propEntries, err := os.ReadDir(propDir)
if err != nil {
// Ignore unreadable prop folder.
continue
}
files := make([]string, 0, len(propEntries))
for _, pe := range propEntries {
if pe.IsDir() {
continue
}
name := pe.Name()
if name == "" || name == "." {
continue
}
files = append(files, name)
}
result[folderName] = files
}
return c.JSON(result)
})
app.Post("/deleteattachment", func(c *fiber.Ctx) error {
// Accept either JSON body { id, session, filename } or form fields.
var body struct {
ID string `json:"id"`
Session string `json:"session"`
Prop string `json:"prop"`
Filename string `json:"filename"`
}
_ = c.BodyParser(&body)
id := safePathToken(body.ID)
if id == "" {
id = safePathToken(c.FormValue("id"))
}
session := safePathToken(body.Session)
if session == "" {
session = safePathToken(c.FormValue("session"))
}
prop := safePathToken(body.Prop)
if prop == "" {
prop = safePathToken(c.FormValue("prop"))
}
filename := safeFilename(body.Filename)
if filename == "" {
filename = safeFilename(c.FormValue("filename"))
}
if id == "" {
return fiber.NewError(fiber.StatusBadRequest, "missing field: id")
}
if session == "" {
return fiber.NewError(fiber.StatusBadRequest, "missing field: session")
}
if filename == "" {
return fiber.NewError(fiber.StatusBadRequest, "missing field: filename")
}
path := filepath.Join("docs", id, session)
if prop != "" {
path = filepath.Join(path, prop)
}
path = filepath.Join(path, filename)
err := os.Remove(path)
if err != nil {
if os.IsNotExist(err) {
return c.JSON(fiber.Map{
"ok": true,
"deleted": false,
"file": filename,
})
}
return fiber.NewError(fiber.StatusInternalServerError, "cannot delete attachment")
}
return c.JSON(fiber.Map{
"ok": true,
"deleted": true,
"file": filename,
})
})
// History API fallback for SPA routes.
app.Use(func(c *fiber.Ctx) error {
return c.SendFile("./static/index.html")
})
addr := ":" + port
log.Printf("Starting Fiber server on %s", addr)
if err := app.Listen(addr); err != nil {
log.Fatalf("server failed: %v", err)
}
}

BIN
server_windows.exe Executable file

Binary file not shown.

1
static/.gitkeep Normal file
View File

@@ -0,0 +1 @@
# keep this directory for embedding SPA assets

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
.contained-card[data-v-502fffb1]{min-width:420px;max-width:720px}

View File

@@ -0,0 +1 @@
.full-width[data-v-9e040cdc]{width:100%}.contained-card[data-v-9e040cdc]{min-width:480px;max-width:720px}.contained-card .q-card-section[data-v-9e040cdc]{padding:16px}.contained-card .q-card-actions[data-v-9e040cdc]{padding:12px 16px}.child-modal[data-v-9e040cdc]{min-width:480px}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{Q as o}from"./QBtn-Bl8V3g1s.js";import{I as s,R as l,O as t,N as r,M as n}from"./index-BFHpqQMc.js";import"./use-router-link-niyq3CDa.js";const a={class:"fullscreen bg-blue text-white text-center q-pa-md flex flex-center"},u=s({__name:"ErrorNotFound",setup(i){return(c,e)=>(n(),l("div",a,[t("div",null,[e[0]||(e[0]=t("div",{style:{"font-size":"30vh"}},"404",-1)),e[1]||(e[1]=t("div",{class:"text-h2",style:{opacity:"0.4"}},"Oops. Nothing here...",-1)),r(o,{class:"q-mt-xl",color:"white","text-color":"blue",unelevated:"",to:"/",label:"Go Home","no-caps":""})])]))}});export{u as default};

View File

@@ -0,0 +1 @@
.q-stepper[data-v-26697fc9]{max-width:900px;margin:0 auto}.full-height[data-v-26697fc9]{height:100%}.vertical-nav .q-item[data-v-26697fc9]{border-radius:4px;margin-bottom:4px;max-width:350px}.vertical-nav .q-item--active[data-v-26697fc9]{background-color:var(--q-color-primary)!important}.vertical-nav .q-item--active .text-body1[data-v-26697fc9],.vertical-nav .q-item--active .q-item__label[data-v-26697fc9]{font-weight:700!important}[data-v-1cafec6b] .no-shadow .q-stepper{box-shadow:none!important;height:100%!important;width:100%!important}[data-v-1cafec6b] .no-shadow .q-stepper .q-step__content,[data-v-1cafec6b] .no-shadow .q-stepper .q-card{height:100%!important}

View File

@@ -0,0 +1,2 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/WelcomeStep-Bmtt6Knz.js","assets/QBtn-Bl8V3g1s.js","assets/index-BFHpqQMc.js","assets/index-BQveqNql.css","assets/use-router-link-niyq3CDa.js","assets/QSeparator-D1JYPgu2.js","assets/QList-CPm2VhlR.js","assets/vue-i18n.runtime-CGMLV8bE.js","assets/WelcomeStep-95IM2IEv.css","assets/TaxpayerStep-De3KELaV.js","assets/AddressModal-33esE-yw.js","assets/LocalStorage-Bg7wwOV9.js","assets/AddressModal-B9qIzCZw.css","assets/QFile-DVWif_Vn.js","assets/taxstore-B0e8PHMB.js","assets/TaxpayerStep-CCM9SKxW.css","assets/MaritalStep-BZz2uhjH.js","assets/MaritalStep-3A02lP7t.css","assets/ChildrenStep-DIWgJte8.js","assets/children-Dx8AhorD.js","assets/ChildrenStep-BBVX4YNf.css"])))=>i.map(i=>d[i]);
import{c as S,g as w,j as c,a as _,h as k,f as P,k as E,F as $,I as B,r as A,V as h,R as m,M as s,O as C,N as p,K as u,S as R,T as z,J as q,Q as b,U as Q,W as O,X as F,_ as g}from"./index-BFHpqQMc.js";import{h as I}from"./use-router-link-niyq3CDa.js";import{u as V,a as L,b as N,c as T,Q as j}from"./QList-CPm2VhlR.js";const H=S({name:"QPage",props:{padding:Boolean,styleFn:Function},setup(r,{slots:i}){const{proxy:{$q:o}}=w(),e=P(E,c);if(e===c)return console.error("QPage needs to be a deep child of QLayout"),c;if(P($,c)===c)return console.error("QPage needs to be child of QPageContainer"),c;const f=_(()=>{const n=(e.header.space===!0?e.header.size:0)+(e.footer.space===!0?e.footer.size:0);if(typeof r.styleFn=="function"){const y=e.isContainer.value===!0?e.containerHeight.value:o.screen.height;return r.styleFn(n,y)}return{minHeight:e.isContainer.value===!0?e.containerHeight.value-n+"px":o.screen.height===0?n!==0?`calc(100vh - ${n}px)`:"100vh":o.screen.height-n+"px"}}),v=_(()=>`q-page${r.padding===!0?" q-layout-padding":""}`);return()=>k("main",{class:v.value,style:f.value},I(i.default))}}),K=S({name:"QCardSection",props:{tag:{type:String,default:"div"},horizontal:Boolean},setup(r,{slots:i}){const o=_(()=>`q-card__section q-card__section--${r.horizontal===!0?"horiz row no-wrap":"vert"}`);return()=>k(r.tag,{class:o.value},I(i.default))}}),M=S({name:"QCard",props:{...V,tag:{type:String,default:"div"},square:Boolean,flat:Boolean,bordered:Boolean},setup(r,{slots:i}){const{proxy:{$q:o}}=w(),e=L(r,o),a=_(()=>"q-card"+(e.value===!0?" q-card--dark q-dark":"")+(r.bordered===!0?" q-card--bordered":"")+(r.square===!0?" q-card--square no-border-radius":"")+(r.flat===!0?" q-card--flat no-shadow":""));return()=>k(r.tag,{class:a.value},I(i.default))}}),J={class:"row full-height"},U={class:"col-3 q-pa-sm bg-grey-1"},W={class:"text-body1"},X={class:"col q-pa-md full-height"},G={key:0,class:"text-h6"},Y={key:2,class:"q-mt-md"},Z=B({__name:"StepsStepper",setup(r){const i=[{id:"welcome",title:"Benvenuto",order:0},{id:"taxpayer",title:"Dati contribuente e dichiarazione precedente",order:1},{id:"marital",title:"Stato civile",order:2},{id:"children",title:"Figli",order:3},{id:"income",title:"Redditi",order:4},{id:"professionalExpenses",title:"Spese professionali",order:5},{id:"sideIncome",title:"Reddito accessorio",order:6},{id:"annuities",title:"Rendite",order:7},{id:"insurance",title:"Spese assicurative e mediche",order:8},{id:"pillar3",title:"Polizze 3A / 3B",order:9},{id:"bankAccounts",title:"Conti bancari",order:10},{id:"otherAssets",title:"Altri beni / averi",order:11},{id:"debts",title:"Debiti / ipoteche",order:12},{id:"properties",title:"Immobili",order:13},{id:"foreign",title:"Redditi o averi allestero",order:14}],o=Math.max(...i.map(t=>t.order)),e=new Array(o+1).fill(void 0).map(()=>({}));i.forEach(t=>{e[t.order]={id:t.id,title:t.title,order:t.order}});const a=A(0),f=_(()=>{const t=e[a.value]?.id;return t==="welcome"?h(()=>g(()=>import("./WelcomeStep-Bmtt6Knz.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))):t==="taxpayer"?h(()=>g(()=>import("./TaxpayerStep-De3KELaV.js"),__vite__mapDeps([9,1,2,3,4,5,6,10,11,7,12,13,14,15]))):t==="marital"?h(()=>g(()=>import("./MaritalStep-BZz2uhjH.js"),__vite__mapDeps([16,1,2,3,4,5,6,10,11,7,12,14,17]))):t==="children"?h(()=>g(()=>import("./ChildrenStep-DIWgJte8.js"),__vite__mapDeps([18,1,2,3,4,5,6,10,11,7,12,13,19,20]))):null}),v=_(()=>e[a.value]);function n(t){if(typeof t=="string"){const l=e.findIndex(d=>d.id===t);if(l!==-1){a.value=l;return}}a.value<e.length-1&&a.value++}function y(t){if(typeof t=="string"){const l=e.findIndex(d=>d.id===t);if(l!==-1){a.value=l;return}}a.value>0&&a.value--}return(t,l)=>(s(),m("div",J,[C("div",U,[p(j,{dense:"",bordered:"",class:"vertical-nav"},{default:u(()=>[(s(!0),m(R,null,z(Q(e),(d,x)=>(s(),q(N,{key:d.id,clickable:"",onClick:ae=>a.value=x,active:a.value===x},{default:u(()=>[p(T,null,{default:u(()=>[C("div",W,b(x+1)+". "+b(d.title),1)]),_:2},1024)]),_:2},1032,["onClick","active"]))),128))]),_:1})]),C("div",X,[p(M,{flat:"",class:"q-pa-md full-height"},{default:u(()=>[p(K,null,{default:u(()=>[f.value?O("",!0):(s(),m("div",G,b(Q(e)[a.value]?.title),1)),f.value&&v.value?(s(),q(F(f.value),{key:1,step:v.value,onNext:n,onPrev:y},null,40,["step"])):(s(),m("div",Y))]),_:1})]),_:1})])]))}}),D=(r,i)=>{const o=r.__vccOpts||r;for(const[e,a]of i)o[e]=a;return o},ee=D(Z,[["__scopeId","data-v-26697fc9"]]),te=B({__name:"IndexPage",setup(r){return(i,o)=>(s(),q(H,{class:"row full-width justify-center full-height"},{default:u(()=>[p(ee,{class:"no-shadow full-height full-width"})]),_:1}))}}),re=D(te,[["__scopeId","data-v-1cafec6b"]]),se=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"}));export{se as I,K as Q,D as _,M as a};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
.q-card[data-v-337a0a7c]{width:100%;margin:0}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{c as v,a,h as c,g as b,r as q,Y as S,A as I}from"./index-BFHpqQMc.js";import{h as k,u as K,d as R,a as $}from"./use-router-link-niyq3CDa.js";const F=v({name:"QItemSection",props:{avatar:Boolean,thumbnail:Boolean,side:Boolean,top:Boolean,noWrap:Boolean},setup(e,{slots:n}){const l=a(()=>`q-item__section column q-item__section--${e.avatar===!0||e.side===!0||e.thumbnail===!0?"side":"main"}`+(e.top===!0?" q-item__section--top justify-start":" justify-center")+(e.avatar===!0?" q-item__section--avatar":"")+(e.thumbnail===!0?" q-item__section--thumbnail":"")+(e.noWrap===!0?" q-item__section--nowrap":""));return()=>c("div",{class:l.value},k(n.default))}}),g={dark:{type:Boolean,default:null}};function y(e,n){return a(()=>e.dark===null?n.dark.isActive:e.dark)}const P=v({name:"QItem",props:{...g,...K,tag:{type:String,default:"div"},active:{type:Boolean,default:null},clickable:Boolean,dense:Boolean,insetLevel:Number,tabindex:[String,Number],focused:Boolean,manualFocus:Boolean},emits:["click","keyup"],setup(e,{slots:n,emit:l}){const{proxy:{$q:i}}=b(),d=y(e,i),{hasLink:s,linkAttrs:h,linkClass:B,linkTag:_,navigateOnClick:C}=R(),o=q(null),r=q(null),m=a(()=>e.clickable===!0||s.value===!0||e.tag==="label"),u=a(()=>e.disable!==!0&&m.value===!0),x=a(()=>"q-item q-item-type row no-wrap"+(e.dense===!0?" q-item--dense":"")+(d.value===!0?" q-item--dark":"")+(s.value===!0&&e.active===null?B.value:e.active===!0?` q-item--active${e.activeClass!==void 0?` ${e.activeClass}`:""}`:"")+(e.disable===!0?" disabled":"")+(u.value===!0?" q-item--clickable q-link cursor-pointer "+(e.manualFocus===!0?"q-manual-focusable":"q-focusable q-hoverable")+(e.focused===!0?" q-manual-focusable--focused":""):"")),L=a(()=>e.insetLevel===void 0?null:{["padding"+(i.lang.rtl===!0?"Right":"Left")]:16+e.insetLevel*56+"px"});function E(t){u.value===!0&&(r.value!==null&&t.qAvoidFocus!==!0&&(t.qKeyEvent!==!0&&document.activeElement===o.value?r.value.focus():document.activeElement===r.value&&o.value.focus()),C(t))}function A(t){if(u.value===!0&&S(t,[13,32])===!0){I(t),t.qKeyEvent=!0;const f=new MouseEvent("click",t);f.qKeyEvent=!0,o.value.dispatchEvent(f)}l("keyup",t)}function Q(){const t=$(n.default,[]);return u.value===!0&&t.unshift(c("div",{class:"q-focus-helper",tabindex:-1,ref:r})),t}return()=>{const t={ref:o,class:x.value,style:L.value,role:"listitem",onClick:E,onKeyup:A};return u.value===!0?(t.tabindex=e.tabindex||"0",Object.assign(t,h.value)):m.value===!0&&(t["aria-disabled"]="true"),c(_.value,t,Q())}}}),w=["ul","ol"],N=v({name:"QList",props:{...g,bordered:Boolean,dense:Boolean,separator:Boolean,padding:Boolean,tag:{type:String,default:"div"}},setup(e,{slots:n}){const l=b(),i=y(e,l.proxy.$q),d=a(()=>w.includes(e.tag)?null:"list"),s=a(()=>"q-list"+(e.bordered===!0?" q-list--bordered":"")+(e.dense===!0?" q-list--dense":"")+(e.separator===!0?" q-list--separator":"")+(i.value===!0?" q-list--dark":"")+(e.padding===!0?" q-list--padding":""));return()=>c(e.tag,{class:s.value,role:d.value},k(n.default))}});export{N as Q,y as a,P as b,F as c,g as u};

View File

@@ -0,0 +1 @@
import{u as d,a as g}from"./QList-CPm2VhlR.js";import{c as $,g as h,a as t,h as f}from"./index-BFHpqQMc.js";const x={true:"inset",item:"item-inset","item-thumbnail":"item-thumbnail-inset"},i={xs:2,sm:4,md:8,lg:16,xl:24},k=$({name:"QSeparator",props:{...d,spaced:[Boolean,String],inset:[Boolean,String],vertical:Boolean,color:String,size:String},setup(e){const o=h(),c=g(e,o.proxy.$q),s=t(()=>e.vertical===!0?"vertical":"horizontal"),n=t(()=>` q-separator--${s.value}`),l=t(()=>e.inset!==!1?`${n.value}-${x[e.inset]}`:""),u=t(()=>`q-separator${n.value}${l.value}`+(e.color!==void 0?` bg-${e.color}`:"")+(c.value===!0?" q-separator--dark":"")),m=t(()=>{const a={};if(e.size!==void 0&&(a[e.vertical===!0?"width":"height"]=e.size),e.spaced!==!1){const v=e.spaced===!0?`${i.md}px`:e.spaced in i?`${i[e.spaced]}px`:e.spaced,r=e.vertical===!0?["Left","Right"]:["Top","Bottom"];a[`margin${r[0]}`]=a[`margin${r[1]}`]=v}return a});return()=>f("hr",{class:u.value,style:m.value,"aria-orientation":s.value})}});export{k as Q};

View File

@@ -0,0 +1 @@
.q-card[data-v-00648f3a]{width:100%;margin:0}

View File

@@ -0,0 +1 @@
import{Q as _}from"./QBtn-Bl8V3g1s.js";import{Q as O}from"./QSeparator-D1JYPgu2.js";import{Q as j,a as F,b as x,c as I,A as E}from"./AddressModal-33esE-yw.js";import{Q as G}from"./QFile-DVWif_Vn.js";import{Q as J,a as K,_ as L}from"./IndexPage-CTPnu3LT.js";import{u as X}from"./taxstore-B0e8PHMB.js";import{I as H,G as W,r as N,a as d,o as Y,e as Z,J as $,M as u,K as c,N as r,O as i,Q as m,U as o,R as y,P as ee}from"./index-BFHpqQMc.js";import{u as ae}from"./vue-i18n.runtime-CGMLV8bE.js";import"./use-router-link-niyq3CDa.js";import"./QList-CPm2VhlR.js";import"./LocalStorage-Bg7wwOV9.js";const te={class:"row items-center"},se={class:"col"},re={class:"text-h5"},le={class:"col-auto"},oe={key:0,class:"q-mt-sm"},ie={key:1},de={class:"row items-center q-gutter-sm q-mb-sm"},ne={class:"col-auto"},pe={class:"col"},ue={class:"text-caption"},ce={class:"q-pa-sm bg-grey-2 q-mb-sm"},me={key:0,class:"text-negative"},ve={key:1},fe=H({__name:"TaxpayerStep",props:{step:{}},emits:["next","prev"],setup(U,{emit:B}){const q=U,D=B,h=q.step,n=X(),e=W({}),{t:l}=ae(),b=N(null),p=N(!1),g=N(null),A=d(()=>[e.address||"",e.zip||"",e.city||""].join(" ")),P=(s="Required")=>{const a=l("validation.required");return a&&a!=="validation.required"?a:s},v=s=>a=>{const t=s||P();return a==null?t:typeof a=="string"?a.trim()!==""||t:Array.isArray(a)?a.length>0||t:!0},f=d(()=>!!e.prevPreparedByUs),Q=d(()=>f.value?[v()]:[]),k=d(()=>f.value?[]:[v()]),T=d(()=>f.value?[]:[v()]),z=d(()=>f.value?[]:[v()]);Y(async()=>{const s=n.getTaxpayer()||{};Object.assign(e,s),await Z(),b.value?.resetValidation?.()});const V={prevPreparedByUs:!1,prevDeclaration:null,firstName:"",lastName:"",birthDate:"",address:"",zip:"",city:""};Object.keys(V).forEach(s=>{const a=s;e[a]===void 0&&(e[a]=V[a])});async function R(){try{if(await(b.value?.validate?.()??!0)===!1)return}catch{return}e.prevPreparedByUs?n.setTaxpayer({prevPreparedByUs:!0,prevDeclaration:e.prevDeclaration,firstName:"",lastName:"",birthDate:"",address:"",zip:"",city:""}):n.setTaxpayer({prevPreparedByUs:!1,prevDeclaration:e.prevDeclaration,firstName:e.firstName,lastName:e.lastName,birthDate:e.birthDate,address:e.address,zip:e.zip,city:e.city}),D("next",h.next)}function w(){e.prevPreparedByUs?n.setTaxpayer({prevPreparedByUs:!0,prevDeclaration:e.prevDeclaration,firstName:"",lastName:"",birthDate:"",address:"",zip:"",city:""}):n.setTaxpayer({prevPreparedByUs:!1,prevDeclaration:e.prevDeclaration,firstName:e.firstName,lastName:e.lastName,birthDate:e.birthDate,address:e.address,zip:e.zip,city:e.city}),D("prev",h.prev)}function C(){g.value={street:e.address||"",zip:e.zip||"",city:e.city||"",country:null,foreign:!0},p.value=!0}function S(){p.value=!1}function M(s){e.address=s.street||"",e.zip=s.zip||"",e.city=s.city||"",p.value=!1}return(s,a)=>(u(),$(K,{flat:"",class:"full-width q-pa-none"},{default:c(()=>[r(J,{class:"full-width"},{default:c(()=>[i("div",te,[i("div",se,[i("div",re,m(o(l)("TAX")),1)]),i("div",le,[r(_,{flat:"",color:"secondary",label:o(l)("button.prev"),onClick:w,class:"q-mr-sm"},null,8,["label"]),r(_,{color:"primary",label:o(l)("button.next"),onClick:R},null,8,["label"])])]),r(O,{class:"q-my-sm"}),r(j,{ref_key:"formRef",ref:b,class:"q-gutter-md q-mt-md"},{default:c(()=>[r(F,{modelValue:e.prevPreparedByUs,"onUpdate:modelValue":a[0]||(a[0]=t=>e.prevPreparedByUs=t),label:o(l)("taxpayer.prevPreparedByUs")},null,8,["modelValue","label"]),e.prevPreparedByUs?(u(),y("div",oe,[r(G,{modelValue:e.prevDeclaration,"onUpdate:modelValue":a[1]||(a[1]=t=>e.prevDeclaration=t),label:o(l)("taxpayer.prevDeclaration"),multiple:"","use-chips":"",accept:"application/pdf,image/*","hide-upload-btn":"",rules:Q.value},null,8,["modelValue","label","rules"])])):(u(),y("div",ie,[r(x,{modelValue:e.firstName,"onUpdate:modelValue":a[2]||(a[2]=t=>e.firstName=t),label:o(l)("taxpayer.firstName"),rules:k.value},null,8,["modelValue","label","rules"]),r(x,{modelValue:e.lastName,"onUpdate:modelValue":a[3]||(a[3]=t=>e.lastName=t),label:o(l)("taxpayer.lastName"),rules:T.value},null,8,["modelValue","label","rules"]),r(x,{modelValue:e.birthDate,"onUpdate:modelValue":a[4]||(a[4]=t=>e.birthDate=t),type:"date",label:o(l)("taxpayer.birthDate"),rules:z.value},null,8,["modelValue","label","rules"]),i("div",de,[i("div",ne,[r(_,{dense:"",flat:"",round:"",icon:"edit",onClick:C},{default:c(()=>[r(I,{class:"bg-primary text-white"},{default:c(()=>[ee(m(o(l)("children.editAddress")),1)]),_:1})]),_:1})]),i("div",pe,[i("div",ue,m(o(l)("taxpayer.address")),1)])]),i("div",ce,[e.address?(u(),y("div",ve,m(A.value),1)):(u(),y("div",me,m(o(l)("validation.insertAddress")),1))]),r(E,{modelValue:p.value,"onUpdate:modelValue":a[5]||(a[5]=t=>p.value=t),modelAddress:g.value,allowForeign:!1,onSave:M,onCancel:S},null,8,["modelValue","modelAddress"])]))]),_:1},512)]),_:1})]),_:1}))}}),qe=L(fe,[["__scopeId","data-v-00648f3a"]]);export{qe as default};

View File

@@ -0,0 +1 @@
.q-card[data-v-7c94255c]{width:100%;margin:0}

View File

@@ -0,0 +1 @@
import{Q as y}from"./QBtn-Bl8V3g1s.js";import{Q as v}from"./QSeparator-D1JYPgu2.js";import{Q as k,a as Q,_ as C}from"./IndexPage-CTPnu3LT.js";import{I as S,J as g,M as a,K as c,N as n,O as e,R as i,W as d,Q as o,U as s,S as N,T as B}from"./index-BFHpqQMc.js";import{u as q}from"./vue-i18n.runtime-CGMLV8bE.js";import"./use-router-link-niyq3CDa.js";import"./QList-CPm2VhlR.js";const w={class:"row items-center"},W={class:"col"},b={class:"text-h5"},I={class:"col-auto"},V={class:"text-subtitle2 text-grey"},E={key:0,class:"q-mt-md"},J={key:1,class:"q-mt-md"},L=S({__name:"WelcomeStep",props:{step:{}},emits:["next"],setup(m,{emit:p}){const _=m,u=p,t=_.step,{t:f}=q();function x(){u("next",t?.next)}return(O,r)=>(a(),g(Q,{flat:"",class:"full-width q-pa-none"},{default:c(()=>[n(k,{class:"full-width"},{default:c(()=>[e("div",w,[e("div",W,[e("div",b,o(s(f)("WEL")),1)]),e("div",I,[n(y,{color:"primary",label:"Avanti",onClick:x})])]),n(v,{class:"q-my-sm"}),e("div",V,"Tipo: "+o(s(t).type),1),s(t).description?(a(),i("div",E,o(s(t).description),1)):d("",!0),s(t).fields&&s(t).fields.length?(a(),i("div",J,[r[0]||(r[0]=e("div",{class:"text-subtitle1"},"Campi:",-1)),e("ul",null,[(a(!0),i(N,null,B(s(t).fields,(l,h)=>(a(),i("li",{key:h},o(l.key)+" — "+o(l.type),1))),128))])])):d("",!0),e("pre",null,o(JSON.stringify(s(t),null,2)),1)]),_:1})]),_:1}))}}),U=C(L,[["__scopeId","data-v-7c94255c"]]);export{U as default};

View File

@@ -0,0 +1 @@
import{Z as o}from"./index-BFHpqQMc.js";import{P as i}from"./LocalStorage-Bg7wwOV9.js";const s="children:v1",n={hasChildren:!1,children:[],moreThanFiveChildrenNote:""},m=o("childrenstore",{state:()=>{try{let e=i.getItem(s);if(typeof e=="string")try{e=JSON.parse(e)}catch{e=null}if(e&&typeof e=="object")return{data:{...e}}}catch{}return{data:{...n}}},actions:{persist(){try{const e={hasChildren:!!this.data.hasChildren,children:Array.isArray(this.data.children)?this.data.children.map(t=>{const h=r=>r?Array.isArray(r)?r.map(a=>({name:a.name||"",size:a.size||0,type:a.type||"",lastModified:a.lastModified})):{name:r.name||"",size:r.size||0,type:r.type||"",lastModified:r.lastModified}:null;return{firstName:t.firstName,lastName:t.lastName,birthDate:t.birthDate,sameHousehold:t.sameHousehold,alimentiVersati:t.alimentiVersati??!1,school:t.school,careCosts:h(t.careCosts)}}):[],moreThanFiveChildrenNote:this.data.moreThanFiveChildrenNote||""};i.set(s,e)}catch(e){console.error("children.store: persist error",e)}},getChildren(){return this.data},setChildren(e){this.data={...this.data,...e},this.persist()},replaceChildren(e){this.data=e,this.persist()},resetChildren(){this.data={...n},this.persist()}}});export{m as u};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{Z as p}from"./index-BFHpqQMc.js";import{P as s}from"./LocalStorage-Bg7wwOV9.js";const e="taxstore:v1",i={prevPreparedByUs:!1,prevDeclaration:null,firstName:"",lastName:"",birthDate:"",address:"",zip:"",city:""},r={maritalStatus:"",spouseFirstName:"",spouseLastName:"",spouseName:"",spouseBirthDate:"",spouseTaxNumber:"",spouseAddress:"",spouseZip:"",spouseCity:"",marriageDate:"",separated:!1,spousePreviousDivorces:!1,spouseAlimentiVersati:!1},f=p("taxstore",{state:()=>{try{const t=s.getItem(e);if(t&&typeof t=="object"){const a=t;if(Array.isArray(a.items))return{items:a.items}}}catch{}return{items:[{key:"taxpayer",data:{...i}},{key:"marital",data:{...r}}]}},actions:{persist(){try{s.set(e,{items:this.items})}catch{}},_findTaxpayer(){return this.items.find(t=>t.key==="taxpayer")},_findMarital(){return this.items.find(t=>t.key==="marital")},getTaxpayer(){return this._findTaxpayer()?.data},setTaxpayer(t){const a=this._findTaxpayer();a&&(a.data={...a.data,...t}),this.persist()},replaceTaxpayer(t){const a=this._findTaxpayer();a&&(a.data=t),this.persist()},resetTaxpayer(){const t=this._findTaxpayer();t&&(t.data={...i}),this.persist()},getMarital(){return this._findMarital()?.data},setMarital(t){const a=this._findMarital();a&&(a.data={...a.data,...t}),this.persist()},replaceMarital(t){const a=this._findMarital();a&&(a.data=t),this.persist()},resetMarital(){const t=this._findMarital();t&&(t.data={...r}),this.persist()}}});export{f as u};

View File

@@ -0,0 +1 @@
import{h as j,m as D,g as M,a as i}from"./index-BFHpqQMc.js";function T(e,t){return e!==void 0&&e()||t}function U(e,t){if(e!==void 0){const a=e();if(a!=null)return a.slice()}return t}function _(e,t){return e!==void 0?t.concat(e()):t}function w(e,t){return e===void 0?t:t!==void 0?t.concat(e()):e()}function N(e,t,a,r,u,v){t.key=r+u;const s=j(e,t,a);return u===!0?D(s,v()):s}function z(e){if(Object(e.$parent)===e.$parent)return e.$parent;let{parent:t}=e.$;for(;Object(t)===t;){if(Object(t.proxy)===t.proxy)return t.proxy;t=t.parent}}function q(e){return e.appContext.config.globalProperties.$router!==void 0}function F(e){return e.isUnmounted===!0||e.isDeactivated===!0}function $(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}function R(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function K(e,t){for(const a in t){const r=t[a],u=e[a];if(typeof r=="string"){if(r!==u)return!1}else if(Array.isArray(u)===!1||u.length!==r.length||r.some((v,s)=>v!==u[s]))return!1}return!0}function S(e,t){return Array.isArray(t)===!0?e.length===t.length&&e.every((a,r)=>a===t[r]):e.length===1&&e[0]===t}function B(e,t){return Array.isArray(e)===!0?S(e,t):Array.isArray(t)===!0?S(t,e):e===t}function V(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const a in e)if(B(e[a],t[a])===!1)return!1;return!0}const E={to:[String,Object],replace:Boolean,href:String,target:String,disable:Boolean},G={...E,exact:Boolean,activeClass:{type:String,default:"q-router-link--active"},exactActiveClass:{type:String,default:"q-router-link--exact-active"}};function J({fallbackTag:e,useDisableForRouterLinkProps:t=!0}={}){const a=M(),{props:r,proxy:u,emit:v}=a,s=q(a),g=i(()=>r.disable!==!0&&r.href!==void 0),L=t===!0?i(()=>s===!0&&r.disable!==!0&&g.value!==!0&&r.to!==void 0&&r.to!==null&&r.to!==""):i(()=>s===!0&&g.value!==!0&&r.to!==void 0&&r.to!==null&&r.to!==""),h=i(()=>L.value===!0?A(r.to):null),l=i(()=>h.value!==null),y=i(()=>g.value===!0||l.value===!0),O=i(()=>r.type==="a"||y.value===!0?"a":r.tag||e||"div"),b=i(()=>g.value===!0?{href:r.href,target:r.target}:l.value===!0?{href:h.value.href,target:r.target}:{}),k=i(()=>{if(l.value===!1)return-1;const{matched:n}=h.value,{length:o}=n,c=n[o-1];if(c===void 0)return-1;const f=u.$route.matched;if(f.length===0)return-1;const d=f.findIndex(R.bind(null,c));if(d!==-1)return d;const P=$(n[o-2]);return o>1&&$(c)===P&&f[f.length-1].path!==P?f.findIndex(R.bind(null,n[o-2])):d}),p=i(()=>l.value===!0&&k.value!==-1&&K(u.$route.params,h.value.params)),m=i(()=>p.value===!0&&k.value===u.$route.matched.length-1&&V(u.$route.params,h.value.params)),C=i(()=>l.value===!0?m.value===!0?` ${r.exactActiveClass} ${r.activeClass}`:r.exact===!0?"":p.value===!0?` ${r.activeClass}`:"":"");function A(n){try{return u.$router.resolve(n)}catch{}return null}function x(n,{returnRouterError:o,to:c=r.to,replace:f=r.replace}={}){if(r.disable===!0)return n.preventDefault(),Promise.resolve(!1);if(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey||n.button!==void 0&&n.button!==0||r.target==="_blank")return Promise.resolve(!1);n.preventDefault();const d=u.$router[f===!0?"replace":"push"](c);return o===!0?d:d.then(()=>{}).catch(()=>{})}function I(n){if(l.value===!0){const o=c=>x(n,c);v("click",n,o),n.defaultPrevented!==!0&&o()}else v("click",n)}return{hasRouterLink:l,hasHrefLink:g,hasLink:y,linkTag:O,resolvedLink:h,linkIsActive:p,linkIsExactActive:m,linkClass:C,linkAttrs:b,getLink:A,navigateToRouterLink:x,navigateOnClick:I}}export{U as a,_ as b,N as c,J as d,w as e,q as f,z as g,T as h,E as i,G as u,F as v};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{b as q,A as F}from"./CommentAttachment-Cd2tEdil.js";import{$ as S,r as v,a as i,a9 as d,a3 as u,a5 as s,a4 as m,a1 as _,a7 as j,a8 as c,ac as p,a6 as I}from"./index-BmjEiQ1N.js";import{u as N}from"./vue-i18n.runtime-BJiJhJjW.js";import{_ as z}from"./IndexPage-B-pkHUHg.js";const T={class:"row items-center q-gutter-sm q-mb-sm q-mt-md"},E={class:"col-auto"},H={class:"col"},M={class:"text-caption"},O={class:"q-pa-sm bg-grey-2 q-mb-sm"},Q={key:0,class:"text-negative"},D={key:1},U=S({__name:"AddressInput",props:{modelValue:{},label:{},allowForeign:{type:Boolean},hint:{}},emits:["update:modelValue","save","cancel"],setup(g,{emit:h}){const o=g,r=h,{t:l}=N(),n=v(!1),y=v(null),V=o.label||l("address"),b=o.allowForeign??!0,x=i(()=>{const e=o.modelValue;if(console.log("address input formatted",e),!e)return"";const t=e.country?.name||"";return e.country.code==="CH"?[e.street,String(e.cap||""),e.city,e.canton].filter(Boolean).join(", "):[e.street,String(e.cap||""),e.city,t].filter(Boolean).join(", ")}),A=i(()=>{const e=o.modelValue;return e?!(e.street||e.city||e.cap||e.country&&e.country.code):!0}),w=i(()=>o.hint||l("validation.insertAddress"));function B(){const e=o.modelValue;y.value=e?{street:e.street||"",zip:String(e.cap||""),city:e.city||"",country:e.country&&e.country.code||"",canton:e.canton||"",foreign:!!(e.country&&e.country.code&&e.country.code!=="CH")}:{street:"",zip:"",city:"",country:"",canton:"",foreign:!0},n.value=!0}function C(e){let t={code:"",name:""};if(!e.country)t={code:"",name:""};else if(typeof e.country=="string")t={code:e.country,name:e.country};else if(typeof e.country=="object"&&e.country!==null){const f=e.country;t={code:f.code||"",name:f.name||""}}const a={street:e.street||"",cap:e.zip||"",city:e.city||"",country:t,canton:e.canton||""};r("update:modelValue",a),r("save",a),n.value=!1}function k(){r("cancel"),n.value=!1}return(e,t)=>(u(),d("div",null,[s("div",T,[s("div",E,[m(I,{dense:"",flat:"",round:"",icon:"edit",onClick:B},{default:_(()=>[m(q,{class:"bg-primary text-white"},{default:_(()=>[j(c(p(l)("children.editAddress")),1)]),_:1})]),_:1})]),s("div",H,[s("div",M,c(p(V)),1)])]),s("div",O,[A.value?(u(),d("div",Q,c(w.value),1)):(u(),d("div",D,c(x.value),1))]),m(F,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=a=>n.value=a),modelAddress:y.value,allowForeign:p(b),onSave:C,onCancel:k},null,8,["modelValue","modelAddress","allowForeign"])]))}}),L=z(U,[["__scopeId","data-v-b68f19ad"]]);export{L as A};

View File

@@ -0,0 +1 @@
.q-card[data-v-b68f19ad]{width:100%;margin:0}

View File

@@ -0,0 +1 @@
.full-width[data-v-aa36bd22]{width:100%}.contained-card[data-v-aa36bd22]{min-width:480px;max-width:720px}.contained-card .q-card-section[data-v-aa36bd22]{padding:16px}.contained-card .q-card-actions[data-v-aa36bd22]{padding:12px 16px}.child-modal[data-v-aa36bd22]{min-width:480px}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
.contained-card[data-v-00430335]{min-width:420px;max-width:720px}.comment-attachment[data-v-a0ff9b6f]{font-size:14px}.comment-attachment__file-name[data-v-a0ff9b6f]{font-size:14px!important;width:100%;background-color:#0000001a}.text-grey[data-v-a0ff9b6f]{color:#00000073}

View File

@@ -0,0 +1 @@
import{$ as o,a9 as s,a5 as t,a4 as a,a3 as l,a6 as n}from"./index-BmjEiQ1N.js";const r={class:"fullscreen bg-blue text-white text-center q-pa-md flex flex-center"},p=o({__name:"ErrorNotFound",setup(c){return(i,e)=>(l(),s("div",r,[t("div",null,[e[0]||(e[0]=t("div",{style:{"font-size":"30vh"}},"404",-1)),e[1]||(e[1]=t("div",{class:"text-h2",style:{opacity:"0.4"}},"Oops. Nothing here...",-1)),a(n,{class:"q-mt-xl",color:"white","text-color":"blue",unelevated:"",to:"/",label:"Go Home","no-caps":""})])]))}});export{p as default};

View File

@@ -0,0 +1,2 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/WelcomeStep-4mnlgiMd.js","assets/index-BmjEiQ1N.js","assets/index-BQveqNql.css","assets/vue-i18n.runtime-BJiJhJjW.js","assets/QList-D7mleCtN.js","assets/WelcomeStep-BTfvnfIz.css","assets/TaxpayerStep-B6ffPYtU.js","assets/CommentAttachment-Cd2tEdil.js","assets/taxstore-_HmhNaxB.js","assets/CommentAttachment-M56Dxc2A.css","assets/AddressInput-87dDVmDx.js","assets/AddressInput-DTjVpzGz.css","assets/TaxpayerStep-CWAfROv3.css","assets/MaritalStep-B1YvSTl7.js","assets/MaritalStep-DL6z_e8a.css","assets/ChildrenStep-bpUch1TG.js","assets/children-Cq9nPSB7.js","assets/ChildrenStep-CyFMlGKq.css"])))=>i.map(i=>d[i]);
import{c as w,g as A,j as S,k as d,m as $,X as R,a as g,h as D,b as O,$ as Q,r as q,ad as v,a2 as B,a9 as h,a3 as s,a5 as C,a4 as c,a1 as u,aa as F,ab as L,a0 as I,a8 as b,ac as k,ae as V,af as z,ag as j,ah as N,ai as m}from"./index-BmjEiQ1N.js";import{a as T,b as H,Q as K}from"./QList-D7mleCtN.js";const M=w({name:"QPage",props:{padding:Boolean,styleFn:Function},setup(i,{slots:o}){const{proxy:{$q:r}}=A(),e=S($,d);if(e===d)return console.error("QPage needs to be a deep child of QLayout"),d;if(S(R,d)===d)return console.error("QPage needs to be child of QPageContainer"),d;const p=g(()=>{const n=(e.header.space===!0?e.header.size:0)+(e.footer.space===!0?e.footer.size:0);if(typeof i.styleFn=="function"){const y=e.isContainer.value===!0?e.containerHeight.value:r.screen.height;return i.styleFn(n,y)}return{minHeight:e.isContainer.value===!0?e.containerHeight.value-n+"px":r.screen.height===0?n!==0?`calc(100vh - ${n}px)`:"100vh":r.screen.height-n+"px"}}),f=g(()=>`q-page${i.padding===!0?" q-layout-padding":""}`);return()=>D("main",{class:f.value,style:p.value},O(o.default))}}),X={class:"row full-height"},G={class:"col-3 q-pa-sm bg-grey-1"},J={class:"text-body1"},U={class:"col q-pa-md full-height"},W={key:0,class:"text-h6"},Y={key:2,class:"q-mt-md"},Z=Q({__name:"StepsStepper",setup(i){const o=[{id:"welcome",title:"Benvenuto",order:0},{id:"taxpayer",title:"Dati contribuente e dichiarazione precedente",order:1},{id:"marital",title:"Stato civile",order:2},{id:"children",title:"Figli",order:3},{id:"income",title:"Redditi",order:4},{id:"professionalExpenses",title:"Spese professionali",order:5},{id:"sideIncome",title:"Reddito accessorio",order:6},{id:"annuities",title:"Rendite",order:7},{id:"insurance",title:"Spese assicurative e mediche",order:8},{id:"pillar3",title:"Polizze 3A / 3B",order:9},{id:"bankAccounts",title:"Conti bancari",order:10},{id:"otherAssets",title:"Altri beni / averi",order:11},{id:"debts",title:"Debiti / ipoteche",order:12},{id:"properties",title:"Immobili",order:13},{id:"foreign",title:"Redditi o averi allestero",order:14}],r=Math.max(...o.map(t=>t.order)),e=new Array(r+1).fill(void 0).map(()=>({}));o.forEach(t=>{e[t.order]={id:t.id,title:t.title,order:t.order}});const a=q(0),p=g(()=>{const t=e[a.value]?.id;return t==="welcome"?v(()=>m(()=>import("./WelcomeStep-4mnlgiMd.js"),__vite__mapDeps([0,1,2,3,4,5]))):t==="taxpayer"?v(()=>m(()=>import("./TaxpayerStep-B6ffPYtU.js"),__vite__mapDeps([6,1,2,7,4,8,3,9,10,11,12]))):t==="marital"?v(()=>m(()=>import("./MaritalStep-B1YvSTl7.js"),__vite__mapDeps([13,1,2,7,4,8,3,9,10,11,14]))):t==="children"?v(()=>m(()=>import("./ChildrenStep-bpUch1TG.js"),__vite__mapDeps([15,1,2,7,4,8,3,9,16,17]))):null}),f=g(()=>e[a.value]);function n(t){if(typeof t=="string"){const l=e.findIndex(_=>_.id===t);if(l!==-1){a.value=l;return}}a.value<e.length-1&&a.value++}function y(t){if(typeof t=="string"){const l=e.findIndex(_=>_.id===t);if(l!==-1){a.value=l;return}}a.value>0&&a.value--}return(t,l)=>{const _=B("taxpayer-step");return s(),h("div",X,[C("div",G,[c(K,{dense:"",bordered:"",class:"vertical-nav"},{default:u(()=>[(s(!0),h(F,null,L(k(e),(P,x)=>(s(),I(T,{key:P.id,clickable:"",onClick:re=>a.value=x,active:a.value===x},{default:u(()=>[c(H,null,{default:u(()=>[C("div",J,b(x+1)+". "+b(P.title),1)]),_:2},1024)]),_:2},1032,["onClick","active"]))),128))]),_:1})]),C("div",U,[c(N,{flat:"",class:"q-pa-md full-height"},{default:u(()=>[c(V,null,{default:u(()=>[p.value?z("",!0):(s(),h("div",W,b(k(e)[a.value]?.title),1)),p.value&&f.value?(s(),I(j(p.value),{key:1,step:f.value,onNext:n,onPrev:y},null,40,["step"])):(s(),h("div",Y))]),_:1}),c(_)]),_:1})])])}}}),E=(i,o)=>{const r=i.__vccOpts||i;for(const[e,a]of o)r[e]=a;return r},ee=E(Z,[["__scopeId","data-v-276d0120"]]),te=Q({__name:"IndexPage",setup(i){return(o,r)=>(s(),I(M,{class:"row full-width justify-center full-height"},{default:u(()=>[c(ee,{class:"no-shadow full-height full-width"})]),_:1}))}}),ae=E(te,[["__scopeId","data-v-1cafec6b"]]),ne=Object.freeze(Object.defineProperty({__proto__:null,default:ae},Symbol.toStringTag,{value:"Module"}));export{ne as I,E as _};

View File

@@ -0,0 +1 @@
.q-stepper[data-v-276d0120]{max-width:900px;margin:0 auto}.full-height[data-v-276d0120]{height:100%}.vertical-nav .q-item[data-v-276d0120]{border-radius:4px;margin-bottom:4px;max-width:350px}.vertical-nav .q-item--active[data-v-276d0120]{background-color:var(--q-color-primary)!important}.vertical-nav .q-item--active .text-body1[data-v-276d0120],.vertical-nav .q-item--active .q-item__label[data-v-276d0120]{font-weight:700!important}[data-v-1cafec6b] .no-shadow .q-stepper{box-shadow:none!important;height:100%!important;width:100%!important}[data-v-1cafec6b] .no-shadow .q-stepper .q-step__content,[data-v-1cafec6b] .no-shadow .q-stepper .q-card{height:100%!important}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
.q-card[data-v-d74d6ed8]{width:100%;margin:0}

View File

@@ -0,0 +1 @@
import{c as v,a,h as c,b as q,aj as I,H as k,g,I as y,ak as A,r as b,al as K,G as R,p as $}from"./index-BmjEiQ1N.js";const D=v({name:"QItemSection",props:{avatar:Boolean,thumbnail:Boolean,side:Boolean,top:Boolean,noWrap:Boolean},setup(e,{slots:n}){const l=a(()=>`q-item__section column q-item__section--${e.avatar===!0||e.side===!0||e.thumbnail===!0?"side":"main"}`+(e.top===!0?" q-item__section--top justify-start":" justify-center")+(e.avatar===!0?" q-item__section--avatar":"")+(e.thumbnail===!0?" q-item__section--thumbnail":"")+(e.noWrap===!0?" q-item__section--nowrap":""));return()=>c("div",{class:l.value},q(n.default))}}),F=v({name:"QItem",props:{...k,...I,tag:{type:String,default:"div"},active:{type:Boolean,default:null},clickable:Boolean,dense:Boolean,insetLevel:Number,tabindex:[String,Number],focused:Boolean,manualFocus:Boolean},emits:["click","keyup"],setup(e,{slots:n,emit:l}){const{proxy:{$q:i}}=g(),d=y(e,i),{hasLink:s,linkAttrs:h,linkClass:B,linkTag:_,navigateOnClick:C}=A(),o=b(null),r=b(null),m=a(()=>e.clickable===!0||s.value===!0||e.tag==="label"),u=a(()=>e.disable!==!0&&m.value===!0),x=a(()=>"q-item q-item-type row no-wrap"+(e.dense===!0?" q-item--dense":"")+(d.value===!0?" q-item--dark":"")+(s.value===!0&&e.active===null?B.value:e.active===!0?` q-item--active${e.activeClass!==void 0?` ${e.activeClass}`:""}`:"")+(e.disable===!0?" disabled":"")+(u.value===!0?" q-item--clickable q-link cursor-pointer "+(e.manualFocus===!0?"q-manual-focusable":"q-focusable q-hoverable")+(e.focused===!0?" q-manual-focusable--focused":""):"")),L=a(()=>e.insetLevel===void 0?null:{["padding"+(i.lang.rtl===!0?"Right":"Left")]:16+e.insetLevel*56+"px"});function E(t){u.value===!0&&(r.value!==null&&t.qAvoidFocus!==!0&&(t.qKeyEvent!==!0&&document.activeElement===o.value?r.value.focus():document.activeElement===r.value&&o.value.focus()),C(t))}function Q(t){if(u.value===!0&&K(t,[13,32])===!0){R(t),t.qKeyEvent=!0;const f=new MouseEvent("click",t);f.qKeyEvent=!0,o.value.dispatchEvent(f)}l("keyup",t)}function S(){const t=$(n.default,[]);return u.value===!0&&t.unshift(c("div",{class:"q-focus-helper",tabindex:-1,ref:r})),t}return()=>{const t={ref:o,class:x.value,style:L.value,role:"listitem",onClick:E,onKeyup:Q};return u.value===!0?(t.tabindex=e.tabindex||"0",Object.assign(t,h.value)):m.value===!0&&(t["aria-disabled"]="true"),c(_.value,t,S())}}}),j=["ul","ol"],P=v({name:"QList",props:{...k,bordered:Boolean,dense:Boolean,separator:Boolean,padding:Boolean,tag:{type:String,default:"div"}},setup(e,{slots:n}){const l=g(),i=y(e,l.proxy.$q),d=a(()=>j.includes(e.tag)?null:"list"),s=a(()=>"q-list"+(e.bordered===!0?" q-list--bordered":"")+(e.dense===!0?" q-list--dense":"")+(e.separator===!0?" q-list--separator":"")+(i.value===!0?" q-list--dark":"")+(e.padding===!0?" q-list--padding":""));return()=>c(e.tag,{class:s.value,role:d.value},q(n.default))}});export{P as Q,F as a,D as b};

View File

@@ -0,0 +1 @@
import{$ as T,Z as k,r as w,a as d,o as A,f as Q,a0 as R,a3 as b,a1 as c,a4 as r,ae as S,a5 as n,a8 as I,ac as l,a6 as x,am as F,a9 as M,af as j,an as E,ao as f,ah as L}from"./index-BmjEiQ1N.js";import{Q as O,C as X}from"./CommentAttachment-Cd2tEdil.js";import{u as Z}from"./taxstore-_HmhNaxB.js";import{A as $}from"./AddressInput-87dDVmDx.js";import{u as z}from"./vue-i18n.runtime-BJiJhJjW.js";import{_ as G}from"./IndexPage-B-pkHUHg.js";import"./QList-D7mleCtN.js";const H={class:"row items-center"},J={class:"col"},K={class:"text-h5"},W={class:"col-auto"},Y={class:"row items-center q-gutter-md q-mb-sm q-ml-none"},ee={class:"col q-ml-none"},ae={key:0,class:"q-mt-sm"},te=T({__name:"TaxpayerStep",props:{step:{}},emits:["next","prev"],setup(V,{emit:N}){const _=V,v=N,y=_.step,i=Z(),e=k({}),{t:s}=z(),u=w(null),D=(o="Required")=>{const a=s("validation.required");return a&&a!=="validation.required"?a:o},m=o=>a=>{const t=o||D();return a==null?t:typeof a=="string"?a.trim()!==""||t:Array.isArray(a)?a.length>0||t:!0},p=d(()=>!!e.prevPreparedByUs),g=d(()=>p.value?[]:[m()]),q=d(()=>p.value?[]:[m()]),B=d(()=>p.value?[]:[m()]);A(async()=>{const o=i.getTaxpayer()||{};Object.assign(e,o),await Q(),u.value?.resetValidation?.()});async function U(){try{if(await(u.value?.validate?.()??!0)===!1)return}catch{return}i.setTaxpayer({prevPreparedByUs:e.prevPreparedByUs,prevDeclaration:e.prevDeclaration,firstName:e.firstName,lastName:e.lastName,birthDate:e.birthDate,address:e.address}),v("next",y.next)}function h(){i.setTaxpayer({prevPreparedByUs:e.prevPreparedByUs,prevDeclaration:e.prevDeclaration,firstName:e.firstName,lastName:e.lastName,birthDate:e.birthDate,address:e.address}),v("prev",y.prev)}function C(){}function P(){}return(o,a)=>(b(),R(L,{flat:"",class:"full-width q-pa-none"},{default:c(()=>[r(S,{class:"full-width"},{default:c(()=>[n("div",H,[n("div",J,[n("div",K,I(l(s)("TAX")),1)]),n("div",W,[r(x,{flat:"",color:"secondary",label:l(s)("button.prev"),onClick:h,class:"q-mr-sm"},null,8,["label"]),r(x,{color:"primary",label:l(s)("button.next"),onClick:U},null,8,["label"])])]),r(F,{class:"q-my-sm"}),r(O,{ref_key:"formRef",ref:u,class:"q-gutter-md q-mt-md"},{default:c(()=>[n("div",Y,[n("div",ee,[r(E,{modelValue:e.prevPreparedByUs,"onUpdate:modelValue":a[0]||(a[0]=t=>e.prevPreparedByUs=t),label:l(s)("taxpayer.prevPreparedByUs")},null,8,["modelValue","label"])])]),e.prevPreparedByUs?(b(),M("div",ae,[r(X,{modelValue:e.prevDeclaration,"onUpdate:modelValue":a[1]||(a[1]=t=>e.prevDeclaration=t),label:l(s)("taxpayer.prevDeclaration"),id:"taxpayer"},null,8,["modelValue","label"])])):j("",!0),n("div",null,[r(f,{modelValue:e.firstName,"onUpdate:modelValue":a[2]||(a[2]=t=>e.firstName=t),label:l(s)("taxpayer.firstName"),rules:g.value},null,8,["modelValue","label","rules"]),r(f,{modelValue:e.lastName,"onUpdate:modelValue":a[3]||(a[3]=t=>e.lastName=t),label:l(s)("taxpayer.lastName"),rules:q.value},null,8,["modelValue","label","rules"]),r(f,{modelValue:e.birthDate,"onUpdate:modelValue":a[4]||(a[4]=t=>e.birthDate=t),type:"date",label:l(s)("taxpayer.birthDate"),rules:B.value},null,8,["modelValue","label","rules"]),r($,{modelValue:e.address,"onUpdate:modelValue":a[5]||(a[5]=t=>e.address=t),label:l(s)("taxpayer.address"),allowForeign:!0,onSave:P,onCancel:C},null,8,["modelValue","label"])])]),_:1},512)]),_:1})]),_:1}))}}),ue=G(te,[["__scopeId","data-v-e1b08f4f"]]);export{ue as default};

View File

@@ -0,0 +1 @@
.q-card[data-v-e1b08f4f]{width:100%;margin:0}

View File

@@ -0,0 +1 @@
import{$ as d,a0 as m,a3 as f,a1 as e,a4 as s,ae as u,a5 as t,a8 as o,ac as c,a6 as h,am as x,ah as v}from"./index-BmjEiQ1N.js";import{u as S}from"./vue-i18n.runtime-BJiJhJjW.js";import{_ as C}from"./IndexPage-B-pkHUHg.js";import"./QList-D7mleCtN.js";const w={class:"row items-center"},y={class:"col"},B={class:"text-h5"},N={class:"col-auto"},Q=d({__name:"WelcomeStep",props:{step:{}},emits:["next"],setup(n,{emit:r}){const i=n,l=r,a=i.step,{t:p}=S();function _(){l("next",a?.next)}return(g,k)=>(f(),m(v,{flat:"",class:"full-width q-pa-none"},{default:e(()=>[s(u,{class:"full-width"},{default:e(()=>[t("div",w,[t("div",y,[t("div",B,o(c(p)("WEL")),1)]),t("div",N,[s(h,{color:"primary",label:"Avanti",onClick:_})])]),s(x,{class:"q-my-sm"}),t("pre",null,o(JSON.stringify(c(a),null,2)),1)]),_:1})]),_:1}))}}),b=C(Q,[["__scopeId","data-v-f4c03057"]]);export{b as default};

View File

@@ -0,0 +1 @@
.q-card[data-v-f4c03057]{width:100%;margin:0}

View File

@@ -0,0 +1 @@
import{as as i}from"./index-BmjEiQ1N.js";import{P as r}from"./taxstore-_HmhNaxB.js";const s="children:v1",a={hasChildren:!1,children:[],moreThanFiveChildrenNote:""},o=i("childrenstore",{state:()=>{try{let e=r.getItem(s);if(typeof e=="string")try{e=JSON.parse(e)}catch{e=null}if(e&&typeof e=="object")return{data:{...e}}}catch{}return{data:{...a}}},actions:{persist(){try{const e={hasChildren:!!this.data.hasChildren,children:Array.isArray(this.data.children)?this.data.children.map(t=>({firstName:t.firstName,lastName:t.lastName,birthDate:t.birthDate,sameHousehold:t.sameHousehold,alimentiVersati:t.alimentiVersati??!1,school:t.school,hasCareCost:t.hasCareCost??!1,careCosts:t.careCosts,address:t.address??null})):[],moreThanFiveChildrenNote:this.data.moreThanFiveChildrenNote||""};r.set(s,e)}catch(e){console.error("children.store: persist error",e)}},getChildren(){return this.data},setChildren(e){this.data={...this.data,...e},this.persist()},replaceChildren(e){this.data=e,this.persist()},resetChildren(){this.data={...a},this.persist()}}});export{o as u};

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

BIN
static/dist/spa/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
static/dist/spa/icons/favicon-16x16.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

BIN
static/dist/spa/icons/favicon-32x32.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/dist/spa/icons/favicon-96x96.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

3
static/dist/spa/index.html vendored Normal file
View File

@@ -0,0 +1,3 @@
<!doctype html><html><head><title>dichiarazione fiscale</title><meta charset=utf-8><meta name=description content="Dichiarazione fiscale automatizzata"><meta name=format-detection content="telephone=no"><meta name=msapplication-tap-highlight content=no><meta name=viewport content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"><link rel=icon type=image/png sizes=128x128 href=/icons/favicon-128x128.png><link rel=icon type=image/png sizes=96x96 href=/icons/favicon-96x96.png><link rel=icon type=image/png sizes=32x32 href=/icons/favicon-32x32.png><link rel=icon type=image/png sizes=16x16 href=/icons/favicon-16x16.png><link rel=icon type=image/ico href=/favicon.ico> <script type="module" crossorigin src="/assets/index-BmjEiQ1N.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BQveqNql.css">
</head><body><div id=q-app></div></body></html>

BIN
static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

3
static/index.html Normal file
View File

@@ -0,0 +1,3 @@
<!doctype html><html><head><title>dichiarazione fiscale</title><meta charset=utf-8><meta name=description content="Dichiarazione fiscale automatizzata"><meta name=format-detection content="telephone=no"><meta name=msapplication-tap-highlight content=no><meta name=viewport content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"><link rel=icon type=image/png sizes=128x128 href=/icons/favicon-128x128.png><link rel=icon type=image/png sizes=96x96 href=/icons/favicon-96x96.png><link rel=icon type=image/png sizes=32x32 href=/icons/favicon-32x32.png><link rel=icon type=image/png sizes=16x16 href=/icons/favicon-16x16.png><link rel=icon type=image/ico href=/favicon.ico> <script type="module" crossorigin src="/assets/index-BFHpqQMc.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BQveqNql.css">
</head><body><div id=q-app></div></body></html>

BIN
testServer Executable file

Binary file not shown.