up
This commit is contained in:
1 parent
c113e38d82
commit
94cd2ce218
28 files changed
+1059
-14
No files matched your search
@@ -0,0 +1 @@
|
|||||||
|
bin/tinyurl
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
FROM golang:latest as builder
|
||||||
|
LABEL anther="cjun"
|
||||||
|
WORKDIR /tinyurl
|
||||||
|
COPY . /tinyurl
|
||||||
|
ENV GO111MODULE=on
|
||||||
|
ENV GOPROXY=https://goproxy.cn,direct
|
||||||
|
CMD [ "go mod download" ]
|
||||||
|
RUN make build
|
||||||
|
|
||||||
|
FROM alpine:latest AS runner
|
||||||
|
# 设置alpine 时间为上海时间
|
||||||
|
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||||
|
&& echo "Asia/Shanghai" > /etc/timezone \
|
||||||
|
&& apk del tzdata
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=builder /tinyurl/bin/tinyurl /app/tinyurl
|
||||||
|
EXPOSE 2830
|
||||||
|
CMD ["./tinyurl"]
|
||||||
+4
-3
@@ -1,6 +1,7 @@
|
|||||||
server:
|
server:
|
||||||
addr: 0.0.0.0:2830
|
addr: 0.0.0.0:2830
|
||||||
timeout: 1s
|
timeout: 2s
|
||||||
|
domain: http://🐮🍺.cf/
|
||||||
data:
|
data:
|
||||||
database:
|
database:
|
||||||
driver: mysql
|
driver: mysql
|
||||||
@@ -11,10 +12,10 @@ data:
|
|||||||
write_timeout: 0.2s
|
write_timeout: 0.2s
|
||||||
log:
|
log:
|
||||||
level: info
|
level: info
|
||||||
output: file
|
output: std #file
|
||||||
development: true
|
development: true
|
||||||
rotate:
|
rotate:
|
||||||
filename: app.log
|
filename: ./app.log
|
||||||
maxsize: 10
|
maxsize: 10
|
||||||
maxage: 7
|
maxage: 7
|
||||||
maxbackups:
|
maxbackups:
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+88
@@ -0,0 +1,88 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<metadata>
|
||||||
|
Created by FontForge 20120731 at Sat Nov 28 22:48:50 2015
|
||||||
|
By Ads
|
||||||
|
</metadata>
|
||||||
|
<defs>
|
||||||
|
<font id="iconfont" horiz-adv-x="1024" >
|
||||||
|
<font-face
|
||||||
|
font-family="iconfont"
|
||||||
|
font-weight="500"
|
||||||
|
font-stretch="normal"
|
||||||
|
units-per-em="1024"
|
||||||
|
panose-1="2 0 6 3 0 0 0 0 0 0"
|
||||||
|
ascent="896"
|
||||||
|
descent="-128"
|
||||||
|
x-height="792"
|
||||||
|
bbox="-0.097561 -77 1024.92 839"
|
||||||
|
underline-thickness="50"
|
||||||
|
underline-position="-100"
|
||||||
|
unicode-range="U+0078-F20A"
|
||||||
|
/>
|
||||||
|
<missing-glyph horiz-adv-x="374"
|
||||||
|
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
|
||||||
|
<glyph glyph-name=".notdef" horiz-adv-x="374"
|
||||||
|
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
|
||||||
|
<glyph glyph-name=".null" horiz-adv-x="0"
|
||||||
|
/>
|
||||||
|
<glyph glyph-name="nonmarkingreturn" horiz-adv-x="341"
|
||||||
|
/>
|
||||||
|
<glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
|
||||||
|
d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5
|
||||||
|
t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5
|
||||||
|
t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" />
|
||||||
|
<glyph glyph-name="uniF00A" unicode=""
|
||||||
|
d="M911 512l-334 1q19 79 23 116q4 45 -3 76q-11 47 -34 90q-6 12 -17 18.5t-24 6.5h-65q-13 0 -23.5 -6.5t-17 -17t-6.5 -23.5v-35v-32v-26q0 -10 -1 -11q-12 -26 -26.5 -52t-29.5 -51.5t-32 -49.5q-6 -9 -11.5 -17t-11.5 -16t-12.5 -16t-13.5 -15q-13 -14 -13 -32v-411
|
||||||
|
q0 -19 13 -33q28 -28 73 -28q323 1 440 1q13 0 24 6t17 17l119 203q6 11 9 22.5t3 23.5l1 244q0 13 -6.5 24t-17 17t-23.5 6zM155 445h-42q-13 0 -24 -6t-17 -17t-6 -24v-403q0 -19 13.5 -33t33.5 -14h42q13 0 23.5 6.5t17 17t6.5 23.5v403q0 20 -14 33.5t-33 13.5z" />
|
||||||
|
<glyph glyph-name="uniF01A" unicode=""
|
||||||
|
d="M260 740q0 -41 -29.5 -69.5t-76.5 -28.5q-45 0 -74 28.5t-29 69.5q0 43 29 71t76 28t74.5 -28t29.5 -71zM57 -69v633h197v-633h-197zM371 361q0 89 -4 203h170l10 -88h4q61 103 194 103q103 0 165.5 -69t62.5 -204v-375h-197v351q0 137 -100 137q-72 0 -101 -74
|
||||||
|
q-6 -12 -6 -49v-365h-198v430z" />
|
||||||
|
<glyph glyph-name="uniF03A" unicode=""
|
||||||
|
d="M751 815v-142h-84q-46 0 -62 -19t-16 -58v-101h157l-21 -158h-136v-407h-164v407h-136v158h136v117q0 100 56 154.5t148 54.5q79 0 122 -6z" />
|
||||||
|
<glyph glyph-name="uniF04A" unicode=""
|
||||||
|
d="M629 830h-245q-37 0 -69 -4t-71.5 -19t-71.5 -41q-37 -31 -56.5 -72.5t-19.5 -82.5q0 -46 22.5 -87t68.5 -68t106 -27h7h8q2 0 7.5 0.5t7.5 1t8 0.5q-1 -1 -2 -4t-1.5 -4t-1.5 -4l-2 -5q0 -1 -1 -3.5t-1.5 -4.5t-1 -4.5t-0.5 -5t-0.5 -5t-0.5 -5.5q0 -17 6.5 -33
|
||||||
|
t11.5 -23t18 -23q-18 -1 -26.5 -1.5t-29 -2.5t-33.5 -4.5t-34 -6.5t-36.5 -9t-34 -12.5t-33.5 -16.5q-48 -28 -69.5 -66.5t-21.5 -75.5q0 -69 66.5 -117.5t188.5 -48.5q74 0 134.5 19t98.5 50.5t58.5 70t20.5 80.5q0 19 -3.5 36t-11.5 32t-15 26.5t-21 24.5t-23 21t-26 22
|
||||||
|
l-43 32q-9 8 -14 12.5t-10.5 15.5t-5.5 22.5t6 23t11 17t16 16.5q24 18 37.5 30.5t30 33t24 45.5t7.5 56t-8.5 57.5t-24 46.5t-25.5 30t-26 22h74zM524 120q0 -36 -19.5 -64t-59.5 -44.5t-95 -16.5q-94 0 -151.5 39.5t-57.5 102.5q0 83 102 119q57 19 125 19h6h4
|
||||||
|
q3 0 4.5 -0.5t3.5 -0.5h5q2 0 4 -1q75 -51 102 -81t27 -72zM429 494q-33 -33 -80 -33q-36 0 -66 21t-47 53.5t-26 67t-9 65.5q0 54 26 86q14 17 36.5 27.5t46.5 10.5q46 0 81.5 -37t51.5 -84.5t16 -92.5v-10q0 -4 -1 -10.5t-2 -12.5t-3.5 -13t-5.5 -13.5t-7.5 -13
|
||||||
|
t-10.5 -11.5zM865 653v118h-59v-118h-119v-58h119v-118h59v118h118v58h-118z" />
|
||||||
|
<glyph glyph-name="uniF05A" unicode=""
|
||||||
|
d="M540 185h370v370h-369l-1 85h285v114h-285v85h-142v-284h-256v-370h199v-258zM284 279v175h484v-175h-484zM853 100q-17 0 -33 -6.5t-27.5 -18t-18 -27.5t-6.5 -33.5t6.5 -33.5t18 -27.5t27.5 -18.5t33 -7q35 0 60 25.5t25 61t-25 60.5t-60 25zM597.5 100
|
||||||
|
q-35.5 0 -60.5 -25t-25 -60.5t25 -61t60.5 -25.5t60 25.5t24.5 61t-24.5 60.5t-60 25zM171 100q-14 0 -27 -4t-23.5 -12t-18.5 -18.5t-12 -24t-4 -27.5q0 -35 24.5 -60.5t60 -25.5t60.5 25.5t25 60.5q0 18 -7 34t-18 27.5t-27 18t-33 6.5z" />
|
||||||
|
<glyph glyph-name="uniF06A" unicode="" horiz-adv-x="1025"
|
||||||
|
d="M1024 702q-58 -26 -121 -34q33 20 57 50t36 67q-63 -37 -134 -51q-62 66 -153 66q-57 0 -105.5 -28t-76.5 -76.5t-28 -105.5q0 -8 0.5 -16t2 -16t2.5 -16q-129 7 -241.5 65t-191.5 155q-13 -24 -20.5 -51t-7.5 -55q0 -36 11.5 -69t32.5 -60t49 -46q-50 2 -95 26v-2
|
||||||
|
q0 -76 48 -134t121 -72q-27 -8 -56 -8q-5 0 -10 1h-10q-5 1 -9.5 1.5t-9.5 1.5q20 -63 74 -103.5t122 -42.5q-36 -28 -77.5 -48t-88 -31t-95.5 -11q-25 0 -50 3q147 -94 322 -94q112 0 210 35.5t168 95t120.5 136.5t75 161.5t24.5 169.5q0 14 -1 27q8 5 15.5 11t14.5 12
|
||||||
|
l14 14q7 6 13.5 12.5t13 14t12 14.5t11.5 15t11 16z" />
|
||||||
|
<glyph glyph-name="uniF07A" unicode=""
|
||||||
|
d="M435 826q-94 -21 -163.5 -85.5t-98.5 -155.5t-8 -186q7 -34 21 -66q4 -9 12.5 -15t18 -7t18.5 3q15 6 20.5 20.5t-0.5 28.5q-11 25 -17 53q-17 74 6 146t78 123t129.5 67.5t145.5 -6.5t121.5 -78.5t67 -130t-6 -146.5t-77.5 -123t-130 -67q-44 -10 -89 -5q-15 1 -27 -9
|
||||||
|
t-13.5 -25t8.5 -27.5t25 -13.5q56 -6 112 7q94 20 164 85t98.5 155.5t8 185t-84.5 164.5t-154.5 99t-184.5 9zM542 339q57 13 88 62t18 106q-8 37 -33 64.5t-60.5 39t-72.5 3.5q-57 -13 -88 -62t-19 -106q5 -21 16 -41q-70 -81 -105 -197t-16 -239q2 -16 14.5 -25t28.5 -7
|
||||||
|
q1 1 2 1q14 3 22.5 15.5t6.5 26.5q-17 105 12.5 204.5t88.5 168.5q46 -25 97 -14z" />
|
||||||
|
<glyph glyph-name="uniF08A" unicode=""
|
||||||
|
d="M767 277q-9 -8 -11 -13.5t0 -16.5l4 -24q-183 2 -297 18q-6 2 0 5l289 201q11 7 -1 9q-7 1 -19 3t-21 3l-9 1q-90 11 -190 11q-170 0 -303 -30h8q225 0 374 -23q7 -2 0 -6l-289 -206l-5 -4q-2 -4 5 -5q45 -6 94 -9q59 -4 116 -4q176 0 312 32l5 1q-19 -15 -63 -30
|
||||||
|
l42 -226q2 -12 -1.5 -19t-11 -7.5t-18.5 4.5l-241 140q-24 15 -49 -1l-240 -139q-16 -9 -25 -2.5t-5 24.5l53 284q3 9 1.5 14t-8.5 12l-210 193q-9 8 -10.5 16t4.5 13t18 6l268 30q15 2 21 5.5t12 14.5l126 262q9 17 20.5 17t19.5 -17l118 -262q5 -13 11 -17t21 -6l277 -27
|
||||||
|
q18 -2 21.5 -12t-9.5 -23z" />
|
||||||
|
<glyph glyph-name="uniF09A" unicode=""
|
||||||
|
d="M704 547q-87 0 -163 -38t-120 -103q-22 -32 -33.5 -67t-11.5 -73q0 -41 14 -78h-18q-64 0 -124 18l-124 -56l30 102q-64 43 -101 105t-37 134q0 124 104.5 213t251.5 89q128 0 227 -70t122 -176h-17zM218 557q8 -7 17 -10.5t19 -3.5q22 0 36.5 14.5t14.5 35.5q0 11 -4 20
|
||||||
|
t-11 16q-2 2 -4 3l-4 4l-4 2l-4 2l-4 2h-6l-4 2h-6q-21 0 -36 -15q-7 -7 -10.5 -16t-3.5 -20q0 -7 1.5 -13.5t5 -12t7.5 -10.5zM1008 266q0 -126 -116 -204l23 -87l-105 49q-50 -16 -106 -16q-124 0 -213 75.5t-89 182.5q0 70 40.5 129t110.5 93q23 11 47.5 18.5t50.5 11.5
|
||||||
|
t53 4q126 0 215 -75t89 -181zM526.5 629.5q-14.5 14.5 -35 14.5t-34.5 -15q-7 -7 -11 -16t-4 -19q0 -20 14.5 -34.5t35 -14.5t35.5 14q7 8 10.5 16.5t3.5 18.5q0 21 -14.5 35.5zM603 312q9 0 16.5 3.5t13.5 9.5q13 13 13 29q0 8 -3.5 15.5t-9.5 13.5q-12 13 -30 13
|
||||||
|
q-6 0 -11 -1.5t-10 -4.5t-9 -7q-13 -13 -13 -28q0 -12 6 -21.5t16 -15.5q5 -3 10 -4.5t11 -1.5zM775 323q12 -13 30.5 -13t31.5 13q3 3 5 6.5t4 7.5t2.5 8t0.5 8q0 6 -1.5 11t-4 10t-6.5 9q-13 13 -31.5 13t-30.5 -13q-5 -4 -7.5 -9t-4 -10t-1.5 -11q0 -9 3 -16.5t10 -13.5z
|
||||||
|
" />
|
||||||
|
<glyph glyph-name="uniF10A" unicode=""
|
||||||
|
d="M138 773h746v-84h-746v84zM820 273v328h-617v-328h617zM292 517h439v-160h-439v160zM686 83q41 63 76 143l-90 33q-35 -97 -81 -176h-156q-39 103 -88 176l-83 -33q51 -77 83 -143h-230v-83h789v83h-220z" />
|
||||||
|
<glyph glyph-name="uniF11A" unicode=""
|
||||||
|
d="M911 223q-5 31 -17 61t-25.5 50.5t-26.5 37t-21 24.5l-8 9q5 44 -2.5 73t-17.5 36l-10 8q-2 62 -18.5 112.5t-39.5 81.5t-54 53.5t-57 32.5t-54 15.5t-38.5 6t-17.5 0.5q-6 0 -16.5 -0.5t-39 -6t-54 -15.5t-57 -32.5t-54.5 -53.5t-39.5 -81.5t-17.5 -112.5q-2 -1 -4.5 -3
|
||||||
|
t-9.5 -10t-10.5 -20.5t-7 -34t0.5 -49.5l-9 -9q-5 -5 -19.5 -23.5t-26.5 -38t-24.5 -50t-17.5 -61.5q-1 -4 -1 -10t1 -22t3.5 -28t9 -21t15.5 -8t25 17t37 50q23 -62 64 -117q-3 -1 -8 -3.5t-17.5 -10t-21.5 -17t-16 -26t-5 -34.5q0 -2 0.5 -4.5t3 -10t8 -14t17.5 -14.5
|
||||||
|
t28 -13.5t42.5 -9t58.5 -2.5q13 1 32.5 4t59.5 17t55 36h30q31 -44 141 -56l6 -1q45 -1 78 5.5t47.5 15.5t23 21.5t9 17.5t0.5 8q2 18 -4.5 34t-16.5 26t-20.5 17.5t-18.5 10.5l-8 3q9 11 17 23.5t14 23.5l12 22q6 11 9.5 19.5t6.5 15t4 9.5l1 4q21 -34 37 -50t25.5 -17
|
||||||
|
t15.5 8t8.5 21t3.5 28t1 23v9v0z" />
|
||||||
|
<glyph glyph-name="uniF12A" unicode="" horiz-adv-x="1026"
|
||||||
|
d="M0 242q0 65 40 140t113 147q96 97 195.5 134.5t140.5 -3.5q36 -36 11 -119q-2 -9 0 -12t5 -4t8 0t8 2l3 1q80 34 141.5 34t87.5 -35q25 -35 0 -101q-1 -8 -3 -11t3 -7.5t7 -5.5t9 -3q33 -10 59.5 -26.5t45 -47t19.5 -66.5q0 -39 -20.5 -79t-62.5 -79t-96 -66.5t-129 -48
|
||||||
|
t-155 -17.5t-157.5 19.5t-137 52.5t-98.5 87t-37 114zM104 201q5 -55 51 -97t118.5 -62t156.5 -12q128 13 211 80.5t76 151.5q-5 54 -50 96t-120 62.5t-157 12.5q-127 -13 -211 -80.5t-75 -151.5zM237 151q-24 52 3 106q27 53 86.5 80t120.5 10q63 -16 90.5 -67.5
|
||||||
|
t1.5 -109.5t-90.5 -85t-127.5 -7q-62 19 -84 73zM283 166q5 -21 24.5 -30t43 -1t35.5 28q11 18 6 38.5t-25 28.5q-20 9 -42.5 0.5t-33.5 -25.5q-13 -20 -8 -39zM403 247q-10 -19 8 -27q8 -2 16 1t12 10q6 8 2.5 16t-10.5 10q-7 3 -16 0t-12 -10zM666 746q-3 16 5 30.5
|
||||||
|
t25 16.5q70 14 139.5 -6.5t118.5 -76.5q50 -56 65 -128.5t-8 -137.5q-5 -16 -19.5 -23t-30 -2t-22.5 19.5t-3 29.5q16 47 6 98t-46 90q-36 40 -85 54.5t-98 5.5q-17 -3 -30 6t-17 24zM699 616q-3 15 5.5 26t20.5 14q35 8 68.5 -2.5t57.5 -37t31 -62.5t-3 -68
|
||||||
|
q-5 -12 -17.5 -19t-25.5 -2t-20 17.5t-2 25.5q11 36 -13.5 62.5t-61.5 20.5q-13 -3 -25 4t-15 21z" />
|
||||||
|
<glyph glyph-name="uniF20A" unicode=""
|
||||||
|
d="M945 677q-23 37 -54.5 64t-68.5 42.5t-79 18.5q-148 7 -228 -101l-1 2q-1 1 -2 1q0 -3 -3 -3q-80 108 -228 101q-60 -3 -113 -36t-89 -89q-26 -41 -36 -89.5t-5 -99t25 -102.5t54 -98q53 -69 89 -110q122 -134 282 -240l21 -15h6l21 15q78 52 150 113t132 127
|
||||||
|
q11 13 24 28.5t22.5 28t22 28t20.5 25.5q69 94 79.5 200.5t-41.5 188.5z" />
|
||||||
|
</font>
|
||||||
|
</defs></svg>
|
||||||
|
After Width: | Height: | Size: 9.8 KiB |
Vendored
+306
@@ -0,0 +1,306 @@
|
|||||||
|
var pl=Object.defineProperty,gl=Object.defineProperties;var vl=Object.getOwnPropertyDescriptors;var is=Object.getOwnPropertySymbols;var ml=Object.prototype.hasOwnProperty,bl=Object.prototype.propertyIsEnumerable;var as=(e,t,n)=>t in e?pl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pt=(e,t)=>{for(var n in t||(t={}))ml.call(t,n)&&as(e,n,t[n]);if(is)for(var n of is(t))bl.call(t,n)&&as(e,n,t[n]);return e},Bt=(e,t)=>gl(e,vl(t));const yl=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerpolicy&&(s.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?s.credentials="include":o.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}};yl();function $o(e,t){const n=Object.create(null),r=e.split(",");for(let o=0;o<r.length;o++)n[r[o]]=!0;return t?o=>!!n[o.toLowerCase()]:o=>!!n[o]}const _l="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",wl=$o(_l);function ci(e){return!!e||e===""}function Yt(e){if(z(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=de(r)?El(r):Yt(r);if(o)for(const s in o)t[s]=o[s]}return t}else{if(de(e))return e;if(he(e))return e}}const xl=/;(?![^(]*\))/g,Cl=/:(.+)/;function El(e){const t={};return e.split(xl).forEach(n=>{if(n){const r=n.split(Cl);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function oe(e){let t="";if(de(e))t=e;else if(z(e))for(let n=0;n<e.length;n++){const r=oe(e[n]);r&&(t+=r+" ")}else if(he(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Kt=e=>de(e)?e:e==null?"":z(e)||he(e)&&(e.toString===pi||!U(e.toString))?JSON.stringify(e,fi,2):String(e),fi=(e,t)=>t&&t.__v_isRef?fi(e,t.value):hn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o])=>(n[`${r} =>`]=o,n),{})}:di(t)?{[`Set(${t.size})`]:[...t.values()]}:he(t)&&!z(t)&&!gi(t)?String(t):t,ie={},dn=[],We=()=>{},Tl=()=>!1,Sl=/^on[^a-z]/,gr=e=>Sl.test(e),Po=e=>e.startsWith("onUpdate:"),Me=Object.assign,Mo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Al=Object.prototype.hasOwnProperty,X=(e,t)=>Al.call(e,t),z=Array.isArray,hn=e=>vr(e)==="[object Map]",di=e=>vr(e)==="[object Set]",U=e=>typeof e=="function",de=e=>typeof e=="string",ko=e=>typeof e=="symbol",he=e=>e!==null&&typeof e=="object",hi=e=>he(e)&&U(e.then)&&U(e.catch),pi=Object.prototype.toString,vr=e=>pi.call(e),$l=e=>vr(e).slice(8,-1),gi=e=>vr(e)==="[object Object]",Oo=e=>de(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Gn=$o(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),mr=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Pl=/-(\w)/g,ft=mr(e=>e.replace(Pl,(t,n)=>n?n.toUpperCase():"")),Ml=/\B([A-Z])/g,tn=mr(e=>e.replace(Ml,"-$1").toLowerCase()),br=mr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Rr=mr(e=>e?`on${br(e)}`:""),Bn=(e,t)=>!Object.is(e,t),Ir=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},or=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},vi=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let ls;const kl=()=>ls||(ls=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let Fe;class Ol{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&Fe&&(this.parent=Fe,this.index=(Fe.scopes||(Fe.scopes=[])).push(this)-1)}run(t){if(this.active){const n=Fe;try{return Fe=this,t()}finally{Fe=n}}}on(){Fe=this}off(){Fe=this.parent}stop(t){if(this.active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.active=!1}}}function Ll(e,t=Fe){t&&t.active&&t.effects.push(e)}function Bl(){return Fe}function Rl(e){Fe&&Fe.cleanups.push(e)}const Lo=e=>{const t=new Set(e);return t.w=0,t.n=0,t},mi=e=>(e.w&kt)>0,bi=e=>(e.n&kt)>0,Il=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=kt},Nl=e=>{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r<t.length;r++){const o=t[r];mi(o)&&!bi(o)?o.delete(e):t[n++]=o,o.w&=~kt,o.n&=~kt}t.length=n}},Yr=new WeakMap;let $n=0,kt=1;const Gr=30;let Ge;const Qt=Symbol(""),eo=Symbol("");class Bo{constructor(t,n=null,r){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,Ll(this,r)}run(){if(!this.active)return this.fn();let t=Ge,n=Mt;for(;t;){if(t===this)return;t=t.parent}try{returLine truncated
|
||||||
|
`),o]);else{const s=[`[Vue warn]: ${e}`,...t];o.length&&s.push(`
|
||||||
|
`,...gu(o)),console.warn(...s)}rn()}function pu(){let e=Mn[Mn.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function gu(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
|
||||||
|
`],...vu(n))}),t}function vu({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${ma(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...mu(e.props),s]:[o+s]}function mu(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Ri(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Ri(e,t,n){return de(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:ye(t)?(t=Ri(e,G(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):U(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=G(t),n?t:[`${e}=`,t])}function bt(e,t,n,r){let o;try{o=r?e(...r):e()}catch(s){wr(s,t,n)}return o}function Qe(e,t,n,r){if(U(e)){const s=bt(e,t,n,r);return s&&hi(s)&&s.catch(a=>{wr(a,t,n)}),s}const o=[];for(let s=0;s<e.length;s++)o.push(Qe(e[s],t,n,r));return o}function wr(e,t,n,r=!0){const o=t?t.vnode:null;if(t){let s=t.parent;const a=t.proxy,i=n;for(;s;){const c=s.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](e,a,i)===!1)return}s=s.parent}const l=t.appContext.config.errorHandler;if(l){bt(l,null,10,[e,a,i]);return}}bu(e,n,o,r)}function bu(e,t,n,r=!0){console.error(e)}let sr=!1,ro=!1;const He=[];let vt=0;const kn=[];let Pn=null,cn=0;const On=[];let St=null,fn=0;const Ii=Promise.resolve();let Ho=null,oo=null;function Ht(e){const t=Ho||Ii;return e?t.then(this?e.bind(this):e):t}function yu(e){let t=vt+1,n=He.length;for(;t<n;){const r=t+n>>>1;Nn(He[r])<e?t=r+1:n=r}return t}function Ni(e){(!He.length||!He.includes(e,sr&&e.allowRecurse?vt+1:vt))&&e!==oo&&(e.id==null?He.push(e):He.splice(yu(e.id),0,e),Di())}function Di(){!sr&&!ro&&(ro=!0,Ho=Ii.then(zi))}function _u(e){const t=He.indexOf(e);t>vt&&He.splice(t,1)}function Fi(e,t,n,r){z(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?r+1:r))&&n.push(e),Di()}function wu(e){Fi(e,Pn,kn,cn)}function xu(e){Fi(e,St,On,fn)}function zo(e,t=null){if(kn.length){for(oo=t,Pn=[...new Set(kn)],kn.length=0,cn=0;cn<Pn.length;cn++)Pn[cn]();Pn=null,cn=0,oo=null,zo(e,t)}}function Hi(e){if(On.length){const t=[...new Set(On)];if(On.length=0,St){St.push(...t);return}for(St=t,St.sort((n,r)=>Nn(n)-Nn(r)),fn=0;fn<St.length;fn++)St[fn]();St=null,fn=0}}const Nn=e=>e.id==null?1/0:e.id;function zi(e){ro=!1,sr=!0,zo(e),He.sort((n,r)=>Nn(n)-Nn(r));const t=We;try{for(vt=0;vt<He.length;vt++){const n=He[vt];n&&n.active!==!1&&bt(n,null,14)}}finally{vt=0,He.length=0,Hi(),sr=!1,Ho=null,(He.length||kn.length||On.length)&&zi(e)}}function Cu(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||ie;let o=n;const s=t.startsWith("update:"),a=s&&t.slice(7);if(a&&a in r){const u=`${a==="modelValue"?"model":a}Modifiers`,{number:d,trim:g}=r[u]||ie;g?o=n.map(v=>v.trim()):d&&(o=n.map(vi))}let i,l=r[i=Rr(t)]||r[i=Rr(ft(t))];!l&&s&&(l=r[i=Rr(tn(t))]),l&&Qe(l,e,6,o);const c=r[i+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,Qe(c,e,6,o)}}function Ui(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let a={},i=!1;if(!U(e)){const l=c=>{const u=Ui(c,t,!0);u&&(i=!0,Me(a,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!i?(r.set(e,null),null):(z(s)?s.forEach(l=>a[l]=null):Me(a,s),r.set(e,a),a)}function xr(e,t){return!e||!gr(t)?!1:(t=t.slice(2).replace(/Once$/,""),X(e,t[0].toLowerCase()+t.slice(1))||X(e,tn(t))||X(e,t))}let ke=null,ji=null;function ir(e){const t=ke;return ke=e,ji=e&&e.type.__scopeId||null,t}function et(e,t=ke,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&Ts(-1);const s=ir(t),a=e(...o);return ir(s),r._d&&Ts(1),a};return r._n=!0,r._c=!0,r._d=!0,r}function Dr(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:s,propsOptions:[a],slots:i,attrs:l,emit:c,render:u,renderCache:d,data:g,setupState:v,ctx:A,inheritAttrs:$}=e;let C,E;const K=ir(e);try{if(n.shapeFlag&4){const V=o||r;C=at(u.call(V,V,d,s,v,g,A)),E=l}else{const V=t;C=at(V.length>1?V(s,{attrs:l,slots:i,emit:c}):V(s,null)),E=t.props?l:Eu(l)}}catch(V){Ln.length=0,wr(V,e,1),C=ge(Je)}let q=C;if(E&&$!==!1){const V=Object.keys(E),{shapeFlag:pe}=q;V.length&&pe&7&&(a&&V.some(Po)&&(E=Tu(E,a)),q=en(q,E))}return n.dirs&&(q.dirs=q.dirs?q.dirs.concat(n.dirs):n.dirs),n.transition&&(q.transition=n.transition),C=q,ir(K),C}const Eu=e=>{let t;for(const n in e)(n==="class"||n==="style"||gr(n))&&((t||(t={}))[n]=e[n]);return t},Tu=(e,t)=>{const n={};for(const r in e)(!Po(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Su(e,t,n){const{props:r,children:o,component:s}=e,{props:a,children:i,patchFlag:l}=t,c=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?gs(r,a,c):!!a;if(l&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const g=u[d];if(a[g]!==r[g]&&!xr(c,g))return!0}}}else return(o||i)&&(!i||!i.$stable)?!0:r===a?!1:r?a?gs(r,a,c):!0:!!a;return!1}function gs(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const s=r[o];if(t[s]!==e[s]&&!xr(n,s))return!0}return!1}
Line truncated
|
||||||
|
height:0 !important;
|
||||||
|
visibility:hidden !important;
|
||||||
|
overflow:hidden !important;
|
||||||
|
position:absolute !important;
|
||||||
|
z-index:-1000 !important;
|
||||||
|
top:0 !important;
|
||||||
|
right:0 !important;
|
||||||
|
`,Rd=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function Id(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),r=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),o=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:Rd.map(a=>`${a}:${t.getPropertyValue(a)}`).join(";"),paddingSize:r,borderSize:o,boxSizing:n}}function Qs(e,t=1,n){var r;Ze||(Ze=document.createElement("textarea"),document.body.appendChild(Ze));const{paddingSize:o,borderSize:s,boxSizing:a,contextStyle:i}=Id(e);Ze.setAttribute("style",`${i};${Bd}`),Ze.value=e.value||e.placeholder||"";let l=Ze.scrollHeight;const c={};a==="border-box"?l=l+s:a==="content-box"&&(l=l-o),Ze.value="";const u=Ze.scrollHeight-o;if(bo(t)){let d=u*t;a==="border-box"&&(d=d+o+s),l=Math.max(d,l),c.minHeight=`${d}px`}if(bo(n)){let d=u*n;a==="border-box"&&(d=d+o+s),l=Math.min(d,l)}return c.height=`${l}px`,(r=Ze.parentNode)==null||r.removeChild(Ze),Ze=void 0,c}const Nd=Pr({size:Ia,disabled:Boolean,modelValue:{type:mt([String,Number,Object]),default:""},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:mt([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},placeholder:{type:String},form:{type:String,default:""},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:dr,default:""},prefixIcon:{type:dr,default:""},label:{type:String},tabindex:{type:[Number,String]},validateEvent:{type:Boolean,default:!0},inputStyle:{type:mt([Object,Array,String]),default:()=>xd({})}}),Dd={[xo]:e=>de(e),input:e=>de(e),change:e=>de(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},Fd=["type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder"],Hd=["tabindex","disabled","readonly","autocomplete","aria-label","placeholder"],zd={name:"ElInput",inheritAttrs:!1},Ud=ve(Bt(pt({},zd),{props:Nd,emits:Dd,setup(e,{expose:t,emit:n}){const r=e,o={suffix:"append",prefix:"prepend"},s=wn(),a=bc(),i=ba(),l=Td(),{form:c,formItem:u}=Da(),d=Na(),g=Qo(),v=bn("input"),A=bn("textarea"),$=Nr(),C=Nr(),E=Ce(!1),K=Ce(!1),q=Ce(!1),V=Ce(!1),pe=Nr(r.inputStyle),Ee=Z(()=>$.value||C.value),W=Z(()=>{var p;return(p=c==null?void 0:c.statusIcon)!=null?p:!1}),ae=Z(()=>(u==null?void 0:u.validateState)||""),re=Z(()=>vd[ae.value]),_e=Z(()=>V.value?ud:Uf),me=Z(()=>[a.style,r.inputStyle]),O=Z(()=>[r.inputStyle,pe.value,{resize:r.resize}]),ne=Z(()=>Zc(r.modelValue)?"":String(r.modelValue)),Te=Z(()=>r.clearable&&!g.value&&!r.readonly&&!!ne.value&&(E.value||K.value)),je=Z(()=>r.showPassword&&!g.value&&!r.readonly&&(!!ne.value||E.value)),le=Z(()=>r.showWordLimit&&!!l.value.maxlength&&(r.type==="text"||r.type==="textarea")&&!g.value&&!r.readonly&&!r.showPassword),ee=Z(()=>Array.from(ne.value).length),te=Z(()=>!!le.value&&ee.value>Number(l.value.maxlength)),Re=Z(()=>!!i.suffix||!!r.suffixIcon||Te.value||r.showPassword||le.value||!!ae.value&&W.value),ot=()=>{const{type:p,autosize:b}=r;if(!(!Hn||p!=="textarea"))if(b){const T=he(b)?b.minRows:void 0,x=he(b)?b.maxRows:void 0;pe.value=pt({},Qs(C.value,T,x))}else pe.value={minHeight:Qs(C.value).minHeight}},I=()=>{const p=Ee.value;!p||p.value===ne.value||(p.value=ne.value)},L=p=>{const{el:b}=s.vnode;if(!b)return;const x=Array.from(b.querySelectorAll(`.${v.e(p)}`)).find(M=>M.parentNode===b);if(!x)return;const B=o[p];i[B]?x.style.transform=`translateX(${p==="suffix"?"-":""}${b.querySelector(`.${v.be("group",B)}`).offsetWidth}px)`:x.removeAttribute("style")},P=()=>{L("prefix"),L("suffix")},D=async p=>{const{value:b}=p.target;q.value||b!==ne.value&&(n(xo,b),n("input",b),await Ht(),I())},N=p=>{n("change",p.target.value)},Q=p=>{n("compositionstart",p),q.value=!0},ce=p=>{var b;n("compositionupdate",p);const T=(b=p.target)==null?void 0:b.value,x=T[T.length-1]||"";q.value=!wd(x)},Ke=p=>{n("compositionend",p),q.value&&(q.value=!1,D(p))},xn=()=>{V.value=!V.value,ht()},ht=async()=>{var p;await Ht(),(p=Ee.value)==null||p.focus()},Cn=()=>{var p;return(p=Ee.value)==null?void 0:p.blur()},on=p=>{E.value=!0,n("focus",p)},f=p=>{var b;E.value=!1,n("blur",p),r.validateEvent&&((b=u==null?void 0:u.validate)==null||b.call(u,"blur").catch(T=>void 0))},h=p=>{K.value=!1,n("mouseleave",p)},m=p=>{K.value=!0,n("mouseenter",p)},_=p=>{n("keydown",p)},w=()=>{var p;(p=Ee.value)==null||p.select()},S=()=>
Line truncated
|
||||||
|
`),function(i){if(s=i.indexOf(":"),r=Qr.trim(i.substr(0,s)).toLowerCase(),o=Qr.trim(i.substr(s+1)),r){if(n[r]&&ip.indexOf(r)>=0)return;r==="set-cookie"?n[r]=(n[r]?n[r]:[]).concat([o]):n[r]=n[r]?n[r]+", "+o:o}}),n},ei=Be,lp=ei.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function o(s){var a=s;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){var i=ei.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}();function Yo(e){this.message=e}Yo.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Yo.prototype.__CANCEL__=!0;var Or=Yo,Zn=Be,up=Gh,cp=ep,fp=Va,dp=sp,hp=ap,pp=lp,Jr=Ja,gp=Qa,vp=Or,ti=function(t){return new Promise(function(r,o){var s=t.data,a=t.headers,i=t.responseType,l;function c(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}Zn.isFormData(s)&&delete a["Content-Type"];var u=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",g=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";a.Authorization="Basic "+btoa(d+":"+g)}var v=dp(t.baseURL,t.url);u.open(t.method.toUpperCase(),fp(v,t.params,t.paramsSerializer),!0),u.timeout=t.timeout;function A(){if(!!u){var C="getAllResponseHeaders"in u?hp(u.getAllResponseHeaders()):null,E=!i||i==="text"||i==="json"?u.responseText:u.response,K={data:E,status:u.status,statusText:u.statusText,headers:C,config:t,request:u};up(function(V){r(V),c()},function(V){o(V),c()},K),u=null}}if("onloadend"in u?u.onloadend=A:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(A)},u.onabort=function(){!u||(o(Jr("Request aborted",t,"ECONNABORTED",u)),u=null)},u.onerror=function(){o(Jr("Network Error",t,null,u)),u=null},u.ontimeout=function(){var E=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",K=t.transitional||gp;t.timeoutErrorMessage&&(E=t.timeoutErrorMessage),o(Jr(E,t,K.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",u)),u=null},Zn.isStandardBrowserEnv()){var $=(t.withCredentials||pp(v))&&t.xsrfCookieName?cp.read(t.xsrfCookieName):void 0;$&&(a[t.xsrfHeaderName]=$)}"setRequestHeader"in u&&Zn.forEach(a,function(E,K){typeof s=="undefined"&&K.toLowerCase()==="content-type"?delete a[K]:u.setRequestHeader(K,E)}),Zn.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),i&&i!=="json"&&(u.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&u.addEventListener("progress",t.onDownloadProgress),typeof t.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(l=function(C){!u||(o(!C||C&&C.type?new vp("canceled"):C),u.abort(),u=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l))),s||(s=null),u.send(s)})},Ae=Be,ni=Xh,mp=Wa,bp=Qa,yp={"Content-Type":"application/x-www-form-urlencoded"};function ri(e,t){!Ae.isUndefined(e)&&Ae.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function _p(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=ti),e}function wp(e,t,n){if(Ae.isString(e))try{return(t||JSON.parse)(e),Ae.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var Lr={transitional:bp,adapter:_p(),transformRequest:[function(t,n){return ni(n,"Accept"),ni(n,"Content-Type"),Ae.isFormData(t)||Ae.isArrayBuffer(t)||Ae.isBuffer(t)||Ae.isStream(t)||Ae.isFile(t)||Ae.isBlob(t)?t:Ae.isArrayBufferView(t)?t.buffer:Ae.isURLSearchParams(t)?(ri(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):Ae.isObject(t)||n&&n["Content-Type"]==="application/json"?(ri(n,"application/json"),wp(t)):t}],transformResponse:[function(t){var n=this.transitional||Lr.transitional,r=n&&n.silentJSONParsing,o=n&&n.forcedJSONParsing,s=!r&&this.responseType==="json";if(s||o&&Ae.isString(t)&&t.length)try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?mp(a,this,"E_JSON_PARSE"):a}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Ae.forEach(["delete","get","head"],function(t){Lr.headers[t]={}});Ae.forEach(["post","put","patch"],function(t){Lr.headers[t]=Ae.merge(yp)});var Go=Lr,xp=Be,Cp=Go,Ep=function(t,n,r){var o=this||Cp;return xp.forEach(r,function(a){t=a.call(o,t,n)}),t},Xa=function(t){return!!(t&&t.__CANCEL__)},oi=
Line truncated
|
||||||
|
* qrcode.vue v3.3.3
|
||||||
|
* A Vue.js component to generate QRCode.
|
||||||
|
* © 2017-2021 @scopewu(https://github.com/scopewu)
|
||||||
|
* MIT License.
|
||||||
|
*//*! *****************************************************************************
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
purpose with or without fee is hereby granted.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
***************************************************************************** */var pr=function(){return pr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},pr.apply(this,arguments)},nl={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3},jp=nl;function rl(e){this.mode=jp.MODE_8BIT_BYTE,this.data=e}rl.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}};var Kp=rl,ts={L:1,M:0,Q:3,H:2},Yn=ts;function lt(e,t){this.totalCount=e,this.dataCount=t}lt.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];lt.getRSBlocks=function(e,t){var n=lt.getRsBlockTable(e,t);if(n==null)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,o=new Array,s=0;s<r;s++)for(var a=n[s*3+0],i=n[s*3+1],l=n[s*3+2],c=0;c<a;c++)o.push(new lt(i,l));return o};lt.getRsBlockTable=function(e,t){switch(t){case Yn.L:return lt.RS_BLOCK_TABLE[(e-1)*4+0];case Yn.M:return lt.RS_BLOCK_TABLE[(e-1)*4+1];case Yn.Q:return lt.RS_BLOCK_TABLE[(e-1)*4+2];case Yn.H:return lt.RS_BLOCK_TABLE[(e-1)*4+3];default:return}};var qp=lt;function ol(){this.buffer=new Array,this.length=0}ol.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Vp=ol,tt={glog:function(e){if(e<1)throw new Error("glog("+e+")");return tt.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return tt.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var $e=0;$e<8;$e++)tt.EXP_TABLE[$e]=1<<$e;for(var $e=8;$e<256;$e++)tt.EXP_TABLE[$e]=tt.EXP_TABLE[$e-4]^tt.EXP_TABLE[$e-5]^tt.EXP_TABLE[$e-6]^tt.EXP_TABLE[$e-8];for(var $e=0;$e<255;$e++)tt.LOG_TABLE[tt.EXP_TABLE[$e]]=$e;var sl=tt,Ft=sl;function rr(e,t){if(e.length==null)throw new Error(e.length+"/Line truncated
|
||||||
|
font-family: "socialshare";
|
||||||
|
src: url("../fonts/iconfont.eot");
|
||||||
|
src: url("../fonts/iconfont.eot?#iefix") format("embedded-opentype"), url("../fonts/iconfont.woff") format("woff"), url("../fonts/iconfont.ttf") format("truetype"), url("../fonts/iconfont.svg#iconfont") format("svg")
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share {
|
||||||
|
font-family: "socialshare" !important;
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-webkit-text-stroke-width: 0.2px;
|
||||||
|
-moz-osx-font-smoothing: grayscale
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share * {
|
||||||
|
font-family: "socialshare" !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-tencent:before {
|
||||||
|
content: "\\f07a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-qq:before {
|
||||||
|
content: "\\f11a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-weibo:before {
|
||||||
|
content: "\\f12a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat:before {
|
||||||
|
content: "\\f09a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-douban:before {
|
||||||
|
content: "\\f10a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-heart:before {
|
||||||
|
content: "\\f20a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-like:before {
|
||||||
|
content: "\\f00a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-qzone:before {
|
||||||
|
content: "\\f08a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-linkedin:before {
|
||||||
|
content: "\\f01a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-diandian:before {
|
||||||
|
content: "\\f05a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-facebook:before {
|
||||||
|
content: "\\f03a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-google:before {
|
||||||
|
content: "\\f04a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-twitter:before {
|
||||||
|
content: "\\f06a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share a {
|
||||||
|
position: relative;
|
||||||
|
text-decoration: none;
|
||||||
|
margin: 4px;
|
||||||
|
display: inline-block;
|
||||||
|
outline: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .social-share-icon {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
font-size: 20px;
|
||||||
|
border-radius: 50%;
|
||||||
|
line-height: 32px;
|
||||||
|
border: 1px solid #666;
|
||||||
|
color: #666;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
transition: background 0.6s ease-out 0s
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .social-share-icon:hover {
|
||||||
|
background: #666;
|
||||||
|
color: #fff
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-weibo {
|
||||||
|
color: #ff763b;
|
||||||
|
border-color: #ff763b
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-weibo:hover {
|
||||||
|
background: #ff763b
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-tencent {
|
||||||
|
color: #56b6e7;
|
||||||
|
border-color: #56b6e7
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-tencent:hover {
|
||||||
|
background: #56b6e7
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-qq {
|
||||||
|
color: #56b6e7;
|
||||||
|
border-color: #56b6e7
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-qq:hover {
|
||||||
|
background: #56b6e7
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-qzone {
|
||||||
|
color: #FDBE3D;
|
||||||
|
border-color: #FDBE3D
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-qzone:hover {
|
||||||
|
background: #FDBE3D
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-douban {
|
||||||
|
color: #33b045;
|
||||||
|
border-color: #33b045
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-douban:hover {
|
||||||
|
background: #33b045
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-linkedin {
|
||||||
|
color: #0077B5;
|
||||||
|
border-color: #0077B5
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-linkedin:hover {
|
||||||
|
background: #0077B5
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-facebook {
|
||||||
|
color: #44619D;
|
||||||
|
border-color: #44619D
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-facebook:hover {
|
||||||
|
background: #44619D
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-google {
|
||||||
|
color: #db4437;
|
||||||
|
border-color: #db4437
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-google:hover {
|
||||||
|
background: #db4437
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-twitter {
|
||||||
|
color: #55acee;
|
||||||
|
border-color: #55acee
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-twitter:hover {
|
||||||
|
background: #55acee
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-diandian {
|
||||||
|
color: #307DCA;
|
||||||
|
border-color: #307DCA
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-diandian:hover {
|
||||||
|
background: #307DCA
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat {
|
||||||
|
position: relative;
|
||||||
|
color: #7bc549;
|
||||||
|
border-color: #7bc549
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat:hover {
|
||||||
|
background: #7bc549
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode {
|
||||||
|
display: none;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 9;
|
||||||
|
top: -205px;
|
||||||
|
left: -84px;
|
||||||
|
width: 200px;
|
||||||
|
height: 192px;
|
||||||
|
color: #666;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0 2px 10px #aaa;
|
||||||
|
transition: all 200ms;
|
||||||
|
-webkit-tansition: all 350ms;
|
||||||
|
-moz-transition: all 350ms
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode.bottom {
|
||||||
|
top: 40px;
|
||||||
|
left: -84px
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode.bottom:after {
|
||||||
|
display: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode h4 {
|
||||||
|
font-weight: normal;
|
||||||
|
height: 26px;
|
||||||
|
line-height: 26px;
|
||||||
|
font-size: 12px;
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
color: #777
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode .qrcode {
|
||||||
|
width: 105px;
|
||||||
|
margin: 10px auto
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode .qrcode table {
|
||||||
|
margin: 0 !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode .help p {
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 16px;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode:after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -6px;
|
||||||
|
bottom: -13px;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-width: 8px 6px 6px 6px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #fff transparent transparent transparent
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat:hover .wechat-qrcode {
|
||||||
|
display: block
|
||||||
|
}
|
||||||
|
`),vn.install=e=>{e.component(vn.name,vn)};var hl={exports:{}};/*!
|
||||||
|
* clipboard.js v2.0.10
|
||||||
|
* https://clipboardjs.com/
|
||||||
|
*
|
||||||
|
* Licensed MIT © Zeno Rocha
|
||||||
|
*/(function(e,t){(function(r,o){e.exports=o()})(vh,function(){return function(){var n={686:function(s,a,i){i.d(a,{default:function(){return ot}});var l=i(279),c=i.n(l),u=i(370),d=i.n(u),g=i(817),v=i.n(g);function A(I){try{return document.execCommand(I)}catch{return!1}}var $=function(L){var P=v()(L);return A("cut"),P},C=$;function E(I){var L=document.documentElement.getAttribute("dir")==="rtl",P=document.createElement("textarea");P.style.fontSize="12pt",P.style.border="0",P.style.padding="0",P.style.margin="0",P.style.position="absolute",P.style[L?"right":"left"]="-9999px";var D=window.pageYOffset||document.documentElement.scrollTop;return P.style.top="".concat(D,"px"),P.setAttribute("readonly",""),P.value=I,P}var K=function(L){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},D="";if(typeof L=="string"){var N=E(L);P.container.appendChild(N),D=v()(N),A("copy"),N.remove()}else D=v()(L),A("copy");return D},q=K;function V(I){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V=function(P){return typeof P}:V=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},V(I)}var pe=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},P=L.action,D=P===void 0?"copy":P,N=L.container,Q=L.target,ce=L.text;if(D!=="copy"&&D!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(Q!==void 0)if(Q&&V(Q)==="object"&&Q.nodeType===1){if(D==="copy"&&Q.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(D==="cut"&&(Q.hasAttribute("readonly")||Q.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(ce)return q(ce,{container:N});if(Q)return D==="cut"?C(Q):q(Q,{container:N})},Ee=pe;function W(I){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W=function(P){return typeof P}:W=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},W(I)}function ae(I,L){if(!(I instanceof L))throw new TypeError("Cannot call a class as a function")}function re(I,L){for(var P=0;P<L.length;P++){var D=L[P];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(I,D.key,D)}}function _e(I,L,P){return L&&re(I.prototype,L),P&&re(I,P),I}function me(I,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(L&&L.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),L&&O(I,L)}function O(I,L){return O=Object.setPrototypeOf||function(D,N){return D.__proto__=N,D},O(I,L)}function ne(I){var L=le();return function(){var D=ee(I),N;if(L){var Q=ee(this).constructor;N=Reflect.construct(D,arguments,Q)}else N=D.apply(this,arguments);return Te(this,N)}}function Te(I,L){return L&&(W(L)==="object"||typeof L=="function")?L:je(I)}function je(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}function le(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function ee(I){return ee=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)},ee(I)}function te(I,L){var P="data-clipboard-".concat(I);if(!!L.hasAttribute(P))return L.getAttribute(P)}var Re=function(I){me(P,I);var L=ne(P);function P(D,N){var Q;return ae(this,P),Q=L.call(this),Q.resolveOptions(N),Q.listenClick(D),Q}return _e(P,[{key:"resolveOptions",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof N.action=="function"?N.action:this.defaultAction,this.target=typeof N.target=="function"?N.target:this.defaultTarget,this.text=typeof N.text=="function"?N.text:this.defaultText,this.container=W(N.container)==="object"?N.container:document.body}},{key:"listenClick",value:function(N){var Q=this;this.listener=d()(N,"click",function(ce){return Q.onClick(ce)})}},{key:"onClick",value:function(N){var Q=N.delegateTarget||N.currentTarget,ce=this.action(Q)||"copy",Ke=Ee({action:ce,container:this.container,target:this.target(Q),text:this.text(Q)});this.emit(Ke?"success":"error",{action:ce,text:Ke,trigger:Q,clearSelection:function(){Q&&Q.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(N){return te("action",N)}},{key:"defaultTarget",value:function(N){var Q=te("target",N);if(Q)return document.querySelector(Q)}},{key:"defaultText",value:function(N){return te("text",N)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(N){var Q=Line truncated
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
@charset "UTF-8";:root{--el-color-white:#ffffff;--el-color-black:#000000;--el-color-primary-rgb:64,158,255;--el-color-success-rgb:103,194,58;--el-color-warning-rgb:230,162,60;--el-color-danger-rgb:245,108,108;--el-color-error-rgb:245,108,108;--el-color-info-rgb:144,147,153;--el-font-size-extra-large:20px;--el-font-size-large:18px;--el-font-size-medium:16px;--el-font-size-base:14px;--el-font-size-small:13px;--el-font-size-extra-small:12px;--el-font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","\5fae\8f6f\96c5\9ed1",Arial,sans-serif;--el-font-weight-primary:500;--el-font-line-height-primary:24px;--el-index-normal:1;--el-index-top:1000;--el-index-popper:2000;--el-border-radius-base:4px;--el-border-radius-small:2px;--el-border-radius-round:20px;--el-border-radius-circle:100%;--el-transition-duration:.3s;--el-transition-duration-fast:.2s;--el-transition-function-ease-in-out-bezier:cubic-bezier(.645, .045, .355, 1);--el-transition-function-fast-bezier:cubic-bezier(.23, 1, .32, 1);--el-transition-all:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);--el-transition-fade:opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-md-fade:transform var(--el-transition-duration) var(--el-transition-function-fast-bezier),opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-fade-linear:opacity var(--el-transition-duration-fast) linear;--el-transition-border:border-color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-box-shadow:box-shadow var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-color:color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier)}:root{color-scheme:light;--el-color-white:#ffffff;--el-color-black:#000000;--el-color-primary:#409eff;--el-color-primary-light-3:#79bbff;--el-color-primary-light-5:#a0cfff;--el-color-primary-light-7:#c6e2ff;--el-color-primary-light-8:#d9ecff;--el-color-primary-light-9:#ecf5ff;--el-color-primary-dark-2:#337ecc;--el-color-success:#67c23a;--el-color-success-light-3:#95d475;--el-color-success-light-5:#b3e19d;--el-color-success-light-7:#d1edc4;--el-color-success-light-8:#e1f3d8;--el-color-success-light-9:#f0f9eb;--el-color-success-dark-2:#529b2e;--el-color-warning:#e6a23c;--el-color-warning-light-3:#eebe77;--el-color-warning-light-5:#f3d19e;--el-color-warning-light-7:#f8e3c5;--el-color-warning-light-8:#faecd8;--el-color-warning-light-9:#fdf6ec;--el-color-warning-dark-2:#b88230;--el-color-danger:#f56c6c;--el-color-danger-light-3:#f89898;--el-color-danger-light-5:#fab6b6;--el-color-danger-light-7:#fcd3d3;--el-color-danger-light-8:#fde2e2;--el-color-danger-light-9:#fef0f0;--el-color-danger-dark-2:#c45656;--el-color-error:#f56c6c;--el-color-error-light-3:#f89898;--el-color-error-light-5:#fab6b6;--el-color-error-light-7:#fcd3d3;--el-color-error-light-8:#fde2e2;--el-color-error-light-9:#fef0f0;--el-color-error-dark-2:#c45656;--el-color-info:#909399;--el-color-info-light-3:#b1b3b8;--el-color-info-light-5:#c8c9cc;--el-color-info-light-7:#dedfe0;--el-color-info-light-8:#e9e9eb;--el-color-info-light-9:#f4f4f5;--el-color-info-dark-2:#73767a;--el-bg-color:#ffffff;--el-bg-color-page:#ffffff;--el-bg-color-overlay:#ffffff;--el-text-color-primary:#303133;--el-text-color-regular:#606266;--el-text-color-secondary:#909399;--el-text-color-placeholder:#a8abb2;--el-text-color-disabled:#c0c4cc;--el-border-color:#dcdfe6;--el-border-color-light:#e4e7ed;--el-border-color-lighter:#ebeef5;--el-border-color-extra-light:#f2f6fc;--el-border-color-dark:#d4d7de;--el-border-color-darker:#cdd0d6;--el-fill-color:#f0f2f5;--el-fill-color-light:#f5f7fa;--el-fill-color-lighter:#fafafa;--el-fill-color-extra-light:#fafcff;--el-fill-color-dark:#ebedf0;--el-fill-color-darker:#e6e8eb;--el-fill-color-blank:#ffffff;--el-box-shadow:0px 12px 32px 4px rgba(0, 0, 0, .04),0px 8px 20px rgba(0, 0, 0, .08);--el-box-shadow-light:0px 0px 12px rgba(0, 0, 0, .12);--el-box-shadow-lighter:0px 0px 6px rgba(0, 0, 0, .12);--el-box-shadow-dark:0px 16px 48px 16px rgba(0, 0, 0, .08),0px 12px 32px rgba(0, 0, 0, .12),0px 8px 16px -8px rgba(0, 0, 0, .16);--el-disabled-bg-color:var(--el-fill-color-light);--el-disabled-text-color:var(--el-text-color-placeholder);--el-disabled-border-color:var(--el-border-color-light);--el-overlay-color:rgba(0, 0, 0, .8);--el-overlay-color-light:rgba(0, 0, 0, .7);--el-overlay-color-lighter:rgba(0, 0, 0, .5);--el-mask-color:rgba(255, 255, 255, .9);--el-mask-color-extra-light:rgba(255, 255, 255, .3);--el-border-width:1px;--el-border-style:solid;--el-border-color-hover:var(--el-text-color-disabled);--el-border:var(--el-border-width) var(--el-border-style) var(--el-border-color);--el-svg-monochrome-grey:var(--el-border-color)}.fade-in-linear-enter-active,.fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.fade-in-linLine truncated
|
||||||
Vendored
BIN
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Vendored
BIN
Binary file not shown.
Vendored
+88
@@ -0,0 +1,88 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<metadata>
|
||||||
|
Created by FontForge 20120731 at Sat Nov 28 22:48:50 2015
|
||||||
|
By Ads
|
||||||
|
</metadata>
|
||||||
|
<defs>
|
||||||
|
<font id="iconfont" horiz-adv-x="1024" >
|
||||||
|
<font-face
|
||||||
|
font-family="iconfont"
|
||||||
|
font-weight="500"
|
||||||
|
font-stretch="normal"
|
||||||
|
units-per-em="1024"
|
||||||
|
panose-1="2 0 6 3 0 0 0 0 0 0"
|
||||||
|
ascent="896"
|
||||||
|
descent="-128"
|
||||||
|
x-height="792"
|
||||||
|
bbox="-0.097561 -77 1024.92 839"
|
||||||
|
underline-thickness="50"
|
||||||
|
underline-position="-100"
|
||||||
|
unicode-range="U+0078-F20A"
|
||||||
|
/>
|
||||||
|
<missing-glyph horiz-adv-x="374"
|
||||||
|
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
|
||||||
|
<glyph glyph-name=".notdef" horiz-adv-x="374"
|
||||||
|
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
|
||||||
|
<glyph glyph-name=".null" horiz-adv-x="0"
|
||||||
|
/>
|
||||||
|
<glyph glyph-name="nonmarkingreturn" horiz-adv-x="341"
|
||||||
|
/>
|
||||||
|
<glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
|
||||||
|
d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5
|
||||||
|
t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5
|
||||||
|
t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" />
|
||||||
|
<glyph glyph-name="uniF00A" unicode=""
|
||||||
|
d="M911 512l-334 1q19 79 23 116q4 45 -3 76q-11 47 -34 90q-6 12 -17 18.5t-24 6.5h-65q-13 0 -23.5 -6.5t-17 -17t-6.5 -23.5v-35v-32v-26q0 -10 -1 -11q-12 -26 -26.5 -52t-29.5 -51.5t-32 -49.5q-6 -9 -11.5 -17t-11.5 -16t-12.5 -16t-13.5 -15q-13 -14 -13 -32v-411
|
||||||
|
q0 -19 13 -33q28 -28 73 -28q323 1 440 1q13 0 24 6t17 17l119 203q6 11 9 22.5t3 23.5l1 244q0 13 -6.5 24t-17 17t-23.5 6zM155 445h-42q-13 0 -24 -6t-17 -17t-6 -24v-403q0 -19 13.5 -33t33.5 -14h42q13 0 23.5 6.5t17 17t6.5 23.5v403q0 20 -14 33.5t-33 13.5z" />
|
||||||
|
<glyph glyph-name="uniF01A" unicode=""
|
||||||
|
d="M260 740q0 -41 -29.5 -69.5t-76.5 -28.5q-45 0 -74 28.5t-29 69.5q0 43 29 71t76 28t74.5 -28t29.5 -71zM57 -69v633h197v-633h-197zM371 361q0 89 -4 203h170l10 -88h4q61 103 194 103q103 0 165.5 -69t62.5 -204v-375h-197v351q0 137 -100 137q-72 0 -101 -74
|
||||||
|
q-6 -12 -6 -49v-365h-198v430z" />
|
||||||
|
<glyph glyph-name="uniF03A" unicode=""
|
||||||
|
d="M751 815v-142h-84q-46 0 -62 -19t-16 -58v-101h157l-21 -158h-136v-407h-164v407h-136v158h136v117q0 100 56 154.5t148 54.5q79 0 122 -6z" />
|
||||||
|
<glyph glyph-name="uniF04A" unicode=""
|
||||||
|
d="M629 830h-245q-37 0 -69 -4t-71.5 -19t-71.5 -41q-37 -31 -56.5 -72.5t-19.5 -82.5q0 -46 22.5 -87t68.5 -68t106 -27h7h8q2 0 7.5 0.5t7.5 1t8 0.5q-1 -1 -2 -4t-1.5 -4t-1.5 -4l-2 -5q0 -1 -1 -3.5t-1.5 -4.5t-1 -4.5t-0.5 -5t-0.5 -5t-0.5 -5.5q0 -17 6.5 -33
|
||||||
|
t11.5 -23t18 -23q-18 -1 -26.5 -1.5t-29 -2.5t-33.5 -4.5t-34 -6.5t-36.5 -9t-34 -12.5t-33.5 -16.5q-48 -28 -69.5 -66.5t-21.5 -75.5q0 -69 66.5 -117.5t188.5 -48.5q74 0 134.5 19t98.5 50.5t58.5 70t20.5 80.5q0 19 -3.5 36t-11.5 32t-15 26.5t-21 24.5t-23 21t-26 22
|
||||||
|
l-43 32q-9 8 -14 12.5t-10.5 15.5t-5.5 22.5t6 23t11 17t16 16.5q24 18 37.5 30.5t30 33t24 45.5t7.5 56t-8.5 57.5t-24 46.5t-25.5 30t-26 22h74zM524 120q0 -36 -19.5 -64t-59.5 -44.5t-95 -16.5q-94 0 -151.5 39.5t-57.5 102.5q0 83 102 119q57 19 125 19h6h4
|
||||||
|
q3 0 4.5 -0.5t3.5 -0.5h5q2 0 4 -1q75 -51 102 -81t27 -72zM429 494q-33 -33 -80 -33q-36 0 -66 21t-47 53.5t-26 67t-9 65.5q0 54 26 86q14 17 36.5 27.5t46.5 10.5q46 0 81.5 -37t51.5 -84.5t16 -92.5v-10q0 -4 -1 -10.5t-2 -12.5t-3.5 -13t-5.5 -13.5t-7.5 -13
|
||||||
|
t-10.5 -11.5zM865 653v118h-59v-118h-119v-58h119v-118h59v118h118v58h-118z" />
|
||||||
|
<glyph glyph-name="uniF05A" unicode=""
|
||||||
|
d="M540 185h370v370h-369l-1 85h285v114h-285v85h-142v-284h-256v-370h199v-258zM284 279v175h484v-175h-484zM853 100q-17 0 -33 -6.5t-27.5 -18t-18 -27.5t-6.5 -33.5t6.5 -33.5t18 -27.5t27.5 -18.5t33 -7q35 0 60 25.5t25 61t-25 60.5t-60 25zM597.5 100
|
||||||
|
q-35.5 0 -60.5 -25t-25 -60.5t25 -61t60.5 -25.5t60 25.5t24.5 61t-24.5 60.5t-60 25zM171 100q-14 0 -27 -4t-23.5 -12t-18.5 -18.5t-12 -24t-4 -27.5q0 -35 24.5 -60.5t60 -25.5t60.5 25.5t25 60.5q0 18 -7 34t-18 27.5t-27 18t-33 6.5z" />
|
||||||
|
<glyph glyph-name="uniF06A" unicode="" horiz-adv-x="1025"
|
||||||
|
d="M1024 702q-58 -26 -121 -34q33 20 57 50t36 67q-63 -37 -134 -51q-62 66 -153 66q-57 0 -105.5 -28t-76.5 -76.5t-28 -105.5q0 -8 0.5 -16t2 -16t2.5 -16q-129 7 -241.5 65t-191.5 155q-13 -24 -20.5 -51t-7.5 -55q0 -36 11.5 -69t32.5 -60t49 -46q-50 2 -95 26v-2
|
||||||
|
q0 -76 48 -134t121 -72q-27 -8 -56 -8q-5 0 -10 1h-10q-5 1 -9.5 1.5t-9.5 1.5q20 -63 74 -103.5t122 -42.5q-36 -28 -77.5 -48t-88 -31t-95.5 -11q-25 0 -50 3q147 -94 322 -94q112 0 210 35.5t168 95t120.5 136.5t75 161.5t24.5 169.5q0 14 -1 27q8 5 15.5 11t14.5 12
|
||||||
|
l14 14q7 6 13.5 12.5t13 14t12 14.5t11.5 15t11 16z" />
|
||||||
|
<glyph glyph-name="uniF07A" unicode=""
|
||||||
|
d="M435 826q-94 -21 -163.5 -85.5t-98.5 -155.5t-8 -186q7 -34 21 -66q4 -9 12.5 -15t18 -7t18.5 3q15 6 20.5 20.5t-0.5 28.5q-11 25 -17 53q-17 74 6 146t78 123t129.5 67.5t145.5 -6.5t121.5 -78.5t67 -130t-6 -146.5t-77.5 -123t-130 -67q-44 -10 -89 -5q-15 1 -27 -9
|
||||||
|
t-13.5 -25t8.5 -27.5t25 -13.5q56 -6 112 7q94 20 164 85t98.5 155.5t8 185t-84.5 164.5t-154.5 99t-184.5 9zM542 339q57 13 88 62t18 106q-8 37 -33 64.5t-60.5 39t-72.5 3.5q-57 -13 -88 -62t-19 -106q5 -21 16 -41q-70 -81 -105 -197t-16 -239q2 -16 14.5 -25t28.5 -7
|
||||||
|
q1 1 2 1q14 3 22.5 15.5t6.5 26.5q-17 105 12.5 204.5t88.5 168.5q46 -25 97 -14z" />
|
||||||
|
<glyph glyph-name="uniF08A" unicode=""
|
||||||
|
d="M767 277q-9 -8 -11 -13.5t0 -16.5l4 -24q-183 2 -297 18q-6 2 0 5l289 201q11 7 -1 9q-7 1 -19 3t-21 3l-9 1q-90 11 -190 11q-170 0 -303 -30h8q225 0 374 -23q7 -2 0 -6l-289 -206l-5 -4q-2 -4 5 -5q45 -6 94 -9q59 -4 116 -4q176 0 312 32l5 1q-19 -15 -63 -30
|
||||||
|
l42 -226q2 -12 -1.5 -19t-11 -7.5t-18.5 4.5l-241 140q-24 15 -49 -1l-240 -139q-16 -9 -25 -2.5t-5 24.5l53 284q3 9 1.5 14t-8.5 12l-210 193q-9 8 -10.5 16t4.5 13t18 6l268 30q15 2 21 5.5t12 14.5l126 262q9 17 20.5 17t19.5 -17l118 -262q5 -13 11 -17t21 -6l277 -27
|
||||||
|
q18 -2 21.5 -12t-9.5 -23z" />
|
||||||
|
<glyph glyph-name="uniF09A" unicode=""
|
||||||
|
d="M704 547q-87 0 -163 -38t-120 -103q-22 -32 -33.5 -67t-11.5 -73q0 -41 14 -78h-18q-64 0 -124 18l-124 -56l30 102q-64 43 -101 105t-37 134q0 124 104.5 213t251.5 89q128 0 227 -70t122 -176h-17zM218 557q8 -7 17 -10.5t19 -3.5q22 0 36.5 14.5t14.5 35.5q0 11 -4 20
|
||||||
|
t-11 16q-2 2 -4 3l-4 4l-4 2l-4 2l-4 2h-6l-4 2h-6q-21 0 -36 -15q-7 -7 -10.5 -16t-3.5 -20q0 -7 1.5 -13.5t5 -12t7.5 -10.5zM1008 266q0 -126 -116 -204l23 -87l-105 49q-50 -16 -106 -16q-124 0 -213 75.5t-89 182.5q0 70 40.5 129t110.5 93q23 11 47.5 18.5t50.5 11.5
|
||||||
|
t53 4q126 0 215 -75t89 -181zM526.5 629.5q-14.5 14.5 -35 14.5t-34.5 -15q-7 -7 -11 -16t-4 -19q0 -20 14.5 -34.5t35 -14.5t35.5 14q7 8 10.5 16.5t3.5 18.5q0 21 -14.5 35.5zM603 312q9 0 16.5 3.5t13.5 9.5q13 13 13 29q0 8 -3.5 15.5t-9.5 13.5q-12 13 -30 13
|
||||||
|
q-6 0 -11 -1.5t-10 -4.5t-9 -7q-13 -13 -13 -28q0 -12 6 -21.5t16 -15.5q5 -3 10 -4.5t11 -1.5zM775 323q12 -13 30.5 -13t31.5 13q3 3 5 6.5t4 7.5t2.5 8t0.5 8q0 6 -1.5 11t-4 10t-6.5 9q-13 13 -31.5 13t-30.5 -13q-5 -4 -7.5 -9t-4 -10t-1.5 -11q0 -9 3 -16.5t10 -13.5z
|
||||||
|
" />
|
||||||
|
<glyph glyph-name="uniF10A" unicode=""
|
||||||
|
d="M138 773h746v-84h-746v84zM820 273v328h-617v-328h617zM292 517h439v-160h-439v160zM686 83q41 63 76 143l-90 33q-35 -97 -81 -176h-156q-39 103 -88 176l-83 -33q51 -77 83 -143h-230v-83h789v83h-220z" />
|
||||||
|
<glyph glyph-name="uniF11A" unicode=""
|
||||||
|
d="M911 223q-5 31 -17 61t-25.5 50.5t-26.5 37t-21 24.5l-8 9q5 44 -2.5 73t-17.5 36l-10 8q-2 62 -18.5 112.5t-39.5 81.5t-54 53.5t-57 32.5t-54 15.5t-38.5 6t-17.5 0.5q-6 0 -16.5 -0.5t-39 -6t-54 -15.5t-57 -32.5t-54.5 -53.5t-39.5 -81.5t-17.5 -112.5q-2 -1 -4.5 -3
|
||||||
|
t-9.5 -10t-10.5 -20.5t-7 -34t0.5 -49.5l-9 -9q-5 -5 -19.5 -23.5t-26.5 -38t-24.5 -50t-17.5 -61.5q-1 -4 -1 -10t1 -22t3.5 -28t9 -21t15.5 -8t25 17t37 50q23 -62 64 -117q-3 -1 -8 -3.5t-17.5 -10t-21.5 -17t-16 -26t-5 -34.5q0 -2 0.5 -4.5t3 -10t8 -14t17.5 -14.5
|
||||||
|
t28 -13.5t42.5 -9t58.5 -2.5q13 1 32.5 4t59.5 17t55 36h30q31 -44 141 -56l6 -1q45 -1 78 5.5t47.5 15.5t23 21.5t9 17.5t0.5 8q2 18 -4.5 34t-16.5 26t-20.5 17.5t-18.5 10.5l-8 3q9 11 17 23.5t14 23.5l12 22q6 11 9.5 19.5t6.5 15t4 9.5l1 4q21 -34 37 -50t25.5 -17
|
||||||
|
t15.5 8t8.5 21t3.5 28t1 23v9v0z" />
|
||||||
|
<glyph glyph-name="uniF12A" unicode="" horiz-adv-x="1026"
|
||||||
|
d="M0 242q0 65 40 140t113 147q96 97 195.5 134.5t140.5 -3.5q36 -36 11 -119q-2 -9 0 -12t5 -4t8 0t8 2l3 1q80 34 141.5 34t87.5 -35q25 -35 0 -101q-1 -8 -3 -11t3 -7.5t7 -5.5t9 -3q33 -10 59.5 -26.5t45 -47t19.5 -66.5q0 -39 -20.5 -79t-62.5 -79t-96 -66.5t-129 -48
|
||||||
|
t-155 -17.5t-157.5 19.5t-137 52.5t-98.5 87t-37 114zM104 201q5 -55 51 -97t118.5 -62t156.5 -12q128 13 211 80.5t76 151.5q-5 54 -50 96t-120 62.5t-157 12.5q-127 -13 -211 -80.5t-75 -151.5zM237 151q-24 52 3 106q27 53 86.5 80t120.5 10q63 -16 90.5 -67.5
|
||||||
|
t1.5 -109.5t-90.5 -85t-127.5 -7q-62 19 -84 73zM283 166q5 -21 24.5 -30t43 -1t35.5 28q11 18 6 38.5t-25 28.5q-20 9 -42.5 0.5t-33.5 -25.5q-13 -20 -8 -39zM403 247q-10 -19 8 -27q8 -2 16 1t12 10q6 8 2.5 16t-10.5 10q-7 3 -16 0t-12 -10zM666 746q-3 16 5 30.5
|
||||||
|
t25 16.5q70 14 139.5 -6.5t118.5 -76.5q50 -56 65 -128.5t-8 -137.5q-5 -16 -19.5 -23t-30 -2t-22.5 19.5t-3 29.5q16 47 6 98t-46 90q-36 40 -85 54.5t-98 5.5q-17 -3 -30 6t-17 24zM699 616q-3 15 5.5 26t20.5 14q35 8 68.5 -2.5t57.5 -37t31 -62.5t-3 -68
|
||||||
|
q-5 -12 -17.5 -19t-25.5 -2t-20 17.5t-2 25.5q11 36 -13.5 62.5t-61.5 20.5q-13 -3 -25 4t-15 21z" />
|
||||||
|
<glyph glyph-name="uniF20A" unicode=""
|
||||||
|
d="M945 677q-23 37 -54.5 64t-68.5 42.5t-79 18.5q-148 7 -228 -101l-1 2q-1 1 -2 1q0 -3 -3 -3q-80 108 -228 101q-60 -3 -113 -36t-89 -89q-26 -41 -36 -89.5t-5 -99t25 -102.5t54 -98q53 -69 89 -110q122 -134 282 -240l21 -15h6l21 15q78 52 150 113t132 127
|
||||||
|
q11 13 24 28.5t22.5 28t22 28t20.5 25.5q69 94 79.5 200.5t-41.5 188.5z" />
|
||||||
|
</font>
|
||||||
|
</defs></svg>
|
||||||
|
After Width: | Height: | Size: 9.8 KiB |
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
+15
@@ -0,0 +1,15 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>TinyUrl</title>
|
||||||
|
<script type="module" crossorigin src="/assets/index.6bb8942b.js"></script>
|
||||||
|
<link rel="stylesheet" href="/assets/index.cf87a41a.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
module tinyurl
|
||||||
|
|
||||||
|
go 1.18
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/fatih/color v1.13.0
|
||||||
|
github.com/flamego/auth v1.1.0
|
||||||
|
github.com/flamego/binding v1.1.0
|
||||||
|
github.com/flamego/cors v1.0.1
|
||||||
|
github.com/flamego/flamego v1.2.0
|
||||||
|
github.com/flamego/validator v1.0.0
|
||||||
|
github.com/google/uuid v1.3.0
|
||||||
|
github.com/hashicorp/golang-lru v0.5.4
|
||||||
|
github.com/ory/graceful v0.1.2
|
||||||
|
github.com/spaolacci/murmur3 v1.1.0
|
||||||
|
go.uber.org/zap v1.21.0
|
||||||
|
gopkg.in/natefinch/lumberjack.v2 v2.0.0
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
|
||||||
|
gorm.io/driver/mysql v1.3.3
|
||||||
|
gorm.io/gorm v1.23.4
|
||||||
|
)
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/BurntSushi/toml v1.1.0 // indirect
|
||||||
|
github.com/alecthomas/participle/v2 v2.0.0-alpha7 // indirect
|
||||||
|
github.com/go-sql-driver/mysql v1.6.0 // indirect
|
||||||
|
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||||
|
github.com/jinzhu/now v1.1.4 // indirect
|
||||||
|
github.com/leodido/go-urn v1.2.1 // indirect
|
||||||
|
github.com/mattn/go-colorable v0.1.9 // indirect
|
||||||
|
github.com/mattn/go-isatty v0.0.14 // indirect
|
||||||
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
|
go.uber.org/atomic v1.7.0 // indirect
|
||||||
|
go.uber.org/multierr v1.6.0 // indirect
|
||||||
|
golang.org/x/crypto v0.0.0-20210920023735-84f357641f63 // indirect
|
||||||
|
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678 // indirect
|
||||||
|
golang.org/x/text v0.3.7 // indirect
|
||||||
|
)
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
|
||||||
|
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||||
|
github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c=
|
||||||
|
github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA=
|
||||||
|
github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1 h1:GDQdwm/gAcJcLAKQQZGOJ4knlw+7rfEQQcmwTbt4p5E=
|
||||||
|
github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ=
|
||||||
|
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||||
|
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
||||||
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
|
||||||
|
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||||
|
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||||
|
github.com/flamego/auth v1.1.0 h1:6HKXzJUyDtcD8Q+OfdUH+s3OGFCq2rm6sVWyQOKtUrE=
|
||||||
|
github.com/flamego/auth v1.1.0/go.mod h1:rLgtOmBhFvrRLNtCo2ve3ahaI+5yOXyDphTzE74WWyk=
|
||||||
|
github.com/flamego/binding v1.1.0 h1:J1rZOIrg+ElJviefm+NyEvT2BodCQztQQT8pVqGvK/o=
|
||||||
|
github.com/flamego/binding v1.1.0/go.mod h1:e4uHW4FtBpGYSadNP07EjVlvtSP2/FS0UDIJbyBBO10=
|
||||||
|
github.com/flamego/cors v1.0.1 h1:3/nwzWyej4ecBpUZI8RH+QSeth/2S8F+6Be325Iiuqc=
|
||||||
|
github.com/flamego/cors v1.0.1/go.mod h1:ANNHv/lTffJTQSavwpbcuRpZKWp3WXnSpAJVQYY/I1A=
|
||||||
|
github.com/flamego/flamego v1.0.0/go.mod h1:apiAxIxeHujHFX4Yr0BHmQFJuZUM07XztdQSChbeuPw=
|
||||||
|
github.com/flamego/flamego v1.1.0/go.mod h1:sMqWT2ONQkZsCHte/k8hYmfnbbLgnfv7lL+VJpfv+EU=
|
||||||
|
github.com/flamego/flamego v1.2.0 h1:Hy0JOOLJcasqJQ1J1e8kmCxPJ2OqNYeRy8NgUDnntTY=
|
||||||
|
github.com/flamego/flamego v1.2.0/go.mod h1:0LXdtkBqv4Gob5nQ/fhB25d5GH8/PW/bVpJRDDt+8VI=
|
||||||
|
github.com/flamego/validator v1.0.0 h1:ixuWHVgiVGp4pVGtUn/0d6HBjZJbbXfJHDNkxW+rZoY=
|
||||||
|
github.com/flamego/validator v1.0.0/go.mod h1:POYn0/5iW4sdamdPAYPrzqN6DFC4YaczY0gYY+Pyx5E=
|
||||||
|
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
|
||||||
|
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||||
|
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
|
||||||
|
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||||
|
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||||
|
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
|
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
|
||||||
|
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||||
|
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||||
|
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||||
|
github.com/jinzhu/now v1.1.4 h1:tHnRBy1i5F2Dh8BAFxqFzxKqqvezXrL2OW1TnX+Mlas=
|
||||||
|
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||||
|
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||||
|
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||||
|
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||||
|
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||||
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
|
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||||
|
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||||
|
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
|
||||||
|
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
|
||||||
|
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||||
|
github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=
|
||||||
|
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||||
|
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||||
|
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
|
||||||
|
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||||
|
github.com/ory/graceful v0.1.2 h1:ErCFGuO0T6IHMQ9Fu9GKjIaRbNCrKDX/WdHDwM/mAlY=
|
||||||
|
github.com/ory/graceful v0.1.2/go.mod h1:4zFz687IAF7oNHHiB586U4iL+/4aV09o/PYLE34t2bA=
|
||||||
|
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||||
|
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
|
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||||
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
|
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||||
|
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
|
||||||
|
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
|
||||||
|
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
|
||||||
|
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||||
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
|
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||||
|
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||||
|
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
|
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||||
|
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
|
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||||
|
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
|
||||||
|
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||||
|
go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
|
||||||
|
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
|
||||||
|
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
|
||||||
|
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||||
|
go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=
|
||||||
|
go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
|
||||||
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
|
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
|
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
|
golang.org/x/crypto v0.0.0-20210920023735-84f357641f63 h1:kETrAMYZq6WVGPa8IIixL0CaEcIUNi+1WX7grUoi3y8=
|
||||||
|
golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
|
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||||
|
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
|
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
|
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||||
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678 h1:J27LZFQBFoihqXoegpscI10HpjZ7B5WQLLKL2FZXQKw=
|
||||||
|
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
|
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||||
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
|
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
|
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||||
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||||
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||||
|
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||||
|
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
|
||||||
|
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
|
||||||
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||||
|
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
gorm.io/driver/mysql v1.3.3 h1:jXG9ANrwBc4+bMvBcSl8zCfPBaVoPyBEBshA8dA93X8=
|
||||||
|
gorm.io/driver/mysql v1.3.3/go.mod h1:ChK6AHbHgDCFZyJp0F+BmVGb06PSIoh9uVYKAlRbb2U=
|
||||||
|
gorm.io/gorm v1.23.1/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
|
||||||
|
gorm.io/gorm v1.23.4 h1:1BKWM67O6CflSLcwGQR7ccfmC4ebOxQrTfOQGRE9wjg=
|
||||||
|
gorm.io/gorm v1.23.4/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
|
||||||
@@ -5,12 +5,15 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
"tinyurl/pkg/config"
|
"tinyurl/pkg/config"
|
||||||
"tinyurl/pkg/db"
|
"tinyurl/pkg/db"
|
||||||
"tinyurl/pkg/log"
|
"tinyurl/pkg/log"
|
||||||
"tinyurl/route"
|
"tinyurl/route"
|
||||||
|
|
||||||
|
"github.com/flamego/cors"
|
||||||
"github.com/flamego/flamego"
|
"github.com/flamego/flamego"
|
||||||
|
lru "github.com/hashicorp/golang-lru"
|
||||||
"github.com/ory/graceful"
|
"github.com/ory/graceful"
|
||||||
// "github.com/justinas/alice"
|
// "github.com/justinas/alice"
|
||||||
)
|
)
|
||||||
@@ -20,18 +23,29 @@ var (
|
|||||||
// Name is the name of the compiled software.
|
// Name is the name of the compiled software.
|
||||||
Name string
|
Name string
|
||||||
// Version is the version of the compiled software.
|
// Version is the version of the compiled software.
|
||||||
Version string
|
Version = "unknown"
|
||||||
|
GitCommitLog = "unknown"
|
||||||
|
GitStatus = "unknown"
|
||||||
|
BuildTime = "unknown"
|
||||||
|
BuildGoVersion = "unknown"
|
||||||
// flagconf is the config flag.
|
// flagconf is the config flag.
|
||||||
flagconf string
|
flagconf string
|
||||||
|
|
||||||
id, _ = os.Hostname()
|
id, _ = os.Hostname()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func StringifyMultiLine() string {
|
||||||
|
return fmt.Sprintf("Version=%s\nGitCommitLog=%s\nBuildTime=%s\nGoVersion=%s\nruntime=%s/%s\n",
|
||||||
|
Version, GitCommitLog, BuildTime, BuildGoVersion, runtime.GOOS, runtime.GOARCH)
|
||||||
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
flag.StringVar(&flagconf, "conf", "./configs/config.yml", "config path, eg: -conf config.yaml")
|
flag.StringVar(&flagconf, "conf", "./configs/config.yml", "config path, eg: -conf config.yaml")
|
||||||
|
db.InitDb()
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
fmt.Println(StringifyMultiLine())
|
||||||
cfg, err := config.Parse(flagconf)
|
cfg, err := config.Parse(flagconf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
@@ -40,8 +54,25 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
l, err := lru.New(10240)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
f := flamego.Classic()
|
f := flamego.Classic()
|
||||||
f.Map(cfg, logger, db.DB)
|
f.Use(cors.CORS(
|
||||||
|
cors.Options{
|
||||||
|
Methods: []string{"POST", "GET", "OPTIONS", "PUT", "DELETE", "UPDATE"},
|
||||||
|
AllowDomain: []string{"*"},
|
||||||
|
AllowCredentials: true,
|
||||||
|
},
|
||||||
|
))
|
||||||
|
f.Use(flamego.Static(flamego.StaticOptions{
|
||||||
|
Directory: "./dist/",
|
||||||
|
}))
|
||||||
|
// f.Use(flamego.Static(flamego.StaticOptions{
|
||||||
|
// Directory: "./dist/assets/",
|
||||||
|
// }))
|
||||||
|
f.Map(cfg, logger, db.DB, l)
|
||||||
// f.Use(auth.Basic("admin", "1111"))
|
// f.Use(auth.Basic("admin", "1111"))
|
||||||
route.Route(f)
|
route.Route(f)
|
||||||
server := graceful.WithDefaults(
|
server := graceful.WithDefaults(
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
GOPATH:=$(shell go env GOPATH)
|
||||||
|
VERSION=$(shell git describe --tags --always)
|
||||||
|
# 获取源码最近一次 git commit log,包含 commit sha 值,以及 commit message
|
||||||
|
GitCommitLog=$(shell git log)
|
||||||
|
# 检查源码在最近一次 git commit 基础上,是否有本地修改,且未提交的文件
|
||||||
|
GitStatus=$(shell git status -s)
|
||||||
|
# 获取当前时间
|
||||||
|
BuildTime=$(shell date +'%Y.%m.%d %H:%M:%S')
|
||||||
|
# 获取Go的版本
|
||||||
|
BuildGoVersion=$(shell go version)
|
||||||
|
|
||||||
|
LDFlags=" \
|
||||||
|
-X 'main.Version=$(VERSION)' \
|
||||||
|
-X 'main.GitCommitLog=$(GitCommitLog)' \
|
||||||
|
-X 'main.BuildTime=$(BuildTime)' \
|
||||||
|
-X 'main.BuildGoVersion=$(BuildGoVersion)'"
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
|
# build
|
||||||
|
build:
|
||||||
|
mkdir -p bin/ && go build -ldflags $(LDFlags) -o ./bin/ ./...
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
# clean
|
||||||
|
clean:
|
||||||
|
rm -rf bin/
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
# generate all
|
||||||
|
all:
|
||||||
|
make build;
|
||||||
|
|
||||||
|
|
||||||
|
# show help
|
||||||
|
help:
|
||||||
|
@echo ''
|
||||||
|
@echo 'Usage:'
|
||||||
|
@echo ' make [target]'
|
||||||
|
@echo ''
|
||||||
|
@echo 'Targets:'
|
||||||
|
@awk '/^[a-zA-Z\-\_0-9]+:/ { \
|
||||||
|
helpMessage = match(lastLine, /^# (.*)/); \
|
||||||
|
if (helpMessage) { \
|
||||||
|
helpCommand = substr($$1, 0, index($$1, ":")-1); \
|
||||||
|
helpMessage = substr(lastLine, RSTART + 2, RLENGTH); \
|
||||||
|
printf "\033[36m%-22s\033[0m %s\n", helpCommand,helpMessage; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
{ lastLine = $$0 }' $(MAKEFILE_LIST)
|
||||||
|
|
||||||
|
.DEFAULT_GOAL := help
|
||||||
@@ -14,7 +14,9 @@ type Config struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Server struct {
|
type Server struct {
|
||||||
Addr string `yaml:"addr"`
|
Addr string `yaml:"addr"`
|
||||||
|
Domain string `yaml:"domain"`
|
||||||
|
Lru_Size int `yaml:"lru_size"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Log struct {
|
type Log struct {
|
||||||
@@ -34,7 +36,7 @@ type Rotate struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Data struct {
|
type Data struct {
|
||||||
DB DB `yaml:"database"`
|
DB `yaml:"database"`
|
||||||
Redis `yaml:"redis"`
|
Redis `yaml:"redis"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-5
@@ -12,10 +12,9 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type TinyUrl struct {
|
type TinyUrl struct {
|
||||||
ID int64
|
gorm.Model
|
||||||
OriginUrl string
|
LongUrl string `gorm:"size:200"`
|
||||||
TinyUrl string
|
ShortUrl string `gorm:"size:50"`
|
||||||
CreatTime time.Time
|
|
||||||
ExpireTime time.Time
|
ExpireTime time.Time
|
||||||
Counter float64
|
Counter float64
|
||||||
}
|
}
|
||||||
@@ -26,7 +25,7 @@ type URLDetail struct {
|
|||||||
ExpirationInMinutes time.Duration `json:"expiration_in_minutes"`
|
ExpirationInMinutes time.Duration `json:"expiration_in_minutes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func initDB() {
|
func InitDb() {
|
||||||
// 参考 https://github.com/go-sql-driver/mysql#dsn-data-source-name 获取详情
|
// 参考 https://github.com/go-sql-driver/mysql#dsn-data-source-name 获取详情
|
||||||
dsn := "tinyurl:tinyurl@tcp(42.192.36.14:3306)/tinyurl?charset=utf8mb4&parseTime=True&loc=Local"
|
dsn := "tinyurl:tinyurl@tcp(42.192.36.14:3306)/tinyurl?charset=utf8mb4&parseTime=True&loc=Local"
|
||||||
var err error
|
var err error
|
||||||
@@ -34,4 +33,7 @@ func initDB() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
if err := DB.AutoMigrate(&TinyUrl{}); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+4
-1
@@ -4,12 +4,15 @@ import (
|
|||||||
"tinyurl/route/tinyurl"
|
"tinyurl/route/tinyurl"
|
||||||
|
|
||||||
"github.com/flamego/auth"
|
"github.com/flamego/auth"
|
||||||
|
"github.com/flamego/binding"
|
||||||
"github.com/flamego/flamego"
|
"github.com/flamego/flamego"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Route(f *flamego.Flame) {
|
func Route(f *flamego.Flame) {
|
||||||
f.Get("/version", auth.Basic("admin", "admin"), func() string { return "1.1.1" })
|
f.Get("/version", auth.Basic("admin", "admin"), func() string { return "1.1.1" })
|
||||||
f.Get("/{url: **, capture: 10}", tinyurl.TinyurlHandler)
|
// f.Get("/{url: **, capture: 10}", tinyurl.TinyurlHandler)
|
||||||
|
f.Get("/{url: **, capture: 10}", tinyurl.TinyUtlTo)
|
||||||
|
f.Router.Any("/api/v1/tiny", binding.JSON(tinyurl.Param{}), tinyurl.TinyUrl)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+100
-1
@@ -1,13 +1,31 @@
|
|||||||
package tinyurl
|
package tinyurl
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
"tinyurl/pkg/base62"
|
"tinyurl/pkg/base62"
|
||||||
|
"tinyurl/pkg/config"
|
||||||
|
data "tinyurl/pkg/db"
|
||||||
|
"tinyurl/pkg/log"
|
||||||
|
|
||||||
|
"github.com/flamego/binding"
|
||||||
"github.com/flamego/flamego"
|
"github.com/flamego/flamego"
|
||||||
|
"github.com/flamego/validator"
|
||||||
|
lru "github.com/hashicorp/golang-lru"
|
||||||
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TinyurlHandler(c flamego.Context) string {
|
type Param struct {
|
||||||
|
Code string `json:"code,omitempty"`
|
||||||
|
Msg string `json:"msg,omitempty"`
|
||||||
|
LongUrl string `json:"longUrl,omitempty" ` //validate:"required
|
||||||
|
ShortUrl string `json:"shortUrl,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func TinyurlHandler(c flamego.Context, logger *log.Logger, db *gorm.DB) string {
|
||||||
|
logger.Info(c.Request().Context(), time.Now().Format("2006-01-02 15:04:05"))
|
||||||
var originurl string
|
var originurl string
|
||||||
if len(c.Request().URL.RawQuery) > 1 {
|
if len(c.Request().URL.RawQuery) > 1 {
|
||||||
originurl = c.Param("url") + "?" + c.Request().URL.RawQuery
|
originurl = c.Param("url") + "?" + c.Request().URL.RawQuery
|
||||||
@@ -20,3 +38,84 @@ func TinyurlHandler(c flamego.Context) string {
|
|||||||
base62.TinyUrl(originurl),
|
base62.TinyUrl(originurl),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TinyUrl(c flamego.Context, w http.ResponseWriter, form Param, errs binding.Errors, cfg *config.Config, logger *log.Logger, db *gorm.DB, l *lru.Cache) {
|
||||||
|
if len(errs) > 0 {
|
||||||
|
var err error
|
||||||
|
switch errs[0].Category {
|
||||||
|
case binding.ErrorCategoryValidation:
|
||||||
|
err = errs[0].Err.(validator.ValidationErrors)[0]
|
||||||
|
default:
|
||||||
|
err = errs[0].Err
|
||||||
|
}
|
||||||
|
logger.Error(c.Request().Context(), err.Error())
|
||||||
|
c.ResponseWriter().WriteHeader(http.StatusBadRequest)
|
||||||
|
_, _ = c.ResponseWriter().Write([]byte(fmt.Sprintf("Oops! Error occurred: %v", err)))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
logger.Info(c.Request().Context(), form.LongUrl)
|
||||||
|
var tm = data.TinyUrl{}
|
||||||
|
tm.LongUrl = form.LongUrl
|
||||||
|
tm.ShortUrl = base62.TinyUrl(form.LongUrl + time.Now().String())
|
||||||
|
if err := db.Create(&tm).Error; err != nil {
|
||||||
|
logger.Info(c.Request().Context(), err.Error())
|
||||||
|
// bytejson, _ := json.Marshal(map[string]interface{}{
|
||||||
|
// "code": http.StatusBadGateway,
|
||||||
|
// "msg": "please try again",
|
||||||
|
// })
|
||||||
|
// io.WriteString(c.ResponseWriter(), string(bytejson))
|
||||||
|
// return
|
||||||
|
w.WriteHeader(http.StatusOK)
|
||||||
|
json.NewEncoder(w).Encode(map[string]interface{}{
|
||||||
|
"code": http.StatusBadGateway,
|
||||||
|
"msg": "please try again",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
l.Add(tm.ShortUrl, tm.LongUrl)
|
||||||
|
w.WriteHeader(http.StatusOK)
|
||||||
|
json.NewEncoder(w).Encode(map[string]interface{}{
|
||||||
|
"code": http.StatusOK,
|
||||||
|
"msg": "success",
|
||||||
|
"shortUrl": cfg.Server.Domain + tm.ShortUrl,
|
||||||
|
})
|
||||||
|
// bytejson, err := json.Marshal(map[string]interface{}{
|
||||||
|
// "code": http.StatusOK,
|
||||||
|
// "msg": "success",
|
||||||
|
// "shortUrl": tm.ShortUrl,
|
||||||
|
// })
|
||||||
|
// if err != nil {
|
||||||
|
// logger.Error(c.Request().Context(), err.Error())
|
||||||
|
// }
|
||||||
|
// io.WriteString(c.ResponseWriter(), string(bytejson))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func TinyUtlTo(c flamego.Context, logger *log.Logger, db *gorm.DB, l *lru.Cache, cfg *config.Config) {
|
||||||
|
tiny := c.Param("url")
|
||||||
|
if v, ok := l.Get(tiny); ok {
|
||||||
|
c.Redirect(v.(string), http.StatusFound)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var tm data.TinyUrl
|
||||||
|
db.Where("short_url = ?", tiny).First(&tm)
|
||||||
|
l.Add(tiny, tm.LongUrl)
|
||||||
|
c.Redirect(cfg.Server.Domain+tm.LongUrl, http.StatusFound)
|
||||||
|
}
|
||||||
|
|
||||||
|
// type tinyurl interface {
|
||||||
|
// CreatreTinyurl()
|
||||||
|
// SetTinyurl()
|
||||||
|
// }
|
||||||
|
|
||||||
|
// type tiny struct {
|
||||||
|
// db *gorm.DB
|
||||||
|
// }
|
||||||
|
|
||||||
|
// func newTiny() *tiny {
|
||||||
|
// return new(tiny)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// func (t *tiny) CreatreTinyurl() {
|
||||||
|
|
||||||
|
// t.db.Create()
|
||||||
|
// }
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<!-- import CSS -->
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<el-container>
|
||||||
|
<el-header>Header</el-header>
|
||||||
|
<el-main>Main</el-main>
|
||||||
|
<el-footer>Footer</el-footer>
|
||||||
|
</el-container>
|
||||||
|
</body>
|
||||||
|
<!-- import Vue before Element -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
|
||||||
|
<!-- import JavaScript -->
|
||||||
|
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
||||||
|
<script>
|
||||||
|
new Vue({
|
||||||
|
el: '#app',
|
||||||
|
data: function() {
|
||||||
|
return { visible: false }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.el-header, .el-footer {
|
||||||
|
background-color: #B3C0D1;
|
||||||
|
color: #333;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-aside {
|
||||||
|
background-color: #D3DCE6;
|
||||||
|
color: #333;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-main {
|
||||||
|
background-color: #E9EEF3;
|
||||||
|
color: #333;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body > .el-container {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-container:nth-child(5) .el-aside,
|
||||||
|
.el-container:nth-child(6) .el-aside {
|
||||||
|
line-height: 260px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-container:nth-child(7) .el-aside {
|
||||||
|
line-height: 320px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</html>
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
dlpath := "http://pan.oneisall.xyz/Outline.apk"
|
||||||
|
req, _ := http.NewRequest(http.MethodHead, dlpath, nil)
|
||||||
|
rsp, _ := http.DefaultClient.Do(req)
|
||||||
|
defer rsp.Body.Close()
|
||||||
|
fmt.Println(rsp.Status)
|
||||||
|
// dump, _ := httputil.DumpResponse(rsp, false)
|
||||||
|
// fmt.Println(string(dump))
|
||||||
|
// if rsp.Header != nil {
|
||||||
|
// fmt.Printf("%v", rsp.Header)
|
||||||
|
for k, v := range rsp.Header {
|
||||||
|
fmt.Println(k, v)
|
||||||
|
}
|
||||||
|
fmt.Println(rsp.Header.Get("Content-Length"))
|
||||||
|
fmt.Println(rsp.Header.Get("Accept-Ranges"))
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
|
"net/http/httputil"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
mux := http.NewServeMux()
|
||||||
|
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
bytereq, _ := httputil.DumpRequest(r, true)
|
||||||
|
bytebody, _ := io.ReadAll(r.Body)
|
||||||
|
log.Println(string(bytereq))
|
||||||
|
m := map[string]interface{}{
|
||||||
|
"host": r.Host,
|
||||||
|
"requestUrl": r.RequestURI,
|
||||||
|
"proto": r.Proto,
|
||||||
|
"path": r.URL.String(),
|
||||||
|
"method": r.Method,
|
||||||
|
"body": string(bytebody),
|
||||||
|
"header": r.Header,
|
||||||
|
"form": r.Form,
|
||||||
|
"postform": r.PostForm,
|
||||||
|
"dumpreq": string(bytereq),
|
||||||
|
}
|
||||||
|
bj, _ := json.Marshal(m)
|
||||||
|
fmt.Println(string(bj))
|
||||||
|
// json.NewEncoder(w).Encode(m)
|
||||||
|
|
||||||
|
for k, v := range cors {
|
||||||
|
w.Header().Set(k, v)
|
||||||
|
}
|
||||||
|
w.WriteHeader(http.StatusOK)
|
||||||
|
io.WriteString(w, string(bj))
|
||||||
|
return
|
||||||
|
})
|
||||||
|
server := http.Server{
|
||||||
|
Addr: ":890",
|
||||||
|
Handler: mux,
|
||||||
|
}
|
||||||
|
server.ListenAndServe()
|
||||||
|
}
|
||||||
|
|
||||||
|
var cors = map[string]string{
|
||||||
|
"Access-Control-Allow-Origin": "*",
|
||||||
|
"Access-Control-Allow-Methods": "POST,OPTIONS,GET",
|
||||||
|
"Access-Control-Max-Age": "3600",
|
||||||
|
"Access-Control-Allow-Headers": "accept,x-requested-with,Content-Type",
|
||||||
|
"Access-Control-Allow-Credentials": "true",
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
lru "github.com/hashicorp/golang-lru"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
l, _ := lru.New(10)
|
||||||
|
for i := 0; i < 100; i++ {
|
||||||
|
l.Add(i, i)
|
||||||
|
}
|
||||||
|
for l.Len() > 0 {
|
||||||
|
fmt.Println(l.RemoveOldest())
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in new issue
Block a user