1"use strict";(self.webpackChunkhikingbook=self.webpackChunkhikingbook||[]).push([[182,4614,4658,5559],{19586(t,e,i){i.a(t,async(t,a)=>{try{var s=i(25381),r=i(56059);const t=(0,s.eq)("login-user"),n=null!=t&&t.isPro,l="/"===window.location.pathname,o=n||l||(0,s.tC)(),{default:c}=o?await i.e(8874).then(()=>i.t(98874,23)):await i.e(2929).then(()=>i.t(12929,23));o&&(c.accessToken=r.A.mapbox.accessToken);const h=c;i.d(e,["A",0,h]),a()}catch(t){a(t)}},1)},74326(t,e,i){i.d(e,{i:()=>s,j:()=>r});var a=i(25381);function s(t,e){return new Intl.DateTimeFormat((0,a.JK)(!1),e).format(t)}function r(t,e){return new Intl.NumberFormat((0,a.JK)(!1),e).format(t)}},85831(t,e,i){i.d(e,{A:()=>s});var a=i(79945);class s{constructor(t={}){this.id=t.id||(0,a.A)(),this.trailID=t.trailID,this.languageCode=t.languageCode,this.name=t.name||"",this.description=t.description||""}}},22302(t,e,i){i.a(t,async(t,a)=>{try{i.d(e,{default:()=>p});var s=i(38066),r=i(37681),n=i(56059),l=i(74326),o=i(25381),c=i(3406),h=(i(62655),i(98456)),u=i(37070),d=(i(74503),t([c,u]));[c,u]=d.then?(await d)():d;class p{constructor(t){this.id=t.id||"",this.trailID=t.trailID,this.name=t.name,this.cover=t.cover||{},this.description=t.description,this.status=t.status,this.roadConditions=t.roadConditions||[],this.addresses=t.addresses||[],this.mountainRange=t.mountainRange,this.type=t.type,this.l10nType=t.l10nType||this.type||"",this.mountainPermitApplicationURL=t.mountainPermitApplicationURL,this.parkPermitApplicationURL=t.parkPermitApplicationURL,this.riskLevel=t.riskLevel||0,this.pageView=t.pageView,this.visible=t.visible,this.encodedID=t.encodedID||"",this.updatedAt=t.updatedAt?new Date(t.updatedAt):new Date,this.youTubeID=t.youTubeID,this.tags=t.tags||[],this.encodedID=t.encodedID||(0,o.cJ)(this.id),this.park=t.park||"",this.trailhead=t.trailhead,this.parkingSpaces=t.parkingSpaces,this.numFavorites=t.numFavorites||0,this.isFavorite=t.isFavorite||!1,this.hikeID=t.hikeID,this.isAvailable=t.isAvailable||this.visible&&null!=this.hikeID,this.hiddenKeywords=t.hiddenKeywords||[],this.pathname=t.pathname||"",this.hike=t.hike?new c.default(t.hike):null,s.A.injectTo(this,r)}get formattedUpdatedTime(){return(0,l.i)(this.updatedAt,n.A.format.longDate)}get l10nStatus(){return this.$t(this.status)}get l10nDays(){return`${this.days} ${this.$t("days")}`}get printFilename(){return`hikingbook-${this.name}`}get url(){return`/trails/${this.pathname}`}get embedURL(){return`${window.location.origin}/trails/embed/${this.pathname}`}get forestRecreationURL(){return this.trailID?`https://recreation.forest.gov.tw/Trail/RT?tr_id=${this.trailID}`:""}get urlWithEncodedID(){return`/trails/${this.encodedID}`}get duration(){return this.hike?this.hike.duration:0}get distance(){return this.hike?this.hike.distance:0}get totalEstimatedCalories(){return this.hike?this.hike.totalEstimatedCalories:0}get isPaceVisible(){return!!this.hike&&this.hike.isPaceVisible}get youTubeURL(){return""===this.youTubeID?"":`https://www.youtube.com/embed/${this.youTubeID}?rel=0&autoplay=1&loop=1&mute=1&playlist=${this.youTubeID}`}get windyURL(){return this.hike?this.hike.windyURL:""}get postCommentURL(){return`/trails/${this.encodedID}/comments`}get days(){return this.hike?this.hike.days:0}get addressString(){return this.addresses.join(", ")}get fitnessLevel(){return this.hike?this.hike.fitnessLevel:0}get altitudeStatistics(){return this.hike?this.hike.altitudeStatistics:(0,h.oT)([])}get maxAltitude(){return this.hike?this.hike.maxAltitude:0}get minAltitude(){return this.hike?this.hike.minAltitude:0}get elevationGain(){return this.hike?this.hike.elevationGain:0}get favoriteImageURL(){return this.isFavorite?"/images/trail/heart-red.png":"/images/trail/heart-gray.png"}get representativePoint(){return this.hike?this.hike.representativePoint:null}get text(){return this.hike?this.hike.text:""}get isNotOpen(){return"open"!==this.status}get statusIconClass(){switch(this.status){case n.A.trailStatus.closed:case n.A.trailStatus.partial:return"bi-exclamation-triangle";case n.A.trailStatus.caution:return"bi-exclamation-circle";default:return"bi-check-lg"}}get statusColorClass(){switch(this.status){case n.A.trailStatus.closed:return"text-brand-red-text";case n.A.trailStatus.partial:case n.A.trailStatus.caution:return"text-warning-light";default:return"text-success"}}
1get statusBackgroundColorClass(){switch(this.status){case n.A.trailStatus.closed:return"bg-brand-red-bg";case n.A.trailStatus.partial:case n.A.trailStatus.caution:return"bg-bg-warning";default:return"bg-success"}}waypointGeoJSON(t={classes:["mapboxgl-marker-waypoint"]}){return this.hike?this.hike.waypointGeoJSON(t):(0,o.Lr)([],{sourceID:(0,u.Fx)()})}lineGeoJSON(t={"line-width":n.A.mapbox.lineWidth,"line-color":n.A.colors.primary}){return this.hike?this.hike.lineGeoJSON(t):(0,o.Lr)([],{sourceID:(0,u.Er)()})}}a()}catch(t){a(t)}})},5559(t,e,i){i.d(e,{A:()=>s});var a=i(56059);class s{constructor(t){this.encodedID=t.encodedID,this.displayName=t.displayName||"",this.username=t.username||"",this.avatarURL=t.avatarURL||"",this.state=t.state||a.A.userState.nonactivated,this.isPro=t.isPro||!1,this.isSponsor=t.isSponsor||!1,this.numPublicActivities=t.numPublicActivities||0,this.numFollowers=t.numFollowers||0,this.numTrailCompletions=t.numTrailCompletions||0,this.isFollowing=t.isFollowing||!1,this.followingFollower=t.followingFollower?new s(t.followingFollower):null,this.trailLatestCompletedAt=t.trailLatestCompletedAt?new Date(t.trailLatestCompletedAt):null}get profileURL(){return`/${this.username}`}get activated(){return this.state===a.A.userState.activated}}},38066(t,e,i){var a=i(53900),s=i(25381);const r=t=>{let e=(0,s.JK)();e in t||(e="en-US"),a.Ay.isInitialized?a.Ay.addResources(e,a.Ay.options.defaultNS,t[e][a.Ay.options.defaultNS]):a.Ay.init({lng:e,resources:t})},n={created(){r(this.$options.l10nResources)},methods:{initI18next(t){r(t)},$t(t,e){return t&&"string"==typeof t&&!a.Ay.exists(t)&&this.$options&&r(this.$options.l10nResources),a.Ay.t(t,e)}},injectTo(t,e){for(let[e,i]of Object.entries(this.methods))t[e]=i;r(e)}};i.d(e,["A",0,n])},23078(t,e,i){i.a(t,async(t,a)=>{try{i(47144),i(89542);var s=i(49424),r=i(25381),n=i(22302),l=i(85831),o=t([n]),c=o.then?(await o)():o;n=c[0];const h={components:{TrailEditor:(0,s.$V)(()=>i.e(9084).then(()=>i(96703)))},emits:["file-uploaded"],data:()=>({trails:[],trailL10ns:[]}),methods:{trailAccordionItemID:t=>`trail-${t.id}`,trailL10nAccordionItemID:t=>`trail-l10n-${t.id}`,uploadTrails(t){const e=this.$refs.trailFilesInput.files;if(e.length<=0)return;this.trails.length=0;const i=new FormData;for(const t of e)i.append("files",t);(0,r.hd)("/trails/csvs",{method:"POST",body:i},t.target).then(t=>{if(this.trails=t.map(t=>new n.default(t)),this.trails.length<=0)throw new Error("empty result");this.$emit("file-uploaded",this.trails),this.$bus.emit("showToast",{result:!0})}).catch(t=>{this.$bus.emit("showToast",{result:!1,message:"["+t.status+"] "+t.message})}).finally(()=>{this.$refs.trailFilesInput.value=""})},uploadTrailL10ns(t){const e=this.$refs.trailL10nFilesInput.files;if(e.length<=0)return;this.trailL10ns.length=0;const i=new FormData;for(const t of e)i.append("files",t);(0,r.hd)("/trails/l10ns/csvs",{method:"POST",body:i},t.target).then(t=>{if(this.trailL10ns=t.map(t=>new l.A(t)),this.trailL10ns.length<=0)throw new Error("empty result");this.$emit("file-uploaded",this.trailL10ns),this.$bus.emit("showToast",{result:!0})}).catch(t=>{this.$bus.emit("showToast",{result:!1,message:"["+t.status+"] "+t.message})}).finally(()=>{this.$refs.trailL10nFilesInput.value=""})}}};i.d(e,["A",0,h]),a()}catch(t){a(t)}})},90349(t,e,i){i.a(t,async(t,a)=>{try{i.r(e);var s=i(39010),r=i(44719),n=i(1940),l=t([r]);r=(l.then?(await l)():l)[0];const o=(0,n.A)(r.A,[["render",s.X]]);i.d(e,["default",0,o]),a()}catch(t){a(t)}})},44719(t,e,i){i.a(t,async(t,a)=>{try{i.d(e,{A:()=>s.A});var s=i(23078),r=t([s]),n=r.then?(await r)():r;s=n[0],a()}catch(t){a(t)}})},39010(t,e,i){i.d(e,{X:()=>A});var a=i(49424);const s={class:"row"},r={class:"col-md"},n={class:"d-flex flex-column gap-3"},l={class:"input-group"},o={id:"trail-files-input",ref:"trailFilesInput",type:"file",title:"Files to upload",accept:".csv",multiple:"",class:"form-control"},c={key:0,id:"trail-accordion",class:"accordion"},h={class:"accordion-header"},u=["data-bs-target","aria-controls"],d=["id"],p={class:"accordion-body"},m={class:"col-md"},g={class:"d-flex flex-column gap-3"},k={class:"input-group"},f={id:"trail-l10ns",ref:"trailL10nFilesInput",type:"file",title:"Files to upload",accept:".csv",multiple:"",class:"form-control"},y={key:0,id:"trail-l10n-accordion",class:"accordion"},b={class:"accordion-header"},v=["data-bs-target","aria-controls"],w=["id"],L={class:"accordion-body"};function A(t,e,i,A,I,D){const T=(0,a.g2)("trail-editor");return(0,a.uX)(),(0,a.CE)("div",s,[(0,a.Lk)("div",r,[(0,a.Lk)("div",n,[(0,a.Lk)("div",null,[e[2]||(e[2]=(0,a.Lk)("label",{for:"trail-files-input",class:"form-label"},"Trails",-1)),(0,a.Lk)("div",l,[(0,a.Lk)("input",o,null,512),(0,a.Lk)("button",{class:"btn btn-success",type:"button",onClick:e[0]||(e[0]=(...t)=>D.uploadTrails&&D.uploadTrails(...t))}," ä¸å³ ")]),e[3]||(e[3]=(0,a.Lk)("div",{class:"form-text"},[(0,a.Lk)("ul",null,[(0,a.Lk)("li",null,[(0,a.Lk)("a",{href:"https://docs.google.com/spreadsheets/d/17XhDkaPPazxugF-hEKcxBclqN5iohC_7-CSwimb2uPk/edit?usp=sharing",target:"_blank",rel:"noopener"},"Trail Spreadsheet")]),(0,a.Lk)("li",null,"æ¯æ´ä¸æ¬¡ä¸å³å¤åæªæ¡")])],-1))]),I.trails.length>0?((0,a.uX)(),(0,a.CE)("div",c,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(I.trails,(t,e)=>((0,a.uX)(),(0,a.CE)("div",{key:e,class:"accordion-item"},[(0,a.Lk)("h2",h,[(0,a.Lk)("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":`#${D.trailAccordionItemID(t)}`,"aria-expanded":"false","aria-controls":`#${D.trailAccordionItemID(t)}`},(0,a.v_)(t.name),9,u)]),(0,a.Lk)("div",{id:D.trailAccordionItemID(t),class:"accordion-collapse collapse","data-bs-parent":"#trail-accordion"},[(0,a.Lk)("div",p,[(0,a.bF)(T,{trail:I.trails[e],"onUpdate:trail":t=>I.trails[e]=t},null,8,["trail","onUpdate:trail"])])],8,d)]))),128))])):(0,a.Q3)("v-if",!0)])]),(0,a.Lk)("div",m,[(0,a.Lk)("div",g,[(0,a.Lk)("div",null,[e[4]||(e[4]=(0,a.Lk)("label",{for:"trail-l10ns",class:"form-label"},"Trail L10ns",-1)),(0,a.Lk)("div",k,[(0,a.Lk)("input",f,null,512),(0,a.Lk)("button",{class:"btn btn-success",type:"button",onClick:e[1]||(e[1]=(...t)=>D.uploadTrailL10ns&&D.uploadTrailL10ns(...t))}," ä¸å³ ")]),e[5]||(e[5]=(0,a.Lk)("div",{class:"form-text"},[(0,a.Lk)("ul",null,[(0,a.Lk)("li",null,[(0,a.Lk)("a",{href:"https://docs.google.com/spreadsheets/d/17XhDkaPPazxugF-hEKcxBclqN5iohC_7-CSwimb2uPk/edit?usp=sharing",target:"_blank",rel:"noopener"},"Trail Spreadsheet")]),(0,a.Lk)("li",null,"æ¯æ´ä¸æ¬¡ä¸å³å¤åæªæ¡")])],-1))]),I.trailL10ns.length>0?((0,a.uX)(),(0,a.CE)("div",y,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(I.trailL10ns,(t,i)=>((0,a.uX)(),(0,a.CE)("div",{key:i,class:"accordion-item"},[(0,a.Lk)("h2",b,[(0,a.Lk)("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":`#${D.trailL10nAccordionItemID(t)}`,"aria-expanded":"false","aria-controls":`#${D.trailL10nAccordionItemID(t)}`},(0,a.v_)(`${t.trailID}: ${t.languageCode}`),9,v)]),(0,a.Lk)("div",{id:D.trailL10nAccordionItemID(t),class:"accordion-collapse collapse","data-bs-parent":"#trail-l10n-accordion"},[(0,a.Lk)("div",L,[(0,a.Lk)("dl",null,[e[6]||(e[6]=(0,a.Lk)("dt",null,"å稱",-1)),(0,a.Lk)("dd",null,(0,a.v_)(t.name),1),e[7]||(e[7]=(0,a.Lk)("dt",null,"æè¿°",-1)),(0,a.Lk)("dd",null,(0,a.v_)(t.description),1)])])],8,w)]))),128))])):(0,a.Q3)("v-if",!0)])])])}},69786(t,e,i){var a=i(41175),s=i(82001),r=TypeError,n=Object.getOwnPropertyDescriptor,l=a&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=l?function(t,e){if(s(t)&&!n(t,"length").writable)throw new r("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},12504(t){var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw new e("Maximum allowed index exceeded");return t}},99921(t,e,i){var a=i(11187),s=i(16674),r=i(95807),n=i(69786),l=i(12504);a({target:"Array",proto:!0,arity:1,forced:i(94892)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=s(this),i=r(e),a=arguments.length;l(i+a);for(var o=0;o<a;o++)e[i]=arguments[o],i++;return n(e,i),i}})},89542(t,e,i){var a=i(11187),s=i(65418),r=i(66927),n=i(84464),l=i(49060),o=i(95521),c=i(73666),h=i(4090),u=i(40909),d=i(47280),p=i(64400),m=!p&&!u("map",function(){}),g=!p&&!m&&d("map",TypeError),k=p||m||g,f=o(function(){var t=this.iterator,e=n(s(this.next,t));if(!(this.done=!!e.done))return c(t,this.mapper,[e.value,this.counter++],!0)});a({target:"Iterator",proto:!0,real:!0,forced:k},{map:function(t){n(this);try{r(t)}catch(t){h(this,"throw",t)}return g?s(g,this,t):new f(l(this),{mapper:t})}})},79945(t,e,i){i.d(e,{A:()=>r});const a=new Uint8Array(16);var s=i(87083);
1const r=function(t,e,i){return e||t||!crypto.randomUUID?function(t,e,i){t=t||{};const r=t.random??t.rng?.()??crypto.getRandomValues(a);if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){if((i=i||0)<0||i+16>e.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[i+t]=r[t];return e}return(0,s.k)(r)}(t,e,i):crypto.randomUUID()}},37681(t){t.exports=JSON.parse('{"en-US":{"translation":{"1":"One Day","2":"Two Days","3":"Three Days","open":"Open","closed":"Closed","partial":"Partially Open","caution":"Caution","0.5":"Half Day","3+":"3+ Days","days":"Day(s)"}},"zh-TW":{"translation":{"1":"1 æ¥","2":"2 æ¥","3":"3 æ¥","open":"å ¨ç·éæ¾","closed":"æ«åéæ¾","partial":"é¨åéæ¾","caution":"注æ","0.5":"忥","3+":"è¶ é 3 æ¥","days":"æ¥"}},"zh-HK":{"translation":{"1":"1 æ¥","2":"2 æ¥","3":"3 æ¥","open":"å ¨ç·éæ¾","closed":"æ«åéæ¾","partial":"é¨åéæ¾","caution":"注æ","0.5":"忥","3+":"è¶ é 3 æ¥","days":"æ¥"}},"zh-CN":{"translation":{"1":"1 æ¥","2":"2 æ¥","3":"3 æ¥","open":"å ¨çº¿å¼æ¾","closed":"æå弿¾","partial":"é¨å弿¾","caution":"注æ","0.5":"忥","3+":"è¶ è¿ 3 æ¥","days":"æ¥"}}}')}}]); 2//# sourceMappingURL=4658.df9c9c10d746ebb4683a.min.js.map
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.