@mertcankocak/core-project 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,340 +1,344 @@
1
- import * as f from "yup";
2
- import { fileTypeFromBuffer as p } from "file-type";
3
- const k = /^[0-9]{11}$/;
4
- function E(i) {
5
- if (!k.test(i))
1
+ import * as z from "yup";
2
+ import { fileTypeFromBuffer as Xe } from "file-type";
3
+ import Ke, { useState as Te, useRef as Tr, useEffect as Be, useCallback as Le, useMemo as ke } from "react";
4
+ import { useField as kr } from "formik";
5
+ import { InputAdornment as Ve, Autocomplete as Dr, TextField as Ue, CircularProgress as Cr } from "@mui/material";
6
+ import { debounce as Sr } from "lodash";
7
+ const Ze = /^[0-9]{11}$/;
8
+ function wr(n) {
9
+ if (!Ze.test(n))
6
10
  return !1;
7
- const t = i.split("").map(Number);
8
- return !(t[0] === 0 || t.slice(0, 9).reduce((n, e) => n + e, 0) % 10 !== t[9] || t.slice(0, 10).reduce((n, e) => n + e, 0) % 10 !== t[10]);
11
+ const a = n.split("").map(Number);
12
+ return !(a[0] === 0 || a.slice(0, 9).reduce((o, r) => o + r, 0) % 10 !== a[9] || a.slice(0, 10).reduce((o, r) => o + r, 0) % 10 !== a[10]);
9
13
  }
10
- function _(i) {
14
+ function rt(n) {
11
15
  const {
12
- required: t = !1,
13
- message: s = "Geçerli bir T.C. kimlik numarası giriniz",
14
- requiredMessage: a = "T.C. kimlik numarası zorunludur",
15
- name: n = "tcKimlikNo"
16
- } = i || {};
17
- let e = f.string();
18
- return t && (e = e.required(a)), e = e.matches(
19
- k,
16
+ required: a = !1,
17
+ message: u = "Geçerli bir T.C. kimlik numarası giriniz",
18
+ requiredMessage: l = "T.C. kimlik numarası zorunludur",
19
+ name: o = "tcKimlikNo"
20
+ } = n || {};
21
+ let r = z.string();
22
+ return a && (r = r.required(l)), r = r.matches(
23
+ Ze,
20
24
  "T.C. kimlik numarası 11 haneli olmalıdır"
21
- ), e = e.test({
22
- name: n,
23
- message: s,
24
- test(r) {
25
- return !t && (!r || r.trim() === "") ? !0 : t && !r || !r || typeof r != "string" ? !1 : E(r);
25
+ ), r = r.test({
26
+ name: o,
27
+ message: u,
28
+ test(i) {
29
+ return !a && (!i || i.trim() === "") ? !0 : a && !i || !i || typeof i != "string" ? !1 : wr(i);
26
30
  }
27
- }), e;
31
+ }), r;
28
32
  }
29
- const $ = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
30
- function S(i) {
31
- return $.test(i);
33
+ const xr = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
34
+ function Or(n) {
35
+ return xr.test(n);
32
36
  }
33
- function L(i) {
37
+ function tt(n) {
34
38
  const {
35
- required: t = !1,
36
- message: s = "Geçerli bir email adresi giriniz",
37
- requiredMessage: a = "Email zorunludur",
38
- name: n = "email"
39
- } = i || {};
40
- let e = f.string();
41
- return t && (e = e.required(a)), e = e.email(s).test({
42
- name: n,
43
- message: s,
44
- test(r) {
45
- return !t && (!r || r.trim() === "") ? !0 : t && !r || !r || typeof r != "string" ? !1 : S(r);
46
- }
47
- }), e;
39
+ required: a = !1,
40
+ message: u = "Geçerli bir email adresi giriniz",
41
+ requiredMessage: l = "Email zorunludur",
42
+ name: o = "email"
43
+ } = n || {};
44
+ let r = z.string();
45
+ return a && (r = r.required(l)), r = r.email(u).test({
46
+ name: o,
47
+ message: u,
48
+ test(i) {
49
+ return !a && (!i || i.trim() === "") ? !0 : a && !i || !i || typeof i != "string" ? !1 : Or(i);
50
+ }
51
+ }), r;
48
52
  }
49
- const T = /^(\+90\s?)?(0?5\d{2})\s?(\d{3})\s?(\d{2})\s?(\d{2})$/;
50
- function x(i) {
51
- const t = i.replace(/\s+/g, "").replace(/[-\+()]/g, "");
52
- return t.length !== 10 && t.length !== 11 || !t.match(/^(0?5\d{9})$/) ? !1 : T.test(i) || /^0?5\d{9}$/.test(t);
53
+ const Pr = /^(\+90\s?)?(0?5\d{2})\s?(\d{3})\s?(\d{2})\s?(\d{2})$/;
54
+ function zr(n) {
55
+ const a = n.replace(/\s+/g, "").replace(/[-\+()]/g, "");
56
+ return a.length !== 10 && a.length !== 11 || !a.match(/^(0?5\d{9})$/) ? !1 : Pr.test(n) || /^0?5\d{9}$/.test(a);
53
57
  }
54
- function V(i) {
58
+ function nt(n) {
55
59
  const {
56
- required: t = !1,
57
- message: s = "Geçerli bir telefon numarası giriniz (05XX XXX XX XX)",
58
- requiredMessage: a = "Telefon numarası zorunludur",
59
- name: n = "phone"
60
- } = i || {};
61
- let e = f.string();
62
- return t && (e = e.required(a)), e = e.test({
63
- name: n,
64
- message: s,
65
- test(r) {
66
- return !t && (!r || r.trim() === "") ? !0 : t && !r || !r || typeof r != "string" ? !1 : x(r);
67
- }
68
- }), e;
60
+ required: a = !1,
61
+ message: u = "Geçerli bir telefon numarası giriniz (05XX XXX XX XX)",
62
+ requiredMessage: l = "Telefon numarası zorunludur",
63
+ name: o = "phone"
64
+ } = n || {};
65
+ let r = z.string();
66
+ return a && (r = r.required(l)), r = r.test({
67
+ name: o,
68
+ message: u,
69
+ test(i) {
70
+ return !a && (!i || i.trim() === "") ? !0 : a && !i || !i || typeof i != "string" ? !1 : zr(i);
71
+ }
72
+ }), r;
69
73
  }
70
- function j(i, t) {
74
+ function it(n, a) {
71
75
  const {
72
- minLength: s = 8,
73
- requireUppercase: a = !0,
74
- requireLowercase: n = !0,
75
- requireNumber: e = !0,
76
- requireSpecialChar: r = !0
77
- } = t || {}, u = [];
78
- return i.length < s && u.push(`Şifre en az ${s} karakter olmalıdır`), a && !/[A-Z]/.test(i) && u.push("Şifre en az bir büyük harf içermelidir"), n && !/[a-z]/.test(i) && u.push("Şifre en az bir küçük harf içermelidir"), e && !/\d/.test(i) && u.push("Şifre en az bir rakam içermelidir"), r && !/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(i) && u.push("Şifre en az bir özel karakter içermelidir"), {
79
- isValid: u.length === 0,
80
- errors: u
76
+ minLength: u = 8,
77
+ requireUppercase: l = !0,
78
+ requireLowercase: o = !0,
79
+ requireNumber: r = !0,
80
+ requireSpecialChar: i = !0
81
+ } = a || {}, c = [];
82
+ return n.length < u && c.push(`Şifre en az ${u} karakter olmalıdır`), l && !/[A-Z]/.test(n) && c.push("Şifre en az bir büyük harf içermelidir"), o && !/[a-z]/.test(n) && c.push("Şifre en az bir küçük harf içermelidir"), r && !/\d/.test(n) && c.push("Şifre en az bir rakam içermelidir"), i && !/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(n) && c.push("Şifre en az bir özel karakter içermelidir"), {
83
+ isValid: c.length === 0,
84
+ errors: c
81
85
  };
82
86
  }
83
- function F(i) {
87
+ function at(n) {
84
88
  const {
85
- required: t = !1,
86
- requiredMessage: s = "Şifre zorunludur",
87
- minLength: a = 8,
88
- requireUppercase: n = !0,
89
- requireLowercase: e = !0,
90
- requireNumber: r = !0,
91
- requireSpecialChar: u = !0,
92
- minLengthMessage: l = `Şifre en az ${a} karakter olmalıdır`,
93
- uppercaseMessage: c = "Şifre en az bir büyük harf içermelidir",
94
- lowercaseMessage: h = "Şifre en az bir küçük harf içermelidir",
95
- numberMessage: d = "Şifre en az bir rakam içermelidir",
96
- specialCharMessage: m = "Şifre en az bir özel karakter içermelidir"
97
- } = i || {};
98
- let o = f.string();
99
- return t && (o = o.required(s)), o = o.min(a, l), n && (o = o.matches(/[A-Z]/, c)), e && (o = o.matches(/[a-z]/, h)), r && (o = o.matches(/\d/, d)), u && (o = o.matches(
89
+ required: a = !1,
90
+ requiredMessage: u = "Şifre zorunludur",
91
+ minLength: l = 8,
92
+ requireUppercase: o = !0,
93
+ requireLowercase: r = !0,
94
+ requireNumber: i = !0,
95
+ requireSpecialChar: c = !0,
96
+ minLengthMessage: p = `Şifre en az ${l} karakter olmalıdır`,
97
+ uppercaseMessage: k = "Şifre en az bir büyük harf içermelidir",
98
+ lowercaseMessage: _ = "Şifre en az bir küçük harf içermelidir",
99
+ numberMessage: b = "Şifre en az bir rakam içermelidir",
100
+ specialCharMessage: y = "Şifre en az bir özel karakter içermelidir"
101
+ } = n || {};
102
+ let g = z.string();
103
+ return a && (g = g.required(u)), g = g.min(l, p), o && (g = g.matches(/[A-Z]/, k)), r && (g = g.matches(/[a-z]/, _)), i && (g = g.matches(/\d/, b)), c && (g = g.matches(
100
104
  /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/,
101
- m
102
- )), o;
105
+ y
106
+ )), g;
103
107
  }
104
- function K(i, t) {
108
+ function st(n, a) {
105
109
  const {
106
- required: s = !1,
107
- message: a = "Şifreler eşleşmiyor",
108
- requiredMessage: n = "Şifre tekrarı zorunludur"
109
- } = t || {};
110
- let e = f.string();
111
- return s && (e = e.required(n)), e = e.oneOf([f.ref(i)], a), e;
110
+ required: u = !1,
111
+ message: l = "Şifreler eşleşmiyor",
112
+ requiredMessage: o = "Şifre tekrarı zorunludur"
113
+ } = a || {};
114
+ let r = z.string();
115
+ return u && (r = r.required(o)), r = r.oneOf([z.ref(n)], l), r;
112
116
  }
113
- const b = /^[a-zA-ZçğıöşüÇĞIİÖŞÜ\s]+$/;
114
- function A(i) {
115
- return !i || i.trim().length === 0 || i.trim().length < 2 ? !1 : b.test(i);
117
+ const Je = /^[a-zA-ZçğıöşüÇĞIİÖŞÜ\s]+$/;
118
+ function jr(n) {
119
+ return !n || n.trim().length === 0 || n.trim().length < 2 ? !1 : Je.test(n);
116
120
  }
117
- function Z(i) {
121
+ function ot(n) {
118
122
  const {
119
- required: t = !1,
120
- message: s = "İsim sadece harf içermelidir",
121
- requiredMessage: a = "İsim zorunludur",
122
- name: n = "name"
123
- } = i || {};
124
- let e = f.string();
125
- return t && (e = e.required(a)), e = e.min(2, "İsim en az 2 karakter olmalıdır").matches(b, s).test({
126
- name: n,
127
- message: s,
128
- test(r) {
129
- return !t && (!r || r.trim() === "") ? !0 : t && !r || !r || typeof r != "string" ? !1 : A(r);
130
- }
131
- }), e;
123
+ required: a = !1,
124
+ message: u = "İsim sadece harf içermelidir",
125
+ requiredMessage: l = "İsim zorunludur",
126
+ name: o = "name"
127
+ } = n || {};
128
+ let r = z.string();
129
+ return a && (r = r.required(l)), r = r.min(2, "İsim en az 2 karakter olmalıdır").matches(Je, u).test({
130
+ name: o,
131
+ message: u,
132
+ test(i) {
133
+ return !a && (!i || i.trim() === "") ? !0 : a && !i || !i || typeof i != "string" ? !1 : jr(i);
134
+ }
135
+ }), r;
132
136
  }
133
- const w = /^TR\d{2}[0-9A-Z]{4}\d{1}[0-9A-Z]{15,30}$/i;
134
- function B(i) {
135
- const t = i.replace(/\s+/g, "").toUpperCase();
136
- if (!w.test(t))
137
+ const Ar = /^TR\d{2}[0-9A-Z]{4}\d{1}[0-9A-Z]{15,30}$/i;
138
+ function Ir(n) {
139
+ const a = n.replace(/\s+/g, "").toUpperCase();
140
+ if (!Ar.test(a))
137
141
  return !1;
138
- const a = (t.slice(4) + t.slice(0, 4)).split("").map((e) => {
139
- const r = e.charCodeAt(0);
140
- return r >= 65 && r <= 90 ? r - 55 : e;
142
+ const l = (a.slice(4) + a.slice(0, 4)).split("").map((r) => {
143
+ const i = r.charCodeAt(0);
144
+ return i >= 65 && i <= 90 ? i - 55 : r;
141
145
  }).join("");
142
- return BigInt(a) % BigInt(97) === BigInt(1);
146
+ return BigInt(l) % BigInt(97) === BigInt(1);
143
147
  }
144
- function O(i) {
148
+ function ut(n) {
145
149
  const {
146
- required: t = !1,
147
- message: s = "Geçerli bir IBAN numarası giriniz",
148
- requiredMessage: a = "IBAN zorunludur",
149
- name: n = "iban"
150
- } = i || {};
151
- let e = f.string();
152
- return t && (e = e.required(a)), e = e.test({
153
- name: n,
154
- message: s,
155
- test(r) {
156
- return !t && (!r || r.trim() === "") ? !0 : t && !r || !r || typeof r != "string" ? !1 : B(r);
157
- }
158
- }), e;
150
+ required: a = !1,
151
+ message: u = "Geçerli bir IBAN numarası giriniz",
152
+ requiredMessage: l = "IBAN zorunludur",
153
+ name: o = "iban"
154
+ } = n || {};
155
+ let r = z.string();
156
+ return a && (r = r.required(l)), r = r.test({
157
+ name: o,
158
+ message: u,
159
+ test(i) {
160
+ return !a && (!i || i.trim() === "") ? !0 : a && !i || !i || typeof i != "string" ? !1 : Ir(i);
161
+ }
162
+ }), r;
159
163
  }
160
- const N = /^\d{13,19}$/;
161
- function C(i) {
162
- const t = i.replace(/\s+/g, "").replace(/-/g, "");
163
- if (!N.test(t))
164
+ const Mr = /^\d{13,19}$/;
165
+ function $r(n) {
166
+ const a = n.replace(/\s+/g, "").replace(/-/g, "");
167
+ if (!Mr.test(a))
164
168
  return !1;
165
- let s = 0, a = !1;
166
- for (let n = t.length - 1; n >= 0; n--) {
167
- let e = parseInt(t[n], 10);
168
- a && (e *= 2, e > 9 && (e -= 9)), s += e, a = !a;
169
+ let u = 0, l = !1;
170
+ for (let o = a.length - 1; o >= 0; o--) {
171
+ let r = parseInt(a[o], 10);
172
+ l && (r *= 2, r > 9 && (r -= 9)), u += r, l = !l;
169
173
  }
170
- return s % 10 === 0;
174
+ return u % 10 === 0;
171
175
  }
172
- function U(i) {
176
+ function lt(n) {
173
177
  const {
174
- required: t = !1,
175
- message: s = "Geçerli bir kredi kartı numarası giriniz",
176
- requiredMessage: a = "Kredi kartı numarası zorunludur",
177
- name: n = "creditCard"
178
- } = i || {};
179
- let e = f.string();
180
- return t && (e = e.required(a)), e = e.test({
181
- name: n,
182
- message: s,
183
- test(r) {
184
- return !t && (!r || r.trim() === "") ? !0 : t && !r || !r || typeof r != "string" ? !1 : C(r);
185
- }
186
- }), e;
178
+ required: a = !1,
179
+ message: u = "Geçerli bir kredi kartı numarası giriniz",
180
+ requiredMessage: l = "Kredi kartı numarası zorunludur",
181
+ name: o = "creditCard"
182
+ } = n || {};
183
+ let r = z.string();
184
+ return a && (r = r.required(l)), r = r.test({
185
+ name: o,
186
+ message: u,
187
+ test(i) {
188
+ return !a && (!i || i.trim() === "") ? !0 : a && !i || !i || typeof i != "string" ? !1 : $r(i);
189
+ }
190
+ }), r;
187
191
  }
188
- const G = /^\d{10}$/;
189
- function X(i) {
190
- if (!G.test(i))
192
+ const qr = /^\d{10}$/;
193
+ function Fr(n) {
194
+ if (!qr.test(n))
191
195
  return !1;
192
- const t = i.split("").map(Number);
193
- return t.slice(0, 9).reduce((n, e, r) => {
194
- const u = (r + 1) % 9 || 9;
195
- return n + e * u;
196
- }, 0) % 11 % 10 === t[9];
196
+ const a = n.split("").map(Number);
197
+ return a.slice(0, 9).reduce((o, r, i) => {
198
+ const c = (i + 1) % 9 || 9;
199
+ return o + r * c;
200
+ }, 0) % 11 % 10 === a[9];
197
201
  }
198
- function P(i) {
202
+ function ft(n) {
199
203
  const {
200
- required: t = !1,
201
- message: s = "Geçerli bir VKN (Vergi Kimlik Numarası) giriniz",
202
- requiredMessage: a = "VKN zorunludur",
203
- name: n = "vkn"
204
- } = i || {};
205
- let e = f.string();
206
- return t && (e = e.required(a)), e = e.test({
207
- name: n,
208
- message: s,
209
- test(r) {
210
- return !t && (!r || r.trim() === "") ? !0 : t && !r || !r || typeof r != "string" ? !1 : X(r);
211
- }
212
- }), e;
204
+ required: a = !1,
205
+ message: u = "Geçerli bir VKN (Vergi Kimlik Numarası) giriniz",
206
+ requiredMessage: l = "VKN zorunludur",
207
+ name: o = "vkn"
208
+ } = n || {};
209
+ let r = z.string();
210
+ return a && (r = r.required(l)), r = r.test({
211
+ name: o,
212
+ message: u,
213
+ test(i) {
214
+ return !a && (!i || i.trim() === "") ? !0 : a && !i || !i || typeof i != "string" ? !1 : Fr(i);
215
+ }
216
+ }), r;
213
217
  }
214
- const z = /^(\d{2})\s?([A-ZÇĞIİÖŞÜ]{1,3})\s?(\d{2,4})$/i;
215
- function I(i) {
216
- const t = i.replace(/\s+/g, " ").trim().toUpperCase();
217
- if (!z.test(t))
218
+ const Ye = /^(\d{2})\s?([A-ZÇĞIİÖŞÜ]{1,3})\s?(\d{2,4})$/i;
219
+ function Nr(n) {
220
+ const a = n.replace(/\s+/g, " ").trim().toUpperCase();
221
+ if (!Ye.test(a))
218
222
  return !1;
219
- const s = t.match(z);
220
- if (!s)
223
+ const u = a.match(Ye);
224
+ if (!u)
221
225
  return !1;
222
- const [, a, n, e] = s, r = parseInt(a, 10);
223
- return !(r < 1 || r > 81 || n.length < 1 || n.length > 3 || e.length < 2 || e.length > 4);
226
+ const [, l, o, r] = u, i = parseInt(l, 10);
227
+ return !(i < 1 || i > 81 || o.length < 1 || o.length > 3 || r.length < 2 || r.length > 4);
224
228
  }
225
- function H(i) {
229
+ function ct(n) {
226
230
  const {
227
- required: t = !1,
228
- message: s = "Geçerli bir araç plakası giriniz (örn: 34 ABC 123)",
229
- requiredMessage: a = "Araç plakası zorunludur",
230
- name: n = "plate"
231
- } = i || {};
232
- let e = f.string();
233
- return t && (e = e.required(a)), e = e.test({
234
- name: n,
235
- message: s,
236
- test(r) {
237
- return !t && (!r || r.trim() === "") ? !0 : t && !r || !r || typeof r != "string" ? !1 : I(r);
238
- }
239
- }), e;
231
+ required: a = !1,
232
+ message: u = "Geçerli bir araç plakası giriniz (örn: 34 ABC 123)",
233
+ requiredMessage: l = "Araç plakası zorunludur",
234
+ name: o = "plate"
235
+ } = n || {};
236
+ let r = z.string();
237
+ return a && (r = r.required(l)), r = r.test({
238
+ name: o,
239
+ message: u,
240
+ test(i) {
241
+ return !a && (!i || i.trim() === "") ? !0 : a && !i || !i || typeof i != "string" ? !1 : Nr(i);
242
+ }
243
+ }), r;
240
244
  }
241
- function g(i) {
242
- const t = i.split(".");
243
- return t.length > 1 ? t[t.length - 1].toLowerCase() : "";
245
+ function he(n) {
246
+ const a = n.split(".");
247
+ return a.length > 1 ? a[a.length - 1].toLowerCase() : "";
244
248
  }
245
- async function Y(i, t) {
249
+ async function dt(n, a) {
246
250
  const {
247
- maxSize: s,
248
- minSize: a,
249
- allowedExtensions: n = [],
250
- allowedMimeTypes: e = []
251
- } = t || {}, r = [];
252
- if (s && i.size > s) {
253
- const u = (s / 1048576).toFixed(2);
254
- r.push(`Dosya boyutu en fazla ${u} MB olmalıdır`);
251
+ maxSize: u,
252
+ minSize: l,
253
+ allowedExtensions: o = [],
254
+ allowedMimeTypes: r = []
255
+ } = a || {}, i = [];
256
+ if (u && n.size > u) {
257
+ const c = (u / 1048576).toFixed(2);
258
+ i.push(`Dosya boyutu en fazla ${c} MB olmalıdır`);
255
259
  }
256
- if (a && i.size < a) {
257
- const u = (a / 1048576).toFixed(2);
258
- r.push(`Dosya boyutu en az ${u} MB olmalıdır`);
260
+ if (l && n.size < l) {
261
+ const c = (l / 1048576).toFixed(2);
262
+ i.push(`Dosya boyutu en az ${c} MB olmalıdır`);
259
263
  }
260
- if (n.length > 0 && e.length === 0 && console.warn(
264
+ if (o.length > 0 && r.length === 0 && console.warn(
261
265
  "⚠️ UYARI: Sadece dosya uzantısı kontrolü yapılıyor. Güvenlik için 'allowedMimeTypes' parametresini kullanarak magic bytes kontrolü yapmanız önerilir."
262
- ), n.length > 0 && i instanceof File) {
263
- const u = g(i.name);
264
- n.includes(u) || r.push(
265
- `İzin verilen dosya uzantıları: ${n.join(", ")}`
266
+ ), o.length > 0 && n instanceof File) {
267
+ const c = he(n.name);
268
+ o.includes(c) || i.push(
269
+ `İzin verilen dosya uzantıları: ${o.join(", ")}`
266
270
  );
267
271
  }
268
- if (e.length > 0)
272
+ if (r.length > 0)
269
273
  try {
270
- const u = await i.arrayBuffer(), l = new Uint8Array(u), c = await p(l);
271
- c ? e.includes(c.mime) || r.push(
272
- `Dosya tipi uyumsuz. Beklenen: ${e.join(", ")}, Tespit edilen: ${c.mime}. (Dosya uzantısı: ${i instanceof File ? g(i.name) : "bilinmiyor"})`
273
- ) : r.push(
274
+ const c = await n.arrayBuffer(), p = new Uint8Array(c), k = await Xe(p);
275
+ k ? r.includes(k.mime) || i.push(
276
+ `Dosya tipi uyumsuz. Beklenen: ${r.join(", ")}, Tespit edilen: ${k.mime}. (Dosya uzantısı: ${n instanceof File ? he(n.name) : "bilinmiyor"})`
277
+ ) : i.push(
274
278
  "Dosya tipi belirlenemedi. Dosya bozuk olabilir veya desteklenmeyen bir formatta olabilir."
275
279
  );
276
280
  } catch {
277
- r.push("Dosya tipi kontrol edilemedi. Dosya okunamadı.");
281
+ i.push("Dosya tipi kontrol edilemedi. Dosya okunamadı.");
278
282
  }
279
283
  return {
280
- isValid: r.length === 0,
281
- errors: r
284
+ isValid: i.length === 0,
285
+ errors: i
282
286
  };
283
287
  }
284
- function J(i) {
288
+ function mt(n) {
285
289
  const {
286
- required: t = !1,
287
- message: s = "Geçerli bir dosya seçiniz",
288
- requiredMessage: a = "Dosya zorunludur",
289
- name: n = "file",
290
- maxSize: e,
291
- minSize: r,
292
- allowedExtensions: u = [],
293
- allowedMimeTypes: l = [],
294
- sizeMessage: c,
295
- extensionMessage: h
296
- } = i || {};
297
- let d = f.mixed();
298
- return t && (d = d.required(a)), d = d.test({
299
- name: n,
300
- message: s || "Geçerli bir dosya seçiniz",
301
- async test(m) {
302
- if (!t && !m)
290
+ required: a = !1,
291
+ message: u = "Geçerli bir dosya seçiniz",
292
+ requiredMessage: l = "Dosya zorunludur",
293
+ name: o = "file",
294
+ maxSize: r,
295
+ minSize: i,
296
+ allowedExtensions: c = [],
297
+ allowedMimeTypes: p = [],
298
+ sizeMessage: k,
299
+ extensionMessage: _
300
+ } = n || {};
301
+ let b = z.mixed();
302
+ return a && (b = b.required(l)), b = b.test({
303
+ name: o,
304
+ message: u || "Geçerli bir dosya seçiniz",
305
+ async test(y) {
306
+ if (!a && !y)
303
307
  return !0;
304
- if (t && !m || !(m instanceof File))
308
+ if (a && !y || !(y instanceof File))
305
309
  return !1;
306
- if (e && m.size > e) {
307
- const o = (e / 1048576).toFixed(2);
310
+ if (r && y.size > r) {
311
+ const g = (r / 1048576).toFixed(2);
308
312
  return this.createError({
309
- message: c || `Dosya boyutu en fazla ${o} MB olmalıdır`
313
+ message: k || `Dosya boyutu en fazla ${g} MB olmalıdır`
310
314
  });
311
315
  }
312
- if (r && m.size < r) {
313
- const o = (r / 1048576).toFixed(2);
316
+ if (i && y.size < i) {
317
+ const g = (i / 1048576).toFixed(2);
314
318
  return this.createError({
315
- message: c || `Dosya boyutu en az ${o} MB olmalıdır`
319
+ message: k || `Dosya boyutu en az ${g} MB olmalıdır`
316
320
  });
317
321
  }
318
- if (u.length > 0) {
319
- const o = g(m.name);
320
- if (!u.includes(o))
322
+ if (c.length > 0) {
323
+ const g = he(y.name);
324
+ if (!c.includes(g))
321
325
  return this.createError({
322
- message: h || `İzin verilen dosya uzantıları: ${u.join(", ")}`
326
+ message: _ || `İzin verilen dosya uzantıları: ${c.join(", ")}`
323
327
  });
324
328
  }
325
- if (l.length > 0)
329
+ if (p.length > 0)
326
330
  try {
327
- const o = await m.arrayBuffer(), q = new Uint8Array(o), y = await p(q);
328
- if (!y)
331
+ const g = await y.arrayBuffer(), F = new Uint8Array(g), A = await Xe(F);
332
+ if (!A)
329
333
  return this.createError({
330
334
  message: "Dosya tipi belirlenemedi. Dosya bozuk olabilir veya desteklenmeyen bir formatta olabilir."
331
335
  });
332
- if (!l.includes(y.mime)) {
333
- const M = g(m.name);
336
+ if (!p.includes(A.mime)) {
337
+ const Z = he(y.name);
334
338
  return this.createError({
335
- message: `Dosya tipi uyumsuz. Beklenen: ${l.join(
339
+ message: `Dosya tipi uyumsuz. Beklenen: ${p.join(
336
340
  ", "
337
- )}, Tespit edilen: ${y.mime}. (Dosya uzantısı: ${M})`
341
+ )}, Tespit edilen: ${A.mime}. (Dosya uzantısı: ${Z})`
338
342
  });
339
343
  }
340
344
  } catch {
@@ -344,103 +348,942 @@ function J(i) {
344
348
  }
345
349
  return !0;
346
350
  }
347
- }), d;
351
+ }), b;
348
352
  }
349
- function Q(i, t) {
350
- const { minDate: s, maxDate: a } = t || {}, n = typeof i == "string" ? new Date(i) : i;
351
- if (isNaN(n.getTime()))
353
+ function pt(n, a) {
354
+ const { minDate: u, maxDate: l } = a || {}, o = typeof n == "string" ? new Date(n) : n;
355
+ if (isNaN(o.getTime()))
352
356
  return { isValid: !1, error: "Geçersiz tarih formatı" };
353
- if (s) {
354
- const e = typeof s == "string" ? new Date(s) : s;
355
- if (n < e)
357
+ if (u) {
358
+ const r = typeof u == "string" ? new Date(u) : u;
359
+ if (o < r)
356
360
  return {
357
361
  isValid: !1,
358
- error: `Tarih ${e.toLocaleDateString("tr-TR")} tarihinden sonra olmalıdır`
362
+ error: `Tarih ${r.toLocaleDateString("tr-TR")} tarihinden sonra olmalıdır`
359
363
  };
360
364
  }
361
- if (a) {
362
- const e = typeof a == "string" ? new Date(a) : a;
363
- if (n > e)
365
+ if (l) {
366
+ const r = typeof l == "string" ? new Date(l) : l;
367
+ if (o > r)
364
368
  return {
365
369
  isValid: !1,
366
- error: `Tarih ${e.toLocaleDateString("tr-TR")} tarihinden önce olmalıdır`
370
+ error: `Tarih ${r.toLocaleDateString("tr-TR")} tarihinden önce olmalıdır`
367
371
  };
368
372
  }
369
373
  return { isValid: !0 };
370
374
  }
371
- function D(i) {
375
+ function He(n) {
372
376
  const {
373
- required: t = !1,
374
- requiredMessage: s = "Tarih zorunludur",
375
- minDate: a,
376
- maxDate: n,
377
- minDateMessage: e,
378
- maxDateMessage: r
379
- } = i || {};
380
- let u = f.date();
381
- if (t && (u = u.required(s)), a) {
382
- const l = typeof a == "string" ? new Date(a) : a;
383
- u = u.min(
384
- l,
385
- e || `Tarih ${l.toLocaleDateString("tr-TR")} tarihinden sonra olmalıdır`
377
+ required: a = !1,
378
+ requiredMessage: u = "Tarih zorunludur",
379
+ minDate: l,
380
+ maxDate: o,
381
+ minDateMessage: r,
382
+ maxDateMessage: i
383
+ } = n || {};
384
+ let c = z.date();
385
+ if (a && (c = c.required(u)), l) {
386
+ const p = typeof l == "string" ? new Date(l) : l;
387
+ c = c.min(
388
+ p,
389
+ r || `Tarih ${p.toLocaleDateString("tr-TR")} tarihinden sonra olmalıdır`
386
390
  );
387
391
  }
388
- if (n) {
389
- const l = typeof n == "string" ? new Date(n) : n;
390
- u = u.max(
391
- l,
392
- r || `Tarih ${l.toLocaleDateString("tr-TR")} tarihinden önce olmalıdır`
392
+ if (o) {
393
+ const p = typeof o == "string" ? new Date(o) : o;
394
+ c = c.max(
395
+ p,
396
+ i || `Tarih ${p.toLocaleDateString("tr-TR")} tarihinden önce olmalıdır`
393
397
  );
394
398
  }
395
- return u;
399
+ return c;
396
400
  }
397
- function W(i) {
398
- return D({
399
- ...i,
401
+ function gt(n) {
402
+ return He({
403
+ ...n,
400
404
  maxDate: /* @__PURE__ */ new Date(),
401
- maxDateMessage: (i == null ? void 0 : i.message) || "Tarih geçmiş bir tarih olmalıdır"
405
+ maxDateMessage: (n == null ? void 0 : n.message) || "Tarih geçmiş bir tarih olmalıdır"
402
406
  });
403
407
  }
404
- function v(i) {
405
- return D({
406
- ...i,
408
+ function ht(n) {
409
+ return He({
410
+ ...n,
407
411
  minDate: /* @__PURE__ */ new Date(),
408
- minDateMessage: (i == null ? void 0 : i.message) || "Tarih gelecek bir tarih olmalıdır"
412
+ minDateMessage: (n == null ? void 0 : n.message) || "Tarih gelecek bir tarih olmalıdır"
409
413
  });
410
414
  }
415
+ var De = { exports: {} }, ae = {};
416
+ /**
417
+ * @license React
418
+ * react-jsx-runtime.production.min.js
419
+ *
420
+ * Copyright (c) Facebook, Inc. and its affiliates.
421
+ *
422
+ * This source code is licensed under the MIT license found in the
423
+ * LICENSE file in the root directory of this source tree.
424
+ */
425
+ var Ge;
426
+ function Br() {
427
+ if (Ge) return ae;
428
+ Ge = 1;
429
+ var n = Ke, a = Symbol.for("react.element"), u = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, o = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, r = { key: !0, ref: !0, __self: !0, __source: !0 };
430
+ function i(c, p, k) {
431
+ var _, b = {}, y = null, g = null;
432
+ k !== void 0 && (y = "" + k), p.key !== void 0 && (y = "" + p.key), p.ref !== void 0 && (g = p.ref);
433
+ for (_ in p) l.call(p, _) && !r.hasOwnProperty(_) && (b[_] = p[_]);
434
+ if (c && c.defaultProps) for (_ in p = c.defaultProps, p) b[_] === void 0 && (b[_] = p[_]);
435
+ return { $$typeof: a, type: c, key: y, ref: g, props: b, _owner: o.current };
436
+ }
437
+ return ae.Fragment = u, ae.jsx = i, ae.jsxs = i, ae;
438
+ }
439
+ var se = {};
440
+ /**
441
+ * @license React
442
+ * react-jsx-runtime.development.js
443
+ *
444
+ * Copyright (c) Facebook, Inc. and its affiliates.
445
+ *
446
+ * This source code is licensed under the MIT license found in the
447
+ * LICENSE file in the root directory of this source tree.
448
+ */
449
+ var We;
450
+ function Lr() {
451
+ return We || (We = 1, process.env.NODE_ENV !== "production" && function() {
452
+ var n = Ke, a = Symbol.for("react.element"), u = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), c = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), F = Symbol.iterator, A = "@@iterator";
453
+ function Z(e) {
454
+ if (e === null || typeof e != "object")
455
+ return null;
456
+ var t = F && e[F] || e[A];
457
+ return typeof t == "function" ? t : null;
458
+ }
459
+ var M = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
460
+ function D(e) {
461
+ {
462
+ for (var t = arguments.length, s = new Array(t > 1 ? t - 1 : 0), f = 1; f < t; f++)
463
+ s[f - 1] = arguments[f];
464
+ oe("error", e, s);
465
+ }
466
+ }
467
+ function oe(e, t, s) {
468
+ {
469
+ var f = M.ReactDebugCurrentFrame, h = f.getStackAddendum();
470
+ h !== "" && (t += "%s", s = s.concat([h]));
471
+ var v = s.map(function(m) {
472
+ return String(m);
473
+ });
474
+ v.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, v);
475
+ }
476
+ }
477
+ var ue = !1, le = !1, fe = !1, J = !1, ce = !1, H;
478
+ H = Symbol.for("react.module.reference");
479
+ function Q(e) {
480
+ return !!(typeof e == "string" || typeof e == "function" || e === l || e === r || ce || e === o || e === k || e === _ || J || e === g || ue || le || fe || typeof e == "object" && e !== null && (e.$$typeof === y || e.$$typeof === b || e.$$typeof === i || e.$$typeof === c || e.$$typeof === p || // This needs to include all possible module reference object
481
+ // types supported by any Flight configuration anywhere since
482
+ // we don't know which Flight build this will end up being used
483
+ // with.
484
+ e.$$typeof === H || e.getModuleId !== void 0));
485
+ }
486
+ function ee(e, t, s) {
487
+ var f = e.displayName;
488
+ if (f)
489
+ return f;
490
+ var h = t.displayName || t.name || "";
491
+ return h !== "" ? s + "(" + h + ")" : s;
492
+ }
493
+ function L(e) {
494
+ return e.displayName || "Context";
495
+ }
496
+ function P(e) {
497
+ if (e == null)
498
+ return null;
499
+ if (typeof e.tag == "number" && D("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
500
+ return e.displayName || e.name || null;
501
+ if (typeof e == "string")
502
+ return e;
503
+ switch (e) {
504
+ case l:
505
+ return "Fragment";
506
+ case u:
507
+ return "Portal";
508
+ case r:
509
+ return "Profiler";
510
+ case o:
511
+ return "StrictMode";
512
+ case k:
513
+ return "Suspense";
514
+ case _:
515
+ return "SuspenseList";
516
+ }
517
+ if (typeof e == "object")
518
+ switch (e.$$typeof) {
519
+ case c:
520
+ var t = e;
521
+ return L(t) + ".Consumer";
522
+ case i:
523
+ var s = e;
524
+ return L(s._context) + ".Provider";
525
+ case p:
526
+ return ee(e, e.render, "ForwardRef");
527
+ case b:
528
+ var f = e.displayName || null;
529
+ return f !== null ? f : P(e.type) || "Memo";
530
+ case y: {
531
+ var h = e, v = h._payload, m = h._init;
532
+ try {
533
+ return P(m(v));
534
+ } catch {
535
+ return null;
536
+ }
537
+ }
538
+ }
539
+ return null;
540
+ }
541
+ var x = Object.assign, S = 0, N, de, V, re, te, me, ne;
542
+ function I() {
543
+ }
544
+ I.__reactDisabledLog = !0;
545
+ function U() {
546
+ {
547
+ if (S === 0) {
548
+ N = console.log, de = console.info, V = console.warn, re = console.error, te = console.group, me = console.groupCollapsed, ne = console.groupEnd;
549
+ var e = {
550
+ configurable: !0,
551
+ enumerable: !0,
552
+ value: I,
553
+ writable: !0
554
+ };
555
+ Object.defineProperties(console, {
556
+ info: e,
557
+ log: e,
558
+ warn: e,
559
+ error: e,
560
+ group: e,
561
+ groupCollapsed: e,
562
+ groupEnd: e
563
+ });
564
+ }
565
+ S++;
566
+ }
567
+ }
568
+ function Y() {
569
+ {
570
+ if (S--, S === 0) {
571
+ var e = {
572
+ configurable: !0,
573
+ enumerable: !0,
574
+ writable: !0
575
+ };
576
+ Object.defineProperties(console, {
577
+ log: x({}, e, {
578
+ value: N
579
+ }),
580
+ info: x({}, e, {
581
+ value: de
582
+ }),
583
+ warn: x({}, e, {
584
+ value: V
585
+ }),
586
+ error: x({}, e, {
587
+ value: re
588
+ }),
589
+ group: x({}, e, {
590
+ value: te
591
+ }),
592
+ groupCollapsed: x({}, e, {
593
+ value: me
594
+ }),
595
+ groupEnd: x({}, e, {
596
+ value: ne
597
+ })
598
+ });
599
+ }
600
+ S < 0 && D("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
601
+ }
602
+ }
603
+ var G = M.ReactCurrentDispatcher, $;
604
+ function W(e, t, s) {
605
+ {
606
+ if ($ === void 0)
607
+ try {
608
+ throw Error();
609
+ } catch (h) {
610
+ var f = h.stack.trim().match(/\n( *(at )?)/);
611
+ $ = f && f[1] || "";
612
+ }
613
+ return `
614
+ ` + $ + e;
615
+ }
616
+ }
617
+ var T = !1, C;
618
+ {
619
+ var ve = typeof WeakMap == "function" ? WeakMap : Map;
620
+ C = new ve();
621
+ }
622
+ function Ce(e, t) {
623
+ if (!e || T)
624
+ return "";
625
+ {
626
+ var s = C.get(e);
627
+ if (s !== void 0)
628
+ return s;
629
+ }
630
+ var f;
631
+ T = !0;
632
+ var h = Error.prepareStackTrace;
633
+ Error.prepareStackTrace = void 0;
634
+ var v;
635
+ v = G.current, G.current = null, U();
636
+ try {
637
+ if (t) {
638
+ var m = function() {
639
+ throw Error();
640
+ };
641
+ if (Object.defineProperty(m.prototype, "props", {
642
+ set: function() {
643
+ throw Error();
644
+ }
645
+ }), typeof Reflect == "object" && Reflect.construct) {
646
+ try {
647
+ Reflect.construct(m, []);
648
+ } catch (O) {
649
+ f = O;
650
+ }
651
+ Reflect.construct(e, [], m);
652
+ } else {
653
+ try {
654
+ m.call();
655
+ } catch (O) {
656
+ f = O;
657
+ }
658
+ e.call(m.prototype);
659
+ }
660
+ } else {
661
+ try {
662
+ throw Error();
663
+ } catch (O) {
664
+ f = O;
665
+ }
666
+ e();
667
+ }
668
+ } catch (O) {
669
+ if (O && f && typeof O.stack == "string") {
670
+ for (var d = O.stack.split(`
671
+ `), w = f.stack.split(`
672
+ `), E = d.length - 1, R = w.length - 1; E >= 1 && R >= 0 && d[E] !== w[R]; )
673
+ R--;
674
+ for (; E >= 1 && R >= 0; E--, R--)
675
+ if (d[E] !== w[R]) {
676
+ if (E !== 1 || R !== 1)
677
+ do
678
+ if (E--, R--, R < 0 || d[E] !== w[R]) {
679
+ var j = `
680
+ ` + d[E].replace(" at new ", " at ");
681
+ return e.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", e.displayName)), typeof e == "function" && C.set(e, j), j;
682
+ }
683
+ while (E >= 1 && R >= 0);
684
+ break;
685
+ }
686
+ }
687
+ } finally {
688
+ T = !1, G.current = v, Y(), Error.prepareStackTrace = h;
689
+ }
690
+ var K = e ? e.displayName || e.name : "", B = K ? W(K) : "";
691
+ return typeof e == "function" && C.set(e, B), B;
692
+ }
693
+ function Qe(e, t, s) {
694
+ return Ce(e, !1);
695
+ }
696
+ function er(e) {
697
+ var t = e.prototype;
698
+ return !!(t && t.isReactComponent);
699
+ }
700
+ function pe(e, t, s) {
701
+ if (e == null)
702
+ return "";
703
+ if (typeof e == "function")
704
+ return Ce(e, er(e));
705
+ if (typeof e == "string")
706
+ return W(e);
707
+ switch (e) {
708
+ case k:
709
+ return W("Suspense");
710
+ case _:
711
+ return W("SuspenseList");
712
+ }
713
+ if (typeof e == "object")
714
+ switch (e.$$typeof) {
715
+ case p:
716
+ return Qe(e.render);
717
+ case b:
718
+ return pe(e.type, t, s);
719
+ case y: {
720
+ var f = e, h = f._payload, v = f._init;
721
+ try {
722
+ return pe(v(h), t, s);
723
+ } catch {
724
+ }
725
+ }
726
+ }
727
+ return "";
728
+ }
729
+ var ie = Object.prototype.hasOwnProperty, Se = {}, we = M.ReactDebugCurrentFrame;
730
+ function ge(e) {
731
+ if (e) {
732
+ var t = e._owner, s = pe(e.type, e._source, t ? t.type : null);
733
+ we.setExtraStackFrame(s);
734
+ } else
735
+ we.setExtraStackFrame(null);
736
+ }
737
+ function rr(e, t, s, f, h) {
738
+ {
739
+ var v = Function.call.bind(ie);
740
+ for (var m in e)
741
+ if (v(e, m)) {
742
+ var d = void 0;
743
+ try {
744
+ if (typeof e[m] != "function") {
745
+ var w = Error((f || "React class") + ": " + s + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
746
+ throw w.name = "Invariant Violation", w;
747
+ }
748
+ d = e[m](t, m, f, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
749
+ } catch (E) {
750
+ d = E;
751
+ }
752
+ d && !(d instanceof Error) && (ge(h), D("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", f || "React class", s, m, typeof d), ge(null)), d instanceof Error && !(d.message in Se) && (Se[d.message] = !0, ge(h), D("Failed %s type: %s", s, d.message), ge(null));
753
+ }
754
+ }
755
+ }
756
+ var tr = Array.isArray;
757
+ function ye(e) {
758
+ return tr(e);
759
+ }
760
+ function nr(e) {
761
+ {
762
+ var t = typeof Symbol == "function" && Symbol.toStringTag, s = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
763
+ return s;
764
+ }
765
+ }
766
+ function ir(e) {
767
+ try {
768
+ return xe(e), !1;
769
+ } catch {
770
+ return !0;
771
+ }
772
+ }
773
+ function xe(e) {
774
+ return "" + e;
775
+ }
776
+ function Oe(e) {
777
+ if (ir(e))
778
+ return D("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nr(e)), xe(e);
779
+ }
780
+ var Pe = M.ReactCurrentOwner, ar = {
781
+ key: !0,
782
+ ref: !0,
783
+ __self: !0,
784
+ __source: !0
785
+ }, ze, je;
786
+ function sr(e) {
787
+ if (ie.call(e, "ref")) {
788
+ var t = Object.getOwnPropertyDescriptor(e, "ref").get;
789
+ if (t && t.isReactWarning)
790
+ return !1;
791
+ }
792
+ return e.ref !== void 0;
793
+ }
794
+ function or(e) {
795
+ if (ie.call(e, "key")) {
796
+ var t = Object.getOwnPropertyDescriptor(e, "key").get;
797
+ if (t && t.isReactWarning)
798
+ return !1;
799
+ }
800
+ return e.key !== void 0;
801
+ }
802
+ function ur(e, t) {
803
+ typeof e.ref == "string" && Pe.current;
804
+ }
805
+ function lr(e, t) {
806
+ {
807
+ var s = function() {
808
+ ze || (ze = !0, D("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
809
+ };
810
+ s.isReactWarning = !0, Object.defineProperty(e, "key", {
811
+ get: s,
812
+ configurable: !0
813
+ });
814
+ }
815
+ }
816
+ function fr(e, t) {
817
+ {
818
+ var s = function() {
819
+ je || (je = !0, D("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
820
+ };
821
+ s.isReactWarning = !0, Object.defineProperty(e, "ref", {
822
+ get: s,
823
+ configurable: !0
824
+ });
825
+ }
826
+ }
827
+ var cr = function(e, t, s, f, h, v, m) {
828
+ var d = {
829
+ // This tag allows us to uniquely identify this as a React Element
830
+ $$typeof: a,
831
+ // Built-in properties that belong on the element
832
+ type: e,
833
+ key: t,
834
+ ref: s,
835
+ props: m,
836
+ // Record the component responsible for creating this element.
837
+ _owner: v
838
+ };
839
+ return d._store = {}, Object.defineProperty(d._store, "validated", {
840
+ configurable: !1,
841
+ enumerable: !1,
842
+ writable: !0,
843
+ value: !1
844
+ }), Object.defineProperty(d, "_self", {
845
+ configurable: !1,
846
+ enumerable: !1,
847
+ writable: !1,
848
+ value: f
849
+ }), Object.defineProperty(d, "_source", {
850
+ configurable: !1,
851
+ enumerable: !1,
852
+ writable: !1,
853
+ value: h
854
+ }), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
855
+ };
856
+ function dr(e, t, s, f, h) {
857
+ {
858
+ var v, m = {}, d = null, w = null;
859
+ s !== void 0 && (Oe(s), d = "" + s), or(t) && (Oe(t.key), d = "" + t.key), sr(t) && (w = t.ref, ur(t, h));
860
+ for (v in t)
861
+ ie.call(t, v) && !ar.hasOwnProperty(v) && (m[v] = t[v]);
862
+ if (e && e.defaultProps) {
863
+ var E = e.defaultProps;
864
+ for (v in E)
865
+ m[v] === void 0 && (m[v] = E[v]);
866
+ }
867
+ if (d || w) {
868
+ var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
869
+ d && lr(m, R), w && fr(m, R);
870
+ }
871
+ return cr(e, d, w, h, f, Pe.current, m);
872
+ }
873
+ }
874
+ var be = M.ReactCurrentOwner, Ae = M.ReactDebugCurrentFrame;
875
+ function X(e) {
876
+ if (e) {
877
+ var t = e._owner, s = pe(e.type, e._source, t ? t.type : null);
878
+ Ae.setExtraStackFrame(s);
879
+ } else
880
+ Ae.setExtraStackFrame(null);
881
+ }
882
+ var Ee;
883
+ Ee = !1;
884
+ function _e(e) {
885
+ return typeof e == "object" && e !== null && e.$$typeof === a;
886
+ }
887
+ function Ie() {
888
+ {
889
+ if (be.current) {
890
+ var e = P(be.current.type);
891
+ if (e)
892
+ return `
893
+
894
+ Check the render method of \`` + e + "`.";
895
+ }
896
+ return "";
897
+ }
898
+ }
899
+ function mr(e) {
900
+ return "";
901
+ }
902
+ var Me = {};
903
+ function pr(e) {
904
+ {
905
+ var t = Ie();
906
+ if (!t) {
907
+ var s = typeof e == "string" ? e : e.displayName || e.name;
908
+ s && (t = `
909
+
910
+ Check the top-level render call using <` + s + ">.");
911
+ }
912
+ return t;
913
+ }
914
+ }
915
+ function $e(e, t) {
916
+ {
917
+ if (!e._store || e._store.validated || e.key != null)
918
+ return;
919
+ e._store.validated = !0;
920
+ var s = pr(t);
921
+ if (Me[s])
922
+ return;
923
+ Me[s] = !0;
924
+ var f = "";
925
+ e && e._owner && e._owner !== be.current && (f = " It was passed a child from " + P(e._owner.type) + "."), X(e), D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', s, f), X(null);
926
+ }
927
+ }
928
+ function qe(e, t) {
929
+ {
930
+ if (typeof e != "object")
931
+ return;
932
+ if (ye(e))
933
+ for (var s = 0; s < e.length; s++) {
934
+ var f = e[s];
935
+ _e(f) && $e(f, t);
936
+ }
937
+ else if (_e(e))
938
+ e._store && (e._store.validated = !0);
939
+ else if (e) {
940
+ var h = Z(e);
941
+ if (typeof h == "function" && h !== e.entries)
942
+ for (var v = h.call(e), m; !(m = v.next()).done; )
943
+ _e(m.value) && $e(m.value, t);
944
+ }
945
+ }
946
+ }
947
+ function gr(e) {
948
+ {
949
+ var t = e.type;
950
+ if (t == null || typeof t == "string")
951
+ return;
952
+ var s;
953
+ if (typeof t == "function")
954
+ s = t.propTypes;
955
+ else if (typeof t == "object" && (t.$$typeof === p || // Note: Memo only checks outer props here.
956
+ // Inner props are checked in the reconciler.
957
+ t.$$typeof === b))
958
+ s = t.propTypes;
959
+ else
960
+ return;
961
+ if (s) {
962
+ var f = P(t);
963
+ rr(s, e.props, "prop", f, e);
964
+ } else if (t.PropTypes !== void 0 && !Ee) {
965
+ Ee = !0;
966
+ var h = P(t);
967
+ D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", h || "Unknown");
968
+ }
969
+ typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
970
+ }
971
+ }
972
+ function hr(e) {
973
+ {
974
+ for (var t = Object.keys(e.props), s = 0; s < t.length; s++) {
975
+ var f = t[s];
976
+ if (f !== "children" && f !== "key") {
977
+ X(e), D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", f), X(null);
978
+ break;
979
+ }
980
+ }
981
+ e.ref !== null && (X(e), D("Invalid attribute `ref` supplied to `React.Fragment`."), X(null));
982
+ }
983
+ }
984
+ var Fe = {};
985
+ function Ne(e, t, s, f, h, v) {
986
+ {
987
+ var m = Q(e);
988
+ if (!m) {
989
+ var d = "";
990
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (d += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
991
+ var w = mr();
992
+ w ? d += w : d += Ie();
993
+ var E;
994
+ e === null ? E = "null" : ye(e) ? E = "array" : e !== void 0 && e.$$typeof === a ? (E = "<" + (P(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", E, d);
995
+ }
996
+ var R = dr(e, t, s, h, v);
997
+ if (R == null)
998
+ return R;
999
+ if (m) {
1000
+ var j = t.children;
1001
+ if (j !== void 0)
1002
+ if (f)
1003
+ if (ye(j)) {
1004
+ for (var K = 0; K < j.length; K++)
1005
+ qe(j[K], e);
1006
+ Object.freeze && Object.freeze(j);
1007
+ } else
1008
+ D("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1009
+ else
1010
+ qe(j, e);
1011
+ }
1012
+ if (ie.call(t, "key")) {
1013
+ var B = P(e), O = Object.keys(t).filter(function(Rr) {
1014
+ return Rr !== "key";
1015
+ }), Re = O.length > 0 ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}";
1016
+ if (!Fe[B + Re]) {
1017
+ var _r = O.length > 0 ? "{" + O.join(": ..., ") + ": ...}" : "{}";
1018
+ D(`A props object containing a "key" prop is being spread into JSX:
1019
+ let props = %s;
1020
+ <%s {...props} />
1021
+ React keys must be passed directly to JSX without using spread:
1022
+ let props = %s;
1023
+ <%s key={someKey} {...props} />`, Re, B, _r, B), Fe[B + Re] = !0;
1024
+ }
1025
+ }
1026
+ return e === l ? hr(R) : gr(R), R;
1027
+ }
1028
+ }
1029
+ function vr(e, t, s) {
1030
+ return Ne(e, t, s, !0);
1031
+ }
1032
+ function yr(e, t, s) {
1033
+ return Ne(e, t, s, !1);
1034
+ }
1035
+ var br = yr, Er = vr;
1036
+ se.Fragment = l, se.jsx = br, se.jsxs = Er;
1037
+ }()), se;
1038
+ }
1039
+ process.env.NODE_ENV === "production" ? De.exports = Br() : De.exports = Lr();
1040
+ var q = De.exports;
1041
+ function Vr(n) {
1042
+ return n.replace(/ı/g, "I").replace(/i/g, "İ").replace(/ğ/g, "Ğ").replace(/ü/g, "Ü").replace(/ş/g, "Ş").replace(/ö/g, "Ö").replace(/ç/g, "Ç").toUpperCase().replace(/I/g, "ı").replace(/İ/g, "İ").replace(/Ğ/g, "ğ").replace(/Ü/g, "ü").replace(/Ş/g, "ş").replace(/Ö/g, "ö").replace(/Ç/g, "ç");
1043
+ }
1044
+ const Ur = 300, Yr = 1, Gr = [
1045
+ "password",
1046
+ "email",
1047
+ "number",
1048
+ "tel",
1049
+ "url"
1050
+ ], Wr = [
1051
+ "Backspace",
1052
+ "Delete",
1053
+ "ArrowLeft",
1054
+ "ArrowRight",
1055
+ "Tab",
1056
+ "Enter",
1057
+ "Escape"
1058
+ ];
1059
+ function Xr(n, a, u) {
1060
+ return u || Gr.includes(a) || !n ? n : Vr(n);
1061
+ }
1062
+ function Kr(n) {
1063
+ return /[0-9.]/.test(n) || Wr.includes(n);
1064
+ }
1065
+ const vt = ({
1066
+ name: n,
1067
+ label: a,
1068
+ type: u = "text",
1069
+ placeholder: l,
1070
+ className: o,
1071
+ fieldToSearch: r,
1072
+ onSuggestionSearch: i,
1073
+ disabled: c = !1,
1074
+ step: p,
1075
+ min: k,
1076
+ max: _,
1077
+ startAdornment: b,
1078
+ endAdornment: y,
1079
+ disableUppercase: g = !1,
1080
+ required: F = !1,
1081
+ fullWidth: A,
1082
+ debounceDelay: Z = Ur,
1083
+ minSearchLength: M = Yr,
1084
+ helperText: D,
1085
+ autoFocus: oe,
1086
+ multiline: ue,
1087
+ rows: le,
1088
+ maxLength: fe,
1089
+ errorMessageFormatter: J,
1090
+ "aria-label": ce,
1091
+ "aria-describedby": H,
1092
+ sx: Q,
1093
+ inputSx: ee,
1094
+ inputElementSx: L,
1095
+ ...P
1096
+ }) => {
1097
+ const [x, S, N] = kr(n), [de, V] = Te([]), [re, te] = Te(!1), [me, ne] = Te(!1), I = Tr(
1098
+ r && i ? Sr(async (T) => {
1099
+ if (T.length >= M) {
1100
+ te(!0);
1101
+ try {
1102
+ const C = await i(
1103
+ r,
1104
+ T
1105
+ );
1106
+ V(C);
1107
+ } catch (C) {
1108
+ console.error("Search error:", C), V([]);
1109
+ }
1110
+ te(!1);
1111
+ } else
1112
+ V([]);
1113
+ }, Z) : null
1114
+ ).current;
1115
+ Be(() => {
1116
+ I && x.value && I(x.value);
1117
+ }, [x.value, I]), Be(() => () => {
1118
+ I && I.cancel();
1119
+ }, [I]);
1120
+ const U = Le(
1121
+ (T) => Xr(T, u, g),
1122
+ [u, g]
1123
+ ), Y = ke(() => {
1124
+ if (!(!S.touched || !S.error))
1125
+ return J ? J(S.error) : S.error;
1126
+ }, [S.touched, S.error, J]), G = ke(() => Y || D, [Y, D]), $ = ke(
1127
+ () => ({
1128
+ name: n,
1129
+ label: a,
1130
+ type: u,
1131
+ placeholder: l,
1132
+ required: F,
1133
+ disabled: c,
1134
+ error: S.touched && !!S.error,
1135
+ helperText: G,
1136
+ className: o,
1137
+ fullWidth: A !== void 0 ? A : !!a,
1138
+ autoFocus: oe,
1139
+ multiline: ue,
1140
+ rows: le,
1141
+ sx: L ? [Q, { "& .MuiInputBase-input": L }].filter(
1142
+ Boolean
1143
+ ) : Q,
1144
+ inputProps: {
1145
+ maxLength: fe,
1146
+ step: p,
1147
+ min: k,
1148
+ max: _,
1149
+ ...u === "number" && {
1150
+ onKeyDown: (T) => {
1151
+ Kr(T.key) || T.preventDefault();
1152
+ }
1153
+ },
1154
+ ...P.inputProps
1155
+ },
1156
+ InputProps: {
1157
+ startAdornment: b ? /* @__PURE__ */ q.jsx(Ve, { position: "start", children: b }) : void 0,
1158
+ endAdornment: y ? /* @__PURE__ */ q.jsx(Ve, { position: "end", children: y }) : void 0,
1159
+ ...ee && { sx: ee },
1160
+ ...P.InputProps
1161
+ },
1162
+ "aria-label": ce,
1163
+ "aria-describedby": H || (Y ? `${n}-error` : void 0),
1164
+ ...P
1165
+ }),
1166
+ [
1167
+ n,
1168
+ a,
1169
+ u,
1170
+ l,
1171
+ F,
1172
+ c,
1173
+ S.touched,
1174
+ S.error,
1175
+ G,
1176
+ o,
1177
+ A,
1178
+ oe,
1179
+ ue,
1180
+ le,
1181
+ fe,
1182
+ p,
1183
+ k,
1184
+ _,
1185
+ b,
1186
+ y,
1187
+ ce,
1188
+ H,
1189
+ Q,
1190
+ ee,
1191
+ L,
1192
+ P
1193
+ ]
1194
+ );
1195
+ if (r && i)
1196
+ return /* @__PURE__ */ q.jsx(
1197
+ Dr,
1198
+ {
1199
+ freeSolo: !0,
1200
+ open: me,
1201
+ onOpen: () => ne(!0),
1202
+ onClose: () => ne(!1),
1203
+ options: de,
1204
+ loading: re,
1205
+ disabled: c,
1206
+ value: x.value || "",
1207
+ onChange: (T, C) => {
1208
+ const ve = C || "";
1209
+ N.setValue(U(ve));
1210
+ },
1211
+ onInputChange: (T, C) => {
1212
+ N.setValue(U(C));
1213
+ },
1214
+ renderInput: (T) => {
1215
+ var C;
1216
+ return /* @__PURE__ */ q.jsx(
1217
+ Ue,
1218
+ {
1219
+ ...T,
1220
+ ...$,
1221
+ InputProps: {
1222
+ ...T.InputProps,
1223
+ ...$.InputProps,
1224
+ endAdornment: /* @__PURE__ */ q.jsxs(q.Fragment, { children: [
1225
+ re ? /* @__PURE__ */ q.jsx(Cr, { color: "inherit", size: 20 }) : null,
1226
+ (C = $.InputProps) == null ? void 0 : C.endAdornment,
1227
+ T.InputProps.endAdornment
1228
+ ] })
1229
+ }
1230
+ }
1231
+ );
1232
+ }
1233
+ }
1234
+ );
1235
+ const W = Le(
1236
+ (T) => {
1237
+ const C = T.target.value;
1238
+ N.setValue(U(C));
1239
+ },
1240
+ [N, U]
1241
+ );
1242
+ return /* @__PURE__ */ q.jsx(
1243
+ Ue,
1244
+ {
1245
+ ...$,
1246
+ value: x.value || "",
1247
+ onChange: W,
1248
+ onBlur: x.onBlur
1249
+ }
1250
+ );
1251
+ };
411
1252
  export {
412
- N as CREDIT_CARD_REGEX,
413
- $ as EMAIL_REGEX,
414
- w as IBAN_REGEX,
415
- b as NAME_REGEX,
416
- T as PHONE_REGEX,
417
- z as PLATE_REGEX,
418
- k as TC_KIMLIK_NO_REGEX,
419
- G as VKN_REGEX,
420
- U as creditCardSchema,
421
- D as dateSchema,
422
- L as emailSchema,
423
- J as fileSchema,
424
- v as futureDateSchema,
425
- g as getFileExtension,
426
- O as ibanSchema,
427
- Z as nameSchema,
428
- K as passwordMatchSchema,
429
- F as passwordSchema,
430
- W as pastDateSchema,
431
- V as phoneSchema,
432
- H as plateSchema,
433
- _ as tcKimlikNoSchema,
434
- C as validateCreditCard,
435
- Q as validateDate,
436
- S as validateEmail,
437
- Y as validateFile,
438
- B as validateIBAN,
439
- A as validateName,
440
- j as validatePassword,
441
- x as validatePhone,
442
- I as validatePlate,
443
- E as validateTCKimlikNo,
444
- X as validateVKN,
445
- P as vknSchema
1253
+ Mr as CREDIT_CARD_REGEX,
1254
+ xr as EMAIL_REGEX,
1255
+ vt as FormikTextField,
1256
+ Ar as IBAN_REGEX,
1257
+ Je as NAME_REGEX,
1258
+ Pr as PHONE_REGEX,
1259
+ Ye as PLATE_REGEX,
1260
+ Ze as TC_KIMLIK_NO_REGEX,
1261
+ qr as VKN_REGEX,
1262
+ lt as creditCardSchema,
1263
+ He as dateSchema,
1264
+ tt as emailSchema,
1265
+ mt as fileSchema,
1266
+ ht as futureDateSchema,
1267
+ he as getFileExtension,
1268
+ ut as ibanSchema,
1269
+ ot as nameSchema,
1270
+ st as passwordMatchSchema,
1271
+ at as passwordSchema,
1272
+ gt as pastDateSchema,
1273
+ nt as phoneSchema,
1274
+ ct as plateSchema,
1275
+ rt as tcKimlikNoSchema,
1276
+ Vr as toTurkishUpperCase,
1277
+ $r as validateCreditCard,
1278
+ pt as validateDate,
1279
+ Or as validateEmail,
1280
+ dt as validateFile,
1281
+ Ir as validateIBAN,
1282
+ jr as validateName,
1283
+ it as validatePassword,
1284
+ zr as validatePhone,
1285
+ Nr as validatePlate,
1286
+ wr as validateTCKimlikNo,
1287
+ Fr as validateVKN,
1288
+ ft as vknSchema
446
1289
  };