PageSourceSearch

https://servicii.primariatm.ro/_next/static/immutable/chunks/1usjlcvsoaiqa.js

js primariatm.ro collected 2026-09-24 08:51:02 UTC 32,771 bytes, 1,129 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="5bb485b3-ce3a-cc18-6b4a-644adae72529")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,657923,119270,e=>{"use strict";var t=e.i(452861),i=e.i(345477),a=e.i(19653),r=e.i(41436);function s(e){return"PersoanaJuridica"===e.type||"PJ"===e.type}function n(e){if("boolean"==typeof e.verified)return e.verified;let t=e.attributes??{};return!!t.atlasLinkId||!!t.atlasData}var d=e.i(690728),o=e.i(703104);e.i(364029),e.i(530790);var u=e.i(406794),l=e.i(313609);let c=`
3  query NomenclatorStrazi {
4    nomenclatorStrazi(orderBy: { denumireCompletaFaraDiacritice: ASC }) {
5      id
6    codWebcon
7    codGis
8    numarInstanta
9    stare
10    denumireCompleta
11    denumireCompletaFaraDiacritice
12    numeActual
13    numeActualFaraDiacritice
14    numeAnterior
15    numeAnteriorFaraDiacritice
16    tipArtera
17    cartier
18    careuGhid
19    actAn
20    dataHcl
21    nrImparMin
22    nrImparMax
23    nrParMin
24    nrParMax
25    }
26  }
27`,p=async()=>(await new l.GraphQLClient(u.default.env.GRAPHQL_URL||"",{headers:{"x-hasura-admin-secret":`${u.default.env.HASURA_ADMIN_SECRET}`},fetch}).request(c)).nomenclatorStrazi??[];(0,o.unstable_cache)(p,[d.NOMENCLATOR_CACHE_TAG],{tags:[d.NOMENCLATOR_CACHE_TAG],revalidate:3600});var m=e.i(285237);m.default`
28  fragment BookingSlot on BookingSlot {
29    id
30    startTime
31    locationRel {
32      id
33      name
34    }
35  }
36`;let f=m.default`
37  fragment BookingAppointment on BookingAppointment {
38    id
39    startTime
40    attributes
41    createdAt
42    cancelledAt
43    cnp
44    serviceStepRel {
45      id
46      title
47      serviceRel {
48        name
49        slug
50      }
51    }
52    slotRel {
53      id
54      locationRel {
55        id
56        name
57      }
58      scheduleRel {
59        intervalMinutes
60      }
61    }
62  }
63`,$=m.default`
64  fragment ServiceSection on Sections {
65    id
66    title
67    type
68    content
69    links
70    pages {
71      pageRel {
72        id
73        title
74        url
75        description
76      }
77    }
78    documents {
79      document {
80        id
81        filenameDownload
82        title
83        description
84      }
85    }
86    images {
87      image {
88        id
89        width
90        height
91        title
92        description
93      }
94    }
95    featuredItems(orderBy: { order: ASC }) {
96      id
97      title
98      order
99      description
100      url
101      coverRel {
102        id
103      }
104    }
105  }
106`,g=m.default`
107  fragment ServiceApplication on ServiceApplication {
108    id
109    userId
110    webconId
111    webconNr
112    steps
113    tags
114    createdAt
115    status
116    completedAt
117    stepsVersion
118    serviceRel {
119      name
120      slug
121    }
122    statuses(orderBy: { createdAt: DESC }) {
123      createdAt
124      status
125      actionRequired
126      message
127      completedType
128    }
129    messages(orderBy: { createdAt: DESC }) {
130      createdAt
131      webconId
132      webconPathId
133      from
134      message
135      attachments
136    }
137  }
138`,S=m.default`
139  fragment ServiceStep on ServiceStep {
140    id
141    type
142    title
143    slug
144    tags
145    content
146    formRel {
147      id
148      title
149      slug
150      description
151    }
152  }
153`,v=m.default`
154  fragment ServiceCategory on ServiceCategory {
155    id
156    name
157    slug
158    icon
159    description
160  }
161`,y=m.default`
162  fragment ServiceCategoryWithSubcategories on ServiceCategory {
163    ...ServiceCategory
164    subcategories(orderBy: { order: ASC }) {
165      id
166      name
167      services(
168        where: { status: { _neq: "inactiv" } }
169        orderBy: { order: ASC }
170      ) {
171        id
172        name
173        description
174        slug
175      }
176    }
177  }
178  ${v}
179`;function b(e){let t=e.attributes??{};if(n(e)){let i=t.atlasData||{};return{denumire:e.profileName,cui:i.cui||"",nrRegCom:"","sediu.localitate":t.sediu_social_localitate||i.numeLocalitate||"","sediu.strada":t.sediu_social_strada||i.numeStrada||"","sediu.stradaId":t.sediu_social_strada_id?Number(t.sediu_social_strada_id):null,"
179sediu.numar":t.sediu_social_nr||i.numarPostal||"","sediu.bloc":t.sediu_social_bloc||i.bloc||"","sediu.scara":t.sediu_social_scara||"","sediu.etaj":t.sediu_social_etaj||"","sediu.apartament":t.sediu_social_apartament||i.apartament||"","sediu.judet":t.sediu_social_judet||i.numeJudet||"","sediu.codPostal":t.sediu_social_cod_postal||""}}return{denumire:t.denumire_pj||e.profileName,cui:t.cod_fiscal||"",nrRegCom:t.nr_reg_com||"","sediu.localitate":t.sediu_social_localitate||"","sediu.strada":t.sediu_social_strada||"","sediu.stradaId":t.sediu_social_strada_id?Number(t.sediu_social_strada_id):null,"sediu.numar":t.sediu_social_nr||"","sediu.bloc":t.sediu_social_bloc||"","sediu.scara":t.sediu_social_scara||"","sediu.etaj":t.sediu_social_etaj||"","sediu.apartament":t.sediu_social_apartament||"","sediu.judet":"","sediu.codPostal":t.sediu_social_cod_postal||""}}m.default`
180  query stepBookingSlots(
181    $stepId: uuid!
182    $startDate: timestamp!
183    $endDate: timestamp!
184  ) {
185    serviceStepByPk(id: $stepId) {
186      id
187      title
188      type
189      bookingLocations {
190        bookingLocationRel {
191          id
192          name
193          parentRel {
194            id
195            name
196            parentRel {
197              id
198              name
199            }
200          }
201          slots(
202            where: { startTime: { _gte: $startDate, _lte: $endDate } }
203            orderBy: { startTime: ASC }
204          ) {
205            id
206            startTime
207            appointment {
208              id
209            }
210            scheduleRel {
211              intervalMinutes
212            }
213          }
214        }
215      }
216    }
217  }
218`,m.default`
219  query bookingSlotById($slotId: uuid!) {
220    bookingSlotByPk(id: $slotId) {
221      id
222      startTime
223      locationRel {
224        id
225        name
226        parentRel {
227          id
228          name
229          parentRel {
230            id
231            name
232          }
233        }
234        serviceSteps {
235          serviceStepRel {
236            id
237          }
238        }
239      }
240      scheduleRel {
241        intervalMinutes
242      }
243    }
244  }
245`,m.default`
246  query bookedAppointmentsByLocations(
247    $locationIds: [uuid!]!
248    $startDate: timestamp!
249    $endDate: timestamp!
250  ) {
251    bookingAppointment(
252      where: {
253        cancelledAt: { _isNull: true }
254        startTime: { _gte: $startDate, _lte: $endDate }
255        slotRel: { location: { _in: $locationIds } }
256      }
257    ) {
258      startTime
259      slotRel {
260        location
261        scheduleRel {
262          intervalMinutes
263        }
264      }
265    }
266  }
267`,m.default`
268  query bookingAppointmentByCnp(
269    $cnp: String!
270    $stepId: uuid!
271    $startTime: timestamp!
272  ) {
273    bookingAppointment(
274      where: {
275        serviceStep: { _eq: $stepId }
276        cnp: { _eq: $cnp }
277        cancelledAt: { _isNull: true }
278        startTime: { _gt: $startTime }
279      }
280      limit: 1
281    ) {
282      id
283    }
284  }
285`,m.default`
286  query appointmentsSinceByUser(
287    $userId: uuid!
288    $since: timestamptz!
289    $stepId: uuid!
290  ) {
291    bookingAppointmentAggregate(
292      where: {
293        newUserId: { _eq: $userId }
294        createdAt: { _gte: $since }
295        serviceStep: { _eq: $stepId }
296        cancelledAt: { _isNull: true }
297      }
298    ) {
299      aggregate {
300        count
301      }
302    }
303  }
304`,m.default`
305  query appointmentsByUserId($userId: uuid!) {
306    bookingAppointment(
307      where: { userId: { _eq: $userId } }
308      orderBy: { startTime: DESC }
309    ) {
310      ...BookingAppointment
311    }
312  }
313  ${f}
314`,m.default`
315  mutation createBookingAppointment(
316    $slotId: uuid!
317    $newUserId: uuid!
318    $startTime: timestamp!
319    $serviceStep: uuid!
320    $attributes: json!
321    $cnp: String
322  ) {
323    insertBookingAppointmentOne(
324      object: {
325        slot: $slotId
326        newUserId: $newUserId
327        startTime: $startTime
328        serviceStep: $serviceStep
329        attributes: $attributes
330        cnp: $cnp
331      }
332    ) {
333      ...BookingAppointment
334    }
335  }
336  ${f}
337`,m.default`
338  mutation createBookingAppointments(
339    $objects: [BookingAppointmentInsertInput!]!
340  ) {
341    insertBookingAppointment(objects: $objects) {
342      returning {
343        ...BookingAppointment
344      }
345    }
346  }
347  ${f}
348`,m.default`
349  mutation cancelBookingAppointment(
350    $appointmentId: uuid!
351    $cancelledSlot: uuid!
352  ) {
353    updateBookingAppointmentByPk(
354      pkColumns: { id: $appointmentId }
355      _set: { cancelledAt: "now()", slot: null, cancelledSlot: $cancelledSlot }
356    ) {
357      id
358    }
359  }
360`,m.default`
361  query dropoffSchedules($today: date!) {
362    bookingSchedule(
363      where: {
364        name: { _like: "Drop-off%" }
365        intervalMinutes: { _eq: 30 }
366        endDate: { _gte: $today }
367      }
368    ) {
369      id
370    }
371  }
372`,m.default`
373  query scheduleById($scheduleId: uuid!, $from: timestamp!) {
374    bookingScheduleByPk(id: $scheduleId) {
375      id
376      intervalMinutes
377      weekDays
378      startDate
379      endDate
380      dateExceptions
381      slots(
382        where: { startTime: { _gte: $from } }
383        orderBy: { startTime: ASC }
384      ) {
385        id
386        startTime
387        location
388        appointment {
389          id
390        }
391      }
392      locations {
393        bookingLocationRel {
394          id
395        }
396      }
397    }
398  }
399`,m.default`
400  mutation insertBookingSlots($slots: [BookingSlotInsertInput!]!) {
401    insertBookingSlot(objects: $slots) {
402      returning {
403        id
404      }
405    }
406  }
407`,m.default`
408  mutation deleteBookingSlotById($slotId: uuid!) {
409    deleteBookingSlotByPk(id: $slotId) {
410      id
411    }
412  }
413`,m.default`
414  query userByPk($userId: uuid!) {
415    userByPk(id: $userId) {
416      id
417      email
418      firstName
419      lastName
420      phoneNumber
421      cnp
422      adresaLocalitate
423    }
424  }
425`,m.default`
426  query userDropoffAppointments(
427    $userId: uuid!
428    $stepId: uuid!
429    $startDate: timestamp!
430    $endDate: timestamp!
431  ) {
432    bookingAppointment(
433      where: {
434        newUserId: { _eq: $userId }
435        serviceStep: { _eq: $stepId }
436        cancelledAt: { _isNull: true }
437        startTime: { _gte: $startDate, _lte: $endDate }
438      }
439    ) {
440      id
441      startTime
442      slotRel {
443        locationRel {
444          name
445          parentRel {
446            id
447            name
448            parentRel {
449              id
450              name
451            }
452          }
453        }
454      }
455    }
456  }
457`,m.default`
458  query userAppointmentsBySteps($userId: uuid!, $stepIds: [uuid!]!) {
459    bookingAppointment(
460      where: { newUserId: { _eq: $userId }, serviceStep: { _in: $stepIds } }
461      orderBy: { startTime: DESC }
462      limit: 20
463    ) {
464      id
465      startTime
466      cancelledAt
467      attributes
468    }
469  }
470`,m.default`
471  query GetProfiles($user_id: uuid = "") {
472    profile(where: { userId: { _eq: $user_id } }) {
473      id
474      attributes
475      documents
476      primary
477      profileName
478      type
479      verified
480    }
481  }
482`,m.default`
483  query externalRequestsStatus($webconNr: String!, $codVerificare: String!) {
484    verification: externalRequests(
485      where: {
486        _and: [
487          { data: { _contains: { CodVerificare: $codVerificare } } }
488          { data: { _contains: { InstanceNumber: $webconNr } } }
489          { action: { _eq: "status" } }
490        ]
491      }
492      limit: 1
493    ) {
494      id
495    }
496    timeline: externalRequests(
497      where: {
498        _and: [
499          { data: { _contains: { InstanceNumber: $webconNr } } }
500          { action: { _eq: "status" } }
501        ]
502      }
503      orderBy: { createdAt: DESC }
504    ) {
505      id
506      createdAt
507      data
508    }
509  }
510`,m.default`
511  query GetFeedbackById($id: uuid!) {
512    feedback(where: { id: { _eq: $id } }) {
513      id
514      message
515      createdAt
516      status
517      webconId
518      webconNr
519      url
520      ip
521      userId
522      attachments
523      messages(orderBy: { createdAt: DESC }) {
524        id
525        message
526        from
527        createdAt
528        webconDate
529        webconId
530        webconPathId
531        attachments
532      }
533    }
534  }
535`,m.default`
536  query GetFeedbackStatusByFeedbackId($feedbackId: uuid!) {
537    feedbackStatus(
538      where: { feedback: { _eq: $feedbackId } }
539      orderBy: { createdAt: ASC }
540    ) {
541      id
542      status
543      message
544      createdAt
545      actionRequired
546    }
547  }
548`,m.default`
549  mutation createFeedbackMessage(
550    $feedbackId: uuid!
551    $message: String!
552    $attachments: jsonb
553  ) {
554    insertFeedbackMessagesOne(
555      object: {
556        feedback: $feedbackId
557        message: $message
558        from: "user"
559        attachments: $attachments
560      }
561    ) {
562      id
563    }
564  }
565`,m.default`
566  mutation createServiceApplicationPayment(
567    $applicationId: uuid!
568    $applicationStepId: String!
569    $amount: numeric
570    $userId: uuid
571    $requestData: jsonb
572    $paymentsDue: jsonb
573  ) {
574    insertServiceApplicationPaymentsOne(
575      object: {
576        application: $applicationId
577        applicationStepId: $applicationStepId
578        amount: $amount
579        userId: $userId
580        requestData: $requestData
581        paymentsDue: $paymentsDue
582      }
583    ) {
584      id
585    }
586  }
587`,m.default`
588  mutation updateServiceApplicationPayment(
589    $id: uuid!
590    $data: ServiceApplicationPaymentsSetInput!
591  ) {
592    updateServiceApplicationPaymentsByPk(_set: $data, pkColumns: { id: $id }) {
593      id
594    }
595  }
596`,m.default`
597  mutation createPaymentLog($headers: json!, $data: json!, $ip: String!) {
598    insertPaymentLogOne(object: { headers: $headers, data: $data, ip: $ip }) {
599      id
600    }
601  }
602`,m.default`
603  query serviceApplicationPaidPayments($applicationId: uuid!) {
604    serviceApplicationPayments(
605      where: { application: { _eq: $applicationId }, status: { _eq: "true" } }
606    ) {
607      id
608      amount
609      orderId
610    }
611  }
612`,m.default`
613  query serviceApplicationPaymentById($id: uuid!) {
614    serviceApplicationPaymentsByPk(id: $id) {
615      id
616      amount
617      applicationRel {
618        id
619        userId
620      }
621      applicationStepId
622      status
623      orderId
624      message
625      receiptData
626      requestData
627      paymentsDue
628    }
629  }
630`,m.default`
631  query prepaidAccountsByProfiles(
632    $profileIds: [uuid!]!
633    $serviceSlug: String!
634  ) {
635    prepaidAccounts(
636      where: {
637        profileId: { _in: $profileIds }
638        serviceSlug: { _eq: $serviceSlug }
639      }
640    ) {
641      id
642      profileId
643      balance
644    }
645  }
646`,m.default`
647  query prepaidDebitForApplication($applicationId: uuid!) {
648    prepaidTransactions(
649      where: { applicationId: { _eq: $applicationId }, type: { _eq: "debit" } }
650    ) {
651      id
652      accountId
653      amount
654      details
655    }
656  }
657`,m.default`
658  mutation debitPrepaidAccount(
659    $accountId: uuid!
660    $delta: numeric!
661    $amount: numeric!
662    $applicationId: uuid!
663    $details: jsonb
664    $updatedAt: timestamptz!
665  ) {
666    updatePrepaidAccountsByPk(
667      pkColumns: { id: $accountId }
668      _inc: { balance: $delta }
669      _set: { updatedAt: $updatedAt }
670    ) {
671      id
672      balance
673    }
674    insertPrepaidTransactionsOne(
675      object: {
676        accountId: $accountId
677        type: "debit"
678        amount: $amount
679        applicationId: $applicationId
680        details: $details
681      }
682    ) {
683      id
684    }
685  }
686`,m.default`
687  query allServices {
688    service {
689      name
690    }
691  }
692`,m.default`
693  query serviceCategories {
694    serviceCategory(
695      where: { parentCategory: { _isNull: true } }
696      orderBy: { order: ASC }
697    ) {
698      ...ServiceCategoryWithSubcategories
699      services(
700        where: { status: { _neq: "inactiv" } }
701        orderBy: { order: ASC }
702      ) {
703        id
704        name
705        description
706        slug
707      }
708    }
709  }
710  ${y}
711`,m.default`
712  query allForms {
713    form {
714      title
715    }
716  }
717`,m.default`
718  query serviceMainCategories {
719    serviceCategory(
720      where: { parentCategory: { _isNull: true } }
721      orderBy: { order: ASC }
722    ) {
723      ...ServiceCategory
724    }
725  }
726  ${v}
727`,m.default`
728  query serviceCategoriesById($slug: String) {
729    serviceCategory(where: { slug: { _eq: $slug } }, orderBy: { order: ASC }) {
730      id
731      name
732      description
733      slug
734      sections {
735        ...ServiceSection
736      }
737      subcategories(orderBy: { order: ASC }) {
738        id
739        name
740        slug
741        services(
742          where: { status: { _neq: "inactiv" } }
743          orderBy: { order: ASC }
744        ) {
745          id
746          name
747          description
748          slug
749        }
750      }
751      services(
752        where: { status: { _neq: "inactiv" } }
753        orderBy: { order: ASC }
754      ) {
755        id
756        name
757        description
758        slug
759      }
760    }
761  }
762  ${$}
763`,m.default`
764  query serviceBySlug($slug: String!) {
765    service(where: { slug: { _eq: $slug } }) {
766      id
767      name
768      categoryRel {
769        name
770        slug
771        parentCategoryRel {
772          name
773          slug
774        }
775      }
776      slug
777      startDate
778      endDate
779      description
780      sections
781      questions
782      steps(orderBy: { order: ASC }) {
783        ...ServiceStep
784      }
785      documents(orderBy: { order: ASC }) {
786        id
787        tags
788        type
789        options
790        description
791        fileRel {
792          id
793          title
794          filenameDownload
795        }
796      }
797      legal
798      pcueUrl
799    }
800  }
801  ${S}
802`,m.default`
803  query serviceById($id: uuid!) {
804    serviceByPk(id: $id) {
805      id
806      name
807      slug
808      description
809      categoryRel {
810        slug
811        parentCategoryRel {
812          slug
813        }
814      }
815    }
816  }
817`,m.default`
818  query serviceApplicationByUser($userId: uuid!, $serviceId: uuid!) {
819    serviceApplication(
820      where: {
821        userId: { _eq: $userId }
822        service: { _eq: $serviceId }
823        archivedAt: { _isNull: true }
824      }
825      orderBy: { createdAt: DESC }
826    ) {
827      ...ServiceApplication
828    }
829  }
830  ${g}
831`,m.default`
832  query serviceApplicationByIdAndUser($userId: uuid!, $applicationId: uuid!) {
833    serviceApplication(
834      where: {
835        userId: { _eq: $userId }
836        id: { _eq: $applicationId }
837        archivedAt: { _isNull: true }
838      }
839    ) {
840      ...ServiceApplication
841      serviceRel {
842        steps(orderBy: { order: ASC }) {
843          id
844          slug
845          type
846          tags
847        }
848        documents {
849          id
850        }
851      }
852    }
853  }
854  ${g}
855`,m.default`
856  mutation createServiceApplication(
857    $service: uuid
858    $userId: uuid
859    $tags: json
860  ) {
861    insertServiceApplication(
862      objects: { userId: $userId, service: $service, tags: $tags }
863    ) {
864      returning {
865        ...ServiceApplication
866      }
867    }
868  }
869  ${g}
870`,m.default`
871  mutation createMessage(
872    $applicationId: uuid
873    $from: String
874    $message: String
875    $attachments: jsonb
876  ) {
877    insertServiceApplicationMessagesOne(
878      object: {
879        serviceApplication: $applicationId
880        from: $from
881        message: $message
882        attachments: $attachments
883      }
884    ) {
885      id
886    }
887  }
888`,m.default`
889  mutation updateServiceApplication(
890    $id: uuid!
891    $steps: json
892    $completedAt: timestamptz
893    $tags: json
894  ) {
895    updateServiceApplicationByPk(
896      pkColumns: { id: $id }
897      _set: { steps: $steps, completedAt: $completedAt, tags: $tags }
898    ) {
899      id
900    }
901  }
902`,m.default`
903  mutation updateServiceApplicationSteps(
904    $id: uuid!
905    $steps: json
906    $expectedVersion: bigint!
907  ) {
908    updateServiceApplication(
909      where: { id: { _eq: $id }, stepsVersion: { _eq: $expectedVersion } }
910      _set: { steps: $steps }
911      _inc: { stepsVersion: 1 }
912    ) {
913      affectedRows
914    }
915  }
916`,m.default`
917  mutation updateServiceApplicationTags($id: uuid!, $tags: json) {
918    updateServiceApplicationByPk(
919      pkColumns: { id: $id }
920      _set: { tags: $tags }
921    ) {
922      id
923    }
924  }
925`,m.default`
926  mutation updateServiceApplicationWebconId(
927    $id: uuid!
928    $webconId: Int
929    $webconNr: String
930    $status: String
931  ) {
932    updateServiceApplicationByPk(
933      pkColumns: { id: $id }
934      _set: { webconId: $webconId, webconNr: $webconNr, status: $status }
935    ) {
936      id
937    }
938  }
939`,m.default`
940  mutation archiveServiceApplicationWebconId($id: uuid!) {
941    updateServiceApplicationByPk(
942      pkColumns: { id: $id }
943      _set: { archivedAt: NOW }
944    ) {
945      id
946    }
947  }
948`,m.default`
949  query getExternalRequestsByTarget($target: String!, $action: String!) {
950    externalRequests(
951      where: { target: { _eq: $target }, action: { _eq: $action } }
952      orderBy: { createdAt: DESC }
953    ) {
954      id
955      createdAt
956      data
957      action
958      target
959    }
960  }
961`,m.default`
962  mutation createServiceApplicationStatus(
963    $serviceApplicationId: uuid!
964    $status: String
965  ) {
966    insertServiceApplicationStatusOne(
967      object: { serviceApplication: $serviceApplicationId, status: $status }
968    ) {
969      id
970    }
971  }
972`,m.default`
973  query formFields($formId: uuid!) {
974    formByPk(id: $formId) {
975      id
976      fields(orderBy: { order: ASC }) {
977        formFieldRel {
978          name
979          title
980          type
981          width
982          options
983        }
984      }
985    }
986  }
987`,m.default`
988  mutation insertVerificationDocument($webconId: Int!, $path: String!) {
989    insertVerificationDocumentsOne(
990      object: { webconId: $webconId, path: $path }
991    ) {
992      id
993    }
994  }
995`,m.default`
996  query userServiceApplicationsWithTags(
997    $userId: uuid!
998    $serviceId: uuid!
999    $yearStart: timestamptz!
1000  ) {
1001    serviceApplication(
1002      where: {
1003        userId: { _eq: $userId }
1004        service: { _eq: $serviceId }
1005        createdAt: { _gte: $yearStart }
1006        archivedAt: { _isNull: true }
1007        webconNr: { _isNull: false }
1008      }
1009    ) {
1010      id
1011      steps
1012      tags
1013      createdAt
1014    }
1015  }
1016`,m.default`
1017  query serviceStepBySlug($serviceSlug: String!, $stepSlug: String!) {
1018    serviceStep(
1019      where: {
1020        serviceRel: { slug: { _eq: $serviceSlug } }
1021        slug: { _eq: $stepSlug }
1022      }
1023      limit: 1
1024    ) {
1025      id
1026    }
1027  }
1028`,m.default`
1029  query completedApplicationsByServiceSlug(
1030    $userId: uuid!
1031    $serviceSlug: String!
1032  ) {
1033    serviceApplication(
1034      where: {
1035        userId: { _eq: $userId }
1036        serviceRel: { slug: { _eq: $serviceSlug } }
1037        archivedAt: { _isNull: true }
1038        webconNr: { _isNull: false }
1039      }
1040      orderBy: { createdAt: DESC }
1041    ) {
1042      id
1043      webconNr
1044      steps
1045      tags
1046      createdAt
1047      status
1048      statuses(orderBy: { createdAt: DESC }, limit: 1) {
1049        completedType
1050      }
1051    }
1052  }
1053`,m.default`
1054  query serviceApplicationById($id: uuid!) {
1055    serviceApplicationByPk(id: $id) {
1056      ...ServiceApplication
1057    }
1058  }
1059  ${g}
1060`,m.default`
1061  query serviceApplicationOwner($id: uuid!) {
1062    serviceApplicationByPk(id: $id) {
1063      id
1064      userId
1065      archivedAt
1066    }
1067  }
1068`,m.default`
1069  query serviceApplicationByWebconNr($webconNr: String!) {
1070    serviceApplication(where: { webconNr: { _eq: $webconNr } }, limit: 1) {
1071      id
1072      tags
1073      steps
1074      serviceRel {
1075        slug
1076      }
1077    }
1078  }
1079`,m.default`
1080  query serviceApplicationAnonymousById($applicationId: uuid!) {
1081    serviceApplication(
1082      where: {
1083        id: { _eq: $applicationId }
1084        userId: { _isNull: true }
1085        archivedAt: { _isNull: true }
1086      }
1087      limit: 1
1088    ) {
1089      ...ServiceApplication
1090      serviceRel {
1091        steps(orderBy: { order: ASC }) {
1092          id
1093          slug
1094          type
1095          tags
1096        }
1097        documents {
1098          id
1099        }
1100      }
1101    }
1102  }
1103  ${g}
1104`,m.default`
1105  mutation updateServiceApplicationStatus(
1106    $id: uuid!
1107    $status: String!
1108    $completedAt: timestamptz
1109  ) {
1110    updateServiceApplicationByPk(
1111      pkColumns: { id: $id }
1112      _set: { status: $status, completedAt: $completedAt }
1113    ) {
1114      id
1115    }
1116  }
1117`,m.default`
1118  mutation createVerificationDocuments(
1119    $objects: [VerificationDocumentsInsertInput!]!
1120  ) {
1121    insertVerificationDocuments(objects: $objects) {
1122      returning {
1123        id
1124      }
1125    }
1126  }
1127`,e.i(716592);var I=e.i(604670);e.i(953295);var A=e.i(328263),_=e.i(914786),h=e.i(292571);let j=(0,h.createServerReference)("606b6fbe57d14fd897a393d24dcb79e53286b267be",h.callServer,void 0,h.findSourceMapURL,"savePjSediu");function B({profile:e,enabled:a,setValue:r}){let{strazi:s,loading:n}=(0,_.useNomenclatorStrazi)(),[o,u]=(0,i.useState)(null),[l,c]=(0,i.useState)(!1),p=(0,i.useRef)(null),m=e=>{r("sediu.judet",e.judet),r("sediu.localitate",e.localitate),r("sediu.strada",e.strada),r("sediu.stradaId",e.stradaId),Object.entries({"sediu.numar":e.numar,"sediu.bloc":e.bloc,"sediu.scara":e.scara,"sediu.etaj":e.etaj,"sediu.apartament":e.apartament,"sediu.codPostal":e.codPostal}).forEach(([e,t])=>{void 0!==t&&r(e,t)})};return((0,i.useEffect)(()=>{let t;if(!a||n||0===s.length||!e?.id||p.current===e.id)return;p.current=e.id;let i={judet:(t=b(e))["sediu.judet"],localitate:t["sediu.localitate"],strada:t["sediu.strada"],stradaId:t["sediu.stradaId"]??null,numar:t["sediu.numar"],bloc:t["sediu.bloc"],scara:t["sediu.scara"],etaj:t["sediu.etaj"],apartament:t["sediu.apartament"],codPostal:t["sediu.codPostal"]},r=((e,t)=>{if(!(0,d.isTimisoara)(e.localitate)||((e,t)=>{if(null==e||""===e)return!1;let i=Number(e);return Number.isFinite(i)&&!!(0,d.findStreetById)(t,i)})(e.stradaId,t))return{status:"settled"};let i=(0,d.matchStreet)(e.strada,t);return i?{status:"resolved",address:{judet:d.JUDET_TIMIS,localitate:d.TIMISOARA,strada:i.denumireCompleta,stradaId:i.id}}:{status:"needs-input"}})(i,s);if("settled"!==r.status){if("resolved"===r.status){m(r.address),j(e.id,r.address);return}u(i)}},[a,n,s,e?.id]),o&&e?.id)?(0,t.jsx)(A.AddressConfirmation,{description:"Sediul social al entității selectate nu a putut fi identificat în nomenclatorul stradal al municipiului. Alege strada din listă și verifică restul adresei.",onConfirm:async t=>{c(!0);let{error:i}=await j(e.id,t);(c(!1),i)?I.toast.error(i):(m(t),u(null))},open:!0,stored:o,submitting:l,title:"Confirmă sediul social"}):null}var C=e.i(848004),q=e.i(229643);function w({name:e="tipPersoana",selectedOption:a,setSelectedOption:n,selectedEntity:d=!1,tags:o=[],disabled:u=!1,profiles:l,fullName:c}){let{applicationStep:p}=(0,i.useContext)(r.ServiceFormContext),m=l?.filter(e=>s(e)),f=[];return(d?(f.push({key:"PF",value:"Dosar Personal",text:c?`Persoană Fizică (${c})`:"Loading..."}),m?.forEach(e=>f.push({key:e.profileName,value:e.profileName,text:`Persoană Juridică (${e.profileName})`}))):o.includes("persoana-juridica")?m?.forEach(e=>f.push({key:e.profileName,value:e.profileName,text:`Persoană Juridică (${e.profileName})`})):f.push({key:"PF",value:"Dosar Personal",text:c?`Persoană Fizică (${c})`:"Loading..."}),(0,i.useEffect)(()=>{!a&&p?.data===void 0&&f[0]&&n(f[0].key)},[f,a,p?.data,n]),l?.filter(e=>"Dosar Personal"!==e.profileName).length&&o.includes("persoana-juridica"))?(0,t.jsx)(C.EntitiesSelect,{className:(0,q.formClassName)({wfull:!0}),handleSelectChange:e=>{n(e.target.value)},name:e,options:f,selectedOption:a,disabled:u}):null}e.s(["EntitiesSelect",0,w],119270);var k=e.i(894945),N=e.i(60371),P=e.i(197278),D=e.i(816051),x=e.i(967310),R=e.i(299134);let T=(0,i.createContext)({isReadOnly:!1});function E({children:e,isReadOnly:i}
1127){return(0,t.jsx)(T.Provider,{value:{isReadOnly:i},children:e})}function F(){return(0,i.useContext)(T)}function L(e){let{isReadOnly:i}=F();return(0,t.jsx)(N.Input,{...e,disabled:i})}function O(e){let{isReadOnly:i}=F();return(0,t.jsx)(x.AdresaDomiciliu,{...e,disabled:i})}function M(e){let{isReadOnly:i}=F();return(0,t.jsx)(D.ActDeIdentitate,{...e,disabled:i})}e.s(["DateSolicitant",0,function({dateDeContact:e=!0,adresaDomiciliu:d=!0,cardDeIdentitate:o=!1,fax:u=!1,notPrefilled:l=!1,label:c="Date solicitant",description:p="Completați datele de identificare. Câmpurile cu steluță sunt obligatorii."}){var m;let{applicationStep:f,application:$,prefetchedData:g}=(0,i.useContext)(r.ServiceFormContext),{setValue:S,tags:v}=(0,i.useContext)(a.FormSchemaContext),y=v.includes("persoana-juridica"),[I,A]=(0,i.useState)(f?.data?.entity??g?.defaultFormData?.entity??(y?((m=g?.profiles?.filter(e=>s(e))??[]).find(e=>n(e))??m[0])?.profileName:"")??""),[_,h]=(0,i.useState)(null),j=(0,i.useMemo)(()=>(0,R.determineReadOnlyState)({application:$}),[$]);return(0,i.useEffect)(()=>{if(!v.includes("persoana-juridica")||!I||!g?.profiles||f?.data)return;let e=g.profiles.find(e=>e.profileName===I&&n(e))??g.profiles.find(e=>e.profileName===I);if(!e)return;let t=g.defaultFormData,i={lastName:t["solicitant.nume"]??t.nume,firstName:t["solicitant.prenume"]??t.prenume,cnp:t["solicitant.cnp"]??t.cnp,phoneNumber:t.telefon,email:t.email,actTip:t["solicitant.actIdentitate.tip"]??t["actIdentitate.tip"],actSerie:t["solicitant.actIdentitate.serie"]??t["actIdentitate.serie"],actNumar:t["solicitant.actIdentitate.numar"]??t["actIdentitate.numar"],actEmisDe:t["solicitant.actIdentitate.eliberatDe"]??t["actIdentitate.eliberatDe"]};Object.entries({entity:e.profileName,...b(e),inmatriculatLa:"","solicitant.nume":i.lastName,"solicitant.prenume":i.firstName,"solicitant.cnp":i.cnp,"solicitant.actIdentitate.tip":i.actTip??"","solicitant.actIdentitate.serie":i.actSerie??"","solicitant.actIdentitate.numar":i.actNumar??"","solicitant.actIdentitate.eliberatDe":i.actEmisDe??"",telefon:i.phoneNumber,email:i.email}).forEach(([e,t])=>{S(e,t)}),h(e)},[I,g,v,S,f?.data]),(0,t.jsxs)(E,{isReadOnly:j,children:[(0,t.jsx)(B,{enabled:y&&!j&&!f?.data,profile:_,setValue:S}),(0,t.jsxs)(k.Group,{description:p,label:c,children:[v.includes("persoana-juridica")&&!l?(0,t.jsx)(w,{name:"entity",selectedOption:I,setSelectedOption:A,tags:v,disabled:j,profiles:g?.profiles,fullName:g?.fullName}):null,v.includes("persoana-juridica")?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L,{label:"Denumire",name:"denumire"}),(0,t.jsx)(L,{label:"CUI",name:"cui"}),(0,t.jsx)(L,{label:"Nr. Reg. Com.",name:"nrRegCom"}),(0,t.jsx)(L,{label:"Inmatriculat la",name:"inmatriculatLa"}),(0,t.jsx)(P.Paragraph,{subtitle:!0,children:"Date solicitant"}),(0,t.jsx)(L,{label:"În calitate de",name:"solicitant.calitate",wfull:!0}),(0,t.jsx)(L,{label:"Nume",name:"solicitant.nume"}),(0,t.jsx)(L,{label:"Prenume",name:"solicitant.prenume"}),(0,t.jsx)(L,{label:"CNP",name:"solicitant.cnp",wfull:!0}),o?(0,t.jsx)(M,{name:"solicitant.actIdentitate"}):null,e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L,{label:"Telefon",name:"telefon"}),(0,t.jsx)(L,{label:"Email",name:"email"})]}):null,d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P.Paragraph,{subtitle:!0,children:"Adresa sediu"}),(0,t.jsx)(O,{name:"sediu"})]}):null]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L,{label:"Nume",name:"nume"}),(0,t.jsx)(L,{label:"Prenume",name:"prenume"}),(0,t.jsx)(L,{label:"CNP",name:"cnp",wfull:!0}),e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L,{label:"Telefon",name:"telefon"}),(0,t.jsx)(L,{label:"Email",name:"email"})]}):null,u?(0,t.jsx)(L,{label:"Fax",name:"fax",wfull:!0}):null,d?(0,t.jsx)(O,{name:"adresaDomiciliu"}):null,o?(0,t.jsx)(M,{name:"actIdentitate"}):null]})]})]})}],657923)},33158,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"io",{enumerable:!0,get:function(){return r}});
1127let a=Promise.resolve(void 0);function r(){return a}a.status="fulfilled",a.value=void 0,("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},703104,(e,t,i)=>{let a;{let t=e=>function(){throw Error(`\`${e}\` is only available in a Server Component.`)};a={unstable_cache:function(e){return"function"!=typeof e?e:function(){return e.apply(this,arguments)}},unstable_noStore:function(){},io:e.r(33158).io,updateTag:t("updateTag"),revalidateTag:t("revalidateTag"),revalidatePath:t("revalidatePath"),refresh:t("refresh"),cacheLife:t("cacheLife"),cacheTag:t("cacheTag")}}let r=!1,s=!1;a.unstable_cacheLife=function(){return r||(r=!0,console.error(Error("`unstable_cacheLife` was recently stabilized and should be imported as `cacheLife`. The `unstable` prefixed form will be removed in a future version of Next.js."))),a.cacheLife.apply(this,arguments)},a.unstable_cacheTag=function(){return s||(s=!0,console.error(Error("`unstable_cacheTag` was recently stabilized and should be imported as `cacheTag`. The `unstable` prefixed form will be removed in a future version of Next.js."))),a.cacheTag.apply(this,arguments)},t.exports=a,i.unstable_cache=a.unstable_cache,i.revalidatePath=a.revalidatePath,i.revalidateTag=a.revalidateTag,i.updateTag=a.updateTag,i.unstable_noStore=a.unstable_noStore,i.cacheLife=a.cacheLife,i.unstable_cacheLife=a.unstable_cacheLife,i.cacheTag=a.cacheTag,i.unstable_cacheTag=a.unstable_cacheTag,i.refresh=a.refresh,i.io=a.io}]);
1128
1129//# debugId=5bb485b3-ce3a-cc18-6b4a-644adae72529

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.