PageSourceSearch

https://croucher.org.hk/_next/static/chunks/55194-cc1f7411e3dc3ce1.js

js croucher.org.hk collected 2026-09-24 09:28:48 UTC 7,843 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21481,32813,55194,77575,99956],{5602:(t,e,r)=>{r.d(e,{useMutation:()=>v});var s=r(71983),n=r(45849),i=r(12115),a=r(26878),o=r(47288),u=r(4753),l=r(19074);class c extends l.Q{constructor(t,e){super(),this.client=t,this.setOptions(e),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;let r=this.options;this.options=this.client.defaultMutationOptions(t),(0,a.f8)(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(e=this.currentMutation)||e.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;null==(t=this.currentMutation)||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();let e={listeners:!0};"success"===t.type?e.onSuccess=!0:"error"===t.type&&(e.onError=!0),this.notify(e)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,e){return this.mutateOptions=e,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==t?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){let t=this.currentMutation?this.currentMutation.state:(0,o.$)(),e={...t,isLoading:"loading"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset};this.currentResult=e}notify(t){u.j.batch(()=>{if(this.mutateOptions&&this.hasListeners()){var e,r,s,n,i,a,o,u;t.onSuccess?(null==(e=(r=this.mutateOptions).onSuccess)||e.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(s=(n=this.mutateOptions).onSettled)||s.call(n,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)):t.onError&&(null==(i=(a=this.mutateOptions).onError)||i.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(o=(u=this.mutateOptions).onSettled)||o.call(u,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context))}t.listeners&&this.listeners.forEach(({listener:t})=>{t(this.currentResult)})})}}var h=r(47491),d=r(45089),f=r(90048);function v(t,e,r){let o=(0,a.GR)(t,e,r),l=(0,d.useQueryClient)({context:o.context}),[v]=i.useState(()=>new c(l,o));i.useEffect(()=>{v.setOptions(o)},[v,o]);let g=(0,h.r)(i.useCallback(t=>v.subscribe(u.j.batchCalls(t)),[v]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),m=i.useCallback((t,e)=>{v.mutate(t,e).catch(p)},[v]);if(g.error&&(0,f.G)(v.options.useErrorBoundary,[g.error]))throw g.error;return(0,n._)((0,s._)({},g),{mutate:m,mutateAsync:g.mutate})}function p(){}},18767:(t,e,r)=>{function s(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,s,a,o,u;let l,c=null==(e=t.fetchOptions)||null==(r=e.meta)?void 0:r.refetchPage,h=null==(s=t.fetchOptions)||null==(a=s.meta)?void 0:a.fetchMore,d=null==h?void 0:h.pageParam,f=(null==h?void 0:h.direction)==="forward",v=(null==h?void 0:h.direction)==="backward",p=(null==(o=t.state.data)?void 0:o.pages)||[],g=(null==(u=t.state.data)?void 0:u.pageParams)||[],m=g,P=!1,b=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),y=(t,e,r,s)=>(m=s?[e,...m]:[...m,e],s?[r,...t]:[...t,r]),O=(e,r,s,n)=>{if(P)return Promise.reject("Cancelled");if(void 0===s&&!r&&e.length)return Promise.resolve(e);let i={queryKey:t.queryKey,pageParam:s,meta:t.options.meta};return Object.defineProperty(i,"signal",{enumerable:!0,get:()=>{var e,r;return null!=(e=t.signal)&&e.aborted?P=!0:null==(r=t.signal)||r.addEventListener("abort",()=>{P=!0}),t.signal}}),Promise.resolve(b(i)).then(t=>y(e,s,t,n))};if(p.length)if(f){let e=void 0!==d,r=e?d:n(t.options,p);l=O(p,e,r)}else if(v){let e=void 0!==d,r=e?d:i(t.options,p);l=O(p,e,r,!0)}else{m=[];let e=void 0===t.options.getNextPageParam;l=!c||!p[0]||c(p[0],0,p)?O([],e,g[0]):Promise.resolve(y([],g[0],p[0]));for(let r=1;r<p.length;r++)l=l.then(s=>{if(!c||!p[r]||c(p[r],r,p)){let i=e?g[r]:n(t.options,s);return O(s,e,i)}return Promise.resolve(y(s,g[r],p[r]))})}else l=O([]);return l.then(t=>({pages:t,pageParams:m}))}}}}function n(t,e){return null==t.getNextPageParam?void 0:t.getNextPageParam(e[e.length-1],e)}function i(t,e){return null==t.getPreviousPageParam?void 0:t.getPreviousPageParam(e[0],e)}function a(t,e){if(t.getNextPageParam&&Array.isArray(e)){let r=n(t,e);return null!=r&&!1!==r}}function o(t,e){if(t.getPreviousPageParam&&Array.isArray(e)){let r=i(t,e);return null!=r&&!1!==r}}r.d(e,{PL:()=>s,RQ:()=>o,rB:()=>a})},20847:(t,e,r)=>{r.d(e,{k5:()=>u});var s=r(12115),n={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i=s.createContext&&s.createContext(n),a=function(){return(a=Object.assign||function(t){for(var e,r=1,s=arguments.length;r<s;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},o=function(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&0>e.indexOf(s)&&(r[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,s=Object.getOwnPropertySymbols(t);n<s.length;n++)0>e.indexOf(s[n])&&Object.prototype.propertyIsEnumerable.call(t,s[n])&&(r[s[n]]=t[s[n]]);return r};function u(t){return function(e){return s.createElement(l,a({attr:a({},t.attr)},e),function t(e){return e&&e.map(function(e,r){return s.createElement(e.tag,a({key:r},e.attr),t(e.child))})}(t.child))}}function l(t){var e=function(e){var r,n=t.attr,i=t.size,u=t.title,l=o(t,["attr","size","title"]),c=i||e.size||"1em";return e.className&&(r=e.className),t.className&&(r=(r?r+" ":"")+t.className),s.createElement("svg",a({stroke:"currentColor",fill:"
1currentColor",strokeWidth:"0"},e.attr,n,l,{className:r,style:a(a({color:t.color||e.color},e.style),t.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),u&&s.createElement("title",null,u),t.children)};return void 0!==i?s.createElement(i.Consumer,null,function(t){return e(t)}):e(n)}},30926:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),!function(t,e){for(var r in e)Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}(e,{callServer:function(){return s.callServer},createServerReference:function(){return i.createServerReference},findSourceMapURL:function(){return n.findSourceMapURL}});let s=r(41209),n=r(85153),i=r(77197)},38242:(t,e,r)=>{r.d(e,{useInfiniteQuery:()=>u});var s=r(26878),n=r(37731),i=r(18767);class a extends n.${constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t,e){super.setOptions({...t,behavior:(0,i.PL)()},e)}getOptimisticResult(t){return t.behavior=(0,i.PL)(),super.getOptimisticResult(t)}fetchNextPage({pageParam:t,...e}={}){return this.fetch({...e,meta:{fetchMore:{direction:"forward",pageParam:t}}})}fetchPreviousPage({pageParam:t,...e}={}){return this.fetch({...e,meta:{fetchMore:{direction:"backward",pageParam:t}}})}createResult(t,e){var r,s,n,a,o,u;let{state:l}=t,c=super.createResult(t,e),{isFetching:h,isRefetching:d}=c,f=h&&(null==(r=l.fetchMeta)||null==(s=r.fetchMore)?void 0:s.direction)==="forward",v=h&&(null==(n=l.fetchMeta)||null==(a=n.fetchMore)?void 0:a.direction)==="backward";return{...c,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,i.rB)(e,null==(o=l.data)?void 0:o.pages),hasPreviousPage:(0,i.RQ)(e,null==(u=l.data)?void 0:u.pages),isFetchingNextPage:f,isFetchingPreviousPage:v,isRefetching:d&&!f&&!v}}}var o=r(88993);function u(t,e,r){let n=(0,s.vh)(t,e,r);return(0,o.t)(n,a)}}}]);

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.