/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
client
/
/opt/canhelp/node_modules/next/dist/client
mkdir
upload
Name
Size
Mode
Actions
app-dir/
-
0755
rm
compat/
-
0755
rm
components/
-
0755
rm
dev/
-
0755
rm
legacy/
-
0755
rm
lib/
-
0755
rm
portal/
-
0755
rm
react-client-callbacks/
-
0755
rm
request/
-
0755
rm
tracing/
-
0755
rm
add-base-path.d.ts
79
0644
edit
dl
rm
add-base-path.js
1010
0644
edit
dl
rm
add-base-path.js.map
973
0644
edit
dl
rm
add-locale.d.ts
121
0644
edit
dl
rm
add-locale.js
1052
0644
edit
dl
rm
add-locale.js.map
900
0644
edit
dl
rm
app-bootstrap.d.ts
285
0644
edit
dl
rm
app-bootstrap.js
2771
0644
edit
dl
rm
app-bootstrap.js.map
3967
0644
edit
dl
rm
app-build-id.d.ts
111
0644
edit
dl
rm
app-build-id.js
1767
0644
edit
dl
rm
app-build-id.js.map
1461
0644
edit
dl
rm
app-call-server.d.ts
91
0644
edit
dl
rm
app-call-server.js
1164
0644
edit
dl
rm
app-call-server.js.map
1017
0644
edit
dl
rm
app-find-source-map-url.d.ts
90
0644
edit
dl
rm
app-find-source-map-url.js
1662
0644
edit
dl
rm
app-find-source-map-url.js.map
2092
0644
edit
dl
rm
app-globals.d.ts
45
0644
edit
dl
rm
app-globals.js
708
0644
edit
dl
rm
app-globals.js.map
591
0644
edit
dl
rm
app-index.d.ts
625
0644
edit
dl
rm
app-index.js
11429
0644
edit
dl
rm
app-index.js.map
17063
0644
edit
dl
rm
app-link-gc.d.ts
40
0644
edit
dl
rm
app-link-gc.js
4543
0644
edit
dl
rm
app-link-gc.js.map
5163
0644
edit
dl
rm
app-next-dev.d.ts
24
0644
edit
dl
rm
app-next-dev.js
1214
0644
edit
dl
rm
app-next-dev.js.map
1198
0644
edit
dl
rm
app-next-turbopack.d.ts
11
0644
edit
dl
rm
app-next-turbopack.js
1291
0644
edit
dl
rm
app-next-turbopack.js.map
1659
0644
edit
dl
rm
app-next.d.ts
24
0644
edit
dl
rm
app-next.js
1284
0644
edit
dl
rm
app-next.js.map
1249
0644
edit
dl
rm
app-webpack.d.ts
11
0644
edit
dl
rm
app-webpack.js
3174
0644
edit
dl
rm
app-webpack.js.map
3203
0644
edit
dl
rm
assign-location.d.ts
363
0644
edit
dl
rm
assign-location.js
1259
0644
edit
dl
rm
assign-location.js.map
1549
0644
edit
dl
rm
detect-domain-locale.d.ts
141
0644
edit
dl
rm
detect-domain-locale.js
922
0644
edit
dl
rm
detect-domain-locale.js.map
722
0644
edit
dl
rm
flight-data-helpers.d.ts
1491
0644
edit
dl
rm
flight-data-helpers.js
5439
0644
edit
dl
rm
flight-data-helpers.js.map
8665
0644
edit
dl
rm
form-shared.d.ts
2886
0644
edit
dl
rm
form-shared.js
7132
0644
edit
dl
rm
form-shared.js.map
10762
0644
edit
dl
rm
form.d.ts
489
0644
edit
dl
rm
form.js
5816
0644
edit
dl
rm
form.js.map
8265
0644
edit
dl
rm
get-domain-locale.d.ts
220
0644
edit
dl
rm
get-domain-locale.js
1561
0644
edit
dl
rm
get-domain-locale.js.map
2457
0644
edit
dl
rm
has-base-path.d.ts
60
0644
edit
dl
rm
has-base-path.js
807
0644
edit
dl
rm
has-base-path.js.map
605
0644
edit
dl
rm
head-manager.d.ts
1041
0644
edit
dl
rm
head-manager.js
4981
0644
edit
dl
rm
head-manager.js.map
8342
0644
edit
dl
rm
image-component.d.ts
1337
0644
edit
dl
rm
image-component.js
13961
0644
edit
dl
rm
image-component.js.map
21385
0644
edit
dl
rm
index.d.ts
773
0644
edit
dl
rm
index.js
33440
0644
edit
dl
rm
index.js.map
52576
0644
edit
dl
rm
link.d.ts
5062
0644
edit
dl
rm
link.js
19457
0644
edit
dl
rm
link.js.map
34367
0644
edit
dl
rm
next-dev-turbopack.d.ts
11
0644
edit
dl
rm
next-dev-turbopack.js
1940
0644
edit
dl
rm
next-dev-turbopack.js.map
3002
0644
edit
dl
rm
next-dev.d.ts
20
0644
edit
dl
rm
next-dev.js
1223
0644
edit
dl
rm
next-dev.js.map
1194
0644
edit
dl
rm
next-turbopack.d.ts
48
0644
edit
dl
rm
next-turbopack.js
1460
0644
edit
dl
rm
next-turbopack.js.map
2330
0644
edit
dl
rm
next.d.ts
135
0644
edit
dl
rm
next.js
787
0644
edit
dl
rm
next.js.map
860
0644
edit
dl
rm
normalize-locale-path.d.ts
144
0644
edit
dl
rm
normalize-locale-path.js
883
0644
edit
dl
rm
normalize-locale-path.js.map
883
0644
edit
dl
rm
normalize-trailing-slash.d.ts
190
0644
edit
dl
rm
normalize-trailing-slash.js
1450
0644
edit
dl
rm
normalize-trailing-slash.js.map
1723
0644
edit
dl
rm
page-bootstrap.d.ts
123
0644
edit
dl
rm
page-bootstrap.js
7427
0644
edit
dl
rm
page-bootstrap.js.map
8999
0644
edit
dl
rm
page-loader.d.ts
1370
0644
edit
dl
rm
page-loader.js
7595
0644
edit
dl
rm
page-loader.js.map
12106
0644
edit
dl
rm
remove-base-path.d.ts
62
0644
edit
dl
rm
remove-base-path.js
1080
0644
edit
dl
rm
remove-base-path.js.map
1145
0644
edit
dl
rm
remove-locale.d.ts
77
0644
edit
dl
rm
remove-locale.js
1148
0644
edit
dl
rm
remove-locale.js.map
1308
0644
edit
dl
rm
request-idle-callback.d.ts
265
0644
edit
dl
rm
request-idle-callback.js
1449
0644
edit
dl
rm
request-idle-callback.js.map
1432
0644
edit
dl
rm
resolve-href.d.ts
396
0644
edit
dl
rm
resolve-href.js
5506
0644
edit
dl
rm
resolve-href.js.map
7899
0644
edit
dl
rm
route-announcer.d.ts
115
0644
edit
dl
rm
route-announcer.js
3312
0644
edit
dl
rm
route-announcer.js.map
3553
0644
edit
dl
rm
route-loader.d.ts
1736
0644
edit
dl
rm
route-loader.js
13968
0644
edit
dl
rm
route-loader.js.map
23012
0644
edit
dl
rm
route-params.d.ts
1113
0644
edit
dl
rm
route-params.js
8258
0644
edit
dl
rm
route-params.js.map
10884
0644
edit
dl
rm
router.d.ts
1078
0644
edit
dl
rm
router.js
6716
0644
edit
dl
rm
router.js.map
8823
0644
edit
dl
rm
script.d.ts
923
0644
edit
dl
rm
script.js
14047
0644
edit
dl
rm
script.js.map
18782
0644
edit
dl
rm
set-attributes-from-props.d.ts
86
0644
edit
dl
rm
set-attributes-from-props.js
2367
0644
edit
dl
rm
set-attributes-from-props.js.map
3121
0644
edit
dl
rm
trusted-types.d.ts
544
0644
edit
dl
rm
trusted-types.js
1528
0644
edit
dl
rm
trusted-types.js.map
1957
0644
edit
dl
rm
use-client-disallowed.d.ts
53
0644
edit
dl
rm
use-client-disallowed.js
1006
0644
edit
dl
rm
use-client-disallowed.js.map
753
0644
edit
dl
rm
use-intersection.d.ts
412
0644
edit
dl
rm
use-intersection.js
3845
0644
edit
dl
rm
use-intersection.js.map
6646
0644
edit
dl
rm
use-merged-ref.d.ts
139
0644
edit
dl
rm
use-merged-ref.js
2402
0644
edit
dl
rm
use-merged-ref.js.map
3496
0644
edit
dl
rm
web-vitals.d.ts
156
0644
edit
dl
rm
web-vitals.js
1109
0644
edit
dl
rm
web-vitals.js.map
1008
0644
edit
dl
rm
webpack.d.ts
11
0644
edit
dl
rm
webpack.js
2282
0644
edit
dl
rm
webpack.js.map
2535
0644
edit
dl
rm
with-router.d.ts
505
0644
edit
dl
rm
with-router.js
1458
0644
edit
dl
rm
with-router.js.map
1921
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/next/dist/client/form.js
(5816B)
'use client'; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function() { return _default; } }); const _jsxruntime = require("react/jsx-runtime"); const _react = require("react"); const _addbasepath = require("./add-base-path"); const _routercontextsharedruntime = require("../shared/lib/router-context.shared-runtime"); const _formshared = require("./form-shared"); const Form = /*#__PURE__*/ (0, _react.forwardRef)(function FormComponent(param, ref) { let { replace, scroll, prefetch: prefetchProp, ...props } = param; const router = (0, _react.useContext)(_routercontextsharedruntime.RouterContext); const actionProp = props.action; const isNavigatingForm = typeof actionProp === 'string'; // Validate `action` if (process.env.NODE_ENV === 'development') { if (isNavigatingForm) { (0, _formshared.checkFormActionUrl)(actionProp, 'action'); } } // Validate `prefetch` if (process.env.NODE_ENV === 'development') { if (prefetchProp !== undefined) { console.error('Passing `prefetch` to a <Form> has no effect in the pages directory.'); } } // Validate `scroll` and `replace` if (process.env.NODE_ENV === 'development') { if (!isNavigatingForm && (replace !== undefined || scroll !== undefined)) { console.error('Passing `replace` or `scroll` to a <Form> whose `action` is a function has no effect.\n' + 'See the relevant docs to learn how to control this behavior for navigations triggered from actions:\n' + ' `router.replace()` - https://nextjs.org/docs/pages/api-reference/functions/use-router#routerreplace\n'); } } // Clean up any unsupported form props (and warn if present) for (const key of _formshared.DISALLOWED_FORM_PROPS){ if (key in props) { if (process.env.NODE_ENV === 'development') { console.error("<Form> does not support changing `" + key + "`."); } delete props[key]; } } if (!isNavigatingForm) { return /*#__PURE__*/ (0, _jsxruntime.jsx)("form", { ...props, ref: ref }); } const actionHref = (0, _addbasepath.addBasePath)(actionProp); return /*#__PURE__*/ (0, _jsxruntime.jsx)("form", { ...props, ref: ref, action: actionHref, onSubmit: (event)=>onFormSubmit(event, { router, actionHref, replace, scroll, onSubmit: props.onSubmit }) }); }); const _default = Form; function onFormSubmit(event, param) { let { actionHref, onSubmit, replace, scroll, router } = param; if (typeof onSubmit === 'function') { onSubmit(event); // if the user called event.preventDefault(), do nothing. // (this matches what Link does for `onClick`) if (event.defaultPrevented) { return; } } if (!router) { // Form was somehow used outside of the router (but not in app/, the implementation is forked!). // We can't perform a soft navigation, so let the native submit handling do its thing. return; } const formElement = event.currentTarget; const submitter = event.nativeEvent.submitter; let action = actionHref; if (submitter) { // this is page-router-only, so we don't need to worry about false positives // from the attributes that react adds for server actions. if ((0, _formshared.hasUnsupportedSubmitterAttributes)(submitter)) { return; } // client actions have `formAction="javascript:..."`. We obviously can't prefetch/navigate to that. if ((0, _formshared.hasReactClientActionAttributes)(submitter)) { return; } // If the submitter specified an alternate formAction, // use that URL instead -- this is what a native form would do. // NOTE: `submitter.formAction` is unreliable, because it will give us `location.href` if it *wasn't* set // NOTE: this should not have `basePath` added, because we can't add it before hydration const submitterFormAction = submitter.getAttribute('formAction'); if (submitterFormAction !== null) { if (process.env.NODE_ENV === 'development') { (0, _formshared.checkFormActionUrl)(submitterFormAction, 'formAction'); } action = submitterFormAction; } } const targetUrl = (0, _formshared.createFormSubmitDestinationUrl)(action, formElement); // Finally, no more reasons for bailing out. event.preventDefault(); const method = replace ? 'replace' : 'push'; const targetHref = targetUrl.href // TODO: will pages router be happy about an absolute URL here? ; // TODO(form): Make this use a transition so that pending states work // // Unlike the app router, pages router doesn't use startTransition, // and can't easily be wrapped in one because of implementation details // (e.g. it doesn't use any react state) // But it's important to have this wrapped in a transition because // pending states from e.g. `useFormStatus` rely on that. // So this needs some follow up work. router[method](targetHref, undefined, { scroll }); } if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=form.js.map
Save
cmd:
run