| 37973 | } |
| 37974 | let jo = !1 |
| 37975 | const resolveSpec = |
| 37976 | (s, o) => |
| 37977 | ({ |
| 37978 | specActions: i, |
| 37979 | specSelectors: a, |
| 37980 | errActions: u, |
| 37981 | fn: { fetch: _, resolve: w, AST: x = {} }, |
| 37982 | getConfigs: C, |
| 37983 | }) => { |
| 37984 | jo || |
| 37985 | (console.warn( |
| 37986 | 'specActions.resolveSpec is deprecated since v3.10.0 and will be removed in v4.0.0; use requestResolvedSubtree instead!' |
| 37987 | ), |
| 37988 | (jo = !0)) |
| 37989 | const { |
| 37990 | modelPropertyMacro: j, |
| 37991 | parameterMacro: L, |
| 37992 | requestInterceptor: B, |
| 37993 | responseInterceptor: $, |
| 37994 | } = C() |
| 37995 | ;(void 0 === s && (s = a.specJson()), void 0 === o && (o = a.url())) |
| 37996 | let U = x.getLineNumberForPath ? x.getLineNumberForPath : () => {}, |
| 37997 | V = a.specStr() |
| 37998 | return w({ |
| 37999 | fetch: _, |
| 38000 | spec: s, |
| 38001 | baseDoc: String(new URL(o, document.baseURI)), |
| 38002 | modelPropertyMacro: j, |
| 38003 | parameterMacro: L, |
| 38004 | requestInterceptor: B, |
| 38005 | responseInterceptor: $, |
| 38006 | }).then(({ spec: s, errors: o }) => { |
| 38007 | if ((u.clear({ type: 'thrown' }), Array.isArray(o) && o.length > 0)) { |
| 38008 | let s = o.map( |
| 38009 | (s) => ( |
| 38010 | console.error(s), |
| 38011 | (s.line = s.fullPath ? U(V, s.fullPath) : null), |
| 38012 | (s.path = s.fullPath ? s.fullPath.join('.') : null), |
| 38013 | (s.level = 'error'), |
| 38014 | (s.type = 'thrown'), |
| 38015 | (s.source = 'resolver'), |
| 38016 | Object.defineProperty(s, 'message', { enumerable: !0, value: s.message }), |
| 38017 | s |
| 38018 | ) |
| 38019 | ) |
| 38020 | u.newThrownErrBatch(s) |
| 38021 | } |
| 38022 | return i.updateResolved(s) |
| 38023 | }) |
| 38024 | } |
| 38025 | let Po = [] |
| 38026 | const Io = io()(() => { |