1var _sentryDebugIds,_sentryDebugIdIdentifier;void 0===_sentryDebugIds&&(_sentryDebugIds={});try{var stack=(new Error).stack;stack&&(_sentryDebugIds[stack]="728d70b9-f3d9-4ea7-957f-7b63095ee90c",_sentryDebugIdIdentifier="sentry-dbid-728d70b9-f3d9-4ea7-957f-7b63095ee90c")}catch(e){} 2var SENTRY_RELEASE;SENTRY_RELEASE={name: "è²è°·", version: "2.5.0"}; 3__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return p}});var t=r(d[0]),s=e(r(d[1])),l=e(r(d[2])),c=e(r(d[3])),o=e(r(d[4])),n=e(r(d[5])),u=e(r(d[6])),b=e(r(d[7])),x=e(r(d[8])),f=e(r(d[9]));const h=[{key:'',label:'\u5168\u90e8'},{key:'draft',label:'\u8349\u7a3f'},{key:'published',label:'\u5df2\u767c\u5e03'}],y=[{key:'',label:'\u5168\u90e8'},{key:'general',label:'\u4e00\u822c\u8ab2\u7a0b'},{key:'hypnotist',label:'\u50ac\u7720\u5e2b'}];function p(){const e=(0,r(d[10]).useThemeColors)(),p=((0,r(d[11]).useAuthStore)(e=>e.user),(0,r(d[11]).useAuthStore)(r(d[11]).selectIsAdmin)),j=(0,r(d[11]).useAuthStore)(e=>e.isLoading),[S,A]=(0,t.useState)([]),[N,w]=(0,t.useState)({}),[k,_]=(0,t.useState)(!0),[C,v]=(0,t.useState)(''),[L,P]=(0,t.useState)(''),[O,R]=(0,t.useState)(!1),[B,z]=(0,t.useState)('');(0,t.useEffect)(()=>{j||(p?H():r(d[12]).router.replace('/(tabs)/profile'))},[C,L,j]);const H=(0,t.useCallback)(async()=>{_(!0),z('');try{const e={};C&&(e.status=C),'hypnotist'===L&&(e.access_level='hypnotist'),'general'===L&&(e.exclude_access_levels=['hypnotist','trainee']);const t=await(0,r(d[13],"@/lib/api").getAllCourses)(Object.keys(e).length>0?e:void 0);A(t);const s=t.map(e=>e.id),l=await(0,r(d[13],"@/lib/api").getLessonCountsByCourseIds)(s);w(l)}catch(e){console.error('Failed to load courses:',e),z(e?.message||'\u8f09\u5165\u8ab2\u7a0b\u5931\u6557\uff0c\u8acb\u91cd\u65b0\u6574\u7406\u9801\u9762')}finally{_(!1)}},[C,L]),I=async(e,t)=>{const s=S.findIndex(t=>t.id===e);if(s<0)return;const l='up'===t?s-1:s+1;if(l<0||l>=S.length)return;const c=[...S],o=[...S],n=o[s].sort_order,u=o[l].sort_order;o[s]={...o[s],sort_order:u},o[l]={...o[l],sort_order:n},[o[s],o[l]]=[o[l],o[s]],A(o);try{await(0,r(d[13],"@/lib/api").swapCourseSortOrder)(c[s].id,c[l].id)}catch(e){A(c),z('\u6392\u5e8f\u5132\u5b58\u5931\u6557\uff1a'+(e?.message||'\u8acb\u7a0d\u5f8c\u518d\u8a66'))}},T=t=>{const l={draft:{bg:(0,r(d[14]).withAlpha)(e.warningBg,r(d[14]).ALPHA.badgeAlt),text:e.warning},published:{bg:(0,r(d[14]).withAlpha)(e.success,r(d[14]).ALPHA.badgeAlt),text:e.success}},c=l[t]||l.draft;return(0,r(d[15]).jsx)(s.default,{className:"px-2 py-0.5 rounded-full",style:{backgroundColor:c.bg},children:(0,r(d[15]).jsx)(u.default,{className:"text-xs",style:{color:c.text},children:{draft:'\u8349\u7a3f',published:'\u5df2\u767c\u5e03'}[t]||t})})};return p?(0,r(d[15]).jsxs)(b.default,{title:"\u8ab2\u7a0b\u7ba1\u7406",error:B,noScroll:!0,rightAction:(0,r(d[15]).jsxs)(s.default,{className:"flex-row items-center",children:[(0,r(d[15]).jsx)(c.default,{onPress:()=>{const e=!O;e&&(v(''),P('')),R(e)},className:"w-10 h-10 rounded-full items-center justify-center mr-2",style:{backgroundColor:O?e.primary:e.bgWarm},accessibilityRole:"button",accessibilityLabel:O?'\u5b8c\u6210\u6392\u5e8f':'\u6392\u5e8f\u8ab2\u7a0b',children:(0,r(d[15]).jsx)(o.default,{name:"sort",size:16,color:O?'white':e.textSubtle})}),(0,r(d[15]).jsx)(c.default,{onPress:()=>r(d[12]).router.push('/admin-course-form'),className:"w-10 h-10 rounded-full items-center justify-center",style:{backgroundColor:e.primary},accessibilityRole:"button",accessibilityLabel:"\u65b0\u589e\u8ab2\u7a0b",children:(0,r(d[15]).jsx)(o.default,{name:"plus",size:16,color:"white"})})]}),children:[(0,r(d[15]).jsxs)(s.default,{className:"px-4",children:[(0,r(d[15]).jsx)(s.default,{style:O?{opacity:.4}:void 0,children:(0,r(d[15]).jsx)(x.default,{tabs:h,activeKey:C,onSelect:e=>{O||v(e)}})}),(0,r(d[15]).jsx)(s.default,{style:O?{opacity:.4}:void 0,children:(0,r(d[15]).jsx)(x.default,{tabs:y,activeKey:L,onSelect:e=>{O||P(e)}})}),O&&(0,r(d[15]).jsx)(s.default,{className:"p-3 rounded-xl mb-3",style:{backgroundColor:e.successBg},children:(0,r(d[15]).jsx)(u.default,{className:"text-sm",style:{color:e.successText},children:"\u6392\u5e8f\u6a21\u5f0f\uff1a\u4f7f\u7528 \u25b2\u25bc \u7bad\u982d\u8abf\u6574\u8ab2\u7a0b\u9806\u5e8f"})})]}),k?(0,r(d[15]).jsx)(s.default,{className:"flex-1 items-center justify-center",children:(0,r(d[15]).jsx)(n.default,{})}):0===S.length?(0,r(d[15]).jsx)(f.default,{icon:"video-camera",title:"\u5c1a\u7121\u8ab2\u7a0b"}
3):(0,r(d[15]).jsx)(l.default,{data:S,renderItem:({item:t,index:l})=>{return(0,r(d[15]).jsx)(s.default,{className:"mx-4 mb-3 p-4 rounded-xl",style:{backgroundColor:e.bgCard,...r(d[16]).WEB_CARD_SHADOW},children:(0,r(d[15]).jsxs)(s.default,{className:"flex-row items-center",children:[O&&(0,r(d[15]).jsxs)(s.default,{className:"mr-3 items-center",style:{gap:4},children:[(0,r(d[15]).jsx)(c.default,{onPress:()=>I(t.id,'up'),disabled:0===l,hitSlop:8,accessibilityRole:"button",accessibilityLabel:"\u4e0a\u79fb",children:(0,r(d[15]).jsx)(o.default,{name:"chevron-up",size:12,color:0===l?e.bgLight:e.textSubtle})}),(0,r(d[15]).jsx)(c.default,{onPress:()=>I(t.id,'down'),disabled:l===S.length-1,hitSlop:8,accessibilityRole:"button",accessibilityLabel:"\u4e0b\u79fb",children:(0,r(d[15]).jsx)(o.default,{name:"chevron-down",size:12,color:l===S.length-1?e.bgLight:e.textSubtle})})]}),(0,r(d[15]).jsxs)(c.default,{onPress:()=>r(d[12]).router.push(`/admin-course-form?id=${t.id}`),disabled:O,className:"flex-1 mr-3",style:(0,r(d[16]).webPressableStyle)(),accessibilityRole:O?'none':'button',accessibilityLabel:O?`\u6392\u5e8f\u8ab2\u7a0b ${t.title}`:`\u7de8\u8f2f\u8ab2\u7a0b ${t.title}`,children:[(0,r(d[15]).jsx)(u.default,{className:"text-base",style:{color:e.textTitle},numberOfLines:1,children:t.title}),(0,r(d[15]).jsxs)(u.default,{className:"text-sm mt-1",style:{color:e.textSubtle},children:["\u50ac\u7720\u5e2b ",t.creator?.name??'\u2014']}),(0,r(d[15]).jsxs)(u.default,{className:"text-xs mt-1",style:{color:e.textPlaceholder},children:[N[t.id]??0," \u7ae0\u7bc0"]})]}),(0,r(d[15]).jsxs)(s.default,{className:"items-end",style:{gap:4},children:[T(t.status),(n=t.access_level,'public'===n?null:(0,r(d[15]).jsx)(s.default,{className:"px-2 py-0.5 rounded-full ml-1",style:{backgroundColor:(0,r(d[14]).withAlpha)(e.celebrationSand,r(d[14]).ALPHA.badgeAlt)},children:(0,r(d[15]).jsx)(u.default,{className:"text-xs",style:{color:e.textSubtle},children:{public:'\u516c\u958b',premium:'\u4ed8\u8cbb',trainee:'\u6e96\u50ac\u7720\u5e2b',hypnotist:'\u50ac\u7720\u5e2b'}[n]||n})}))]})]})});var n},keyExtractor:e=>e.id,contentContainerStyle:{paddingTop:8,paddingBottom:40}})]}):(0,r(d[15]).jsx)(b.default,{title:"\u8ab2\u7a0b\u7ba1\u7406",children:(0,r(d[15]).jsx)(f.default,{icon:"lock",title:"\u7121\u6b0a\u9650\u8a2a\u554f"})})}},3051,[49,267,265,392,1136,2329,1152,3035,3040,2745,1153,1885,482,1893,1924,452,2315]);
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.