<commit_before><style>
	.glyphicon-minus-sign {
		color: #bc2328;
		cursor: pointer;
	}
	.glyphicon-plus-sign {
		color: green;
		cursor: pointer;
	}
	#plan-include-groups-div {
		margin-top: 15px;
	}
	.clickable {
		cursor: pointer;
	}
	fieldset {
		padding: .35em .625em .75em;
		margin: 0 2px;
		border: 1px solid black;
	}
	legend {
		width:inherit; /* Or auto */
		padding:0 10px; /* To give a bit of padding on the left and right */
		border-bottom:none;
	}
	.cost {
		margin-right: -1px;
		margin-left: 0px
	}
</style>

<center>
	<h2 ng-if='action !== "duplicate"'>{{entity.name}}</h2>
	<h3>{{capitalize(action)}} Charging Plan</h3>
</center>
<div>
	<form class='form-inline' ng-submit='savePlan()'>
		<div ng-if='!advancedMode'>
			<div class='row' ng-if='action === "duplicate"'>
				<div class='col-md-2'>
					Name
				</div>
				<div class='col-md-6'>
					<input type='text' ng-model='entity.name' class='form-control'/>
				</div>
			</div>

			<div class='row'>
				<div class='col-md-2'>
					Description
				</div>
				<div class='col-md-6'>
					<input ng-model='entity.desc' type='text' class='form-control' />
				</div>
			</div>
			<div class='row'>
				<div class='col-md-2'>
					Service Provider
				</div>
				<div class='col-md-6'>
					<input ng-model='entity.service_provider' type='text' class='form-control' />
				</div>
			</div>
			<div class='row'>
				<div class="col-md-2">
					PP Includes Name
				</div>
				<div class="col-md-6">
					<input ng-model='entity.pp_includes_name' type='text' class='form-control' />
				</div>
			</div>
			<div class='row'>
				<div class="col-md-2">
					PP Includes External ID
				</div>
				<div class="col-md-6">
					<input ng-model='entity.pp_includes_external_id' type='text' class='form-control' />
				</div>
			</div>
			<h5>Period</h5>
			<ul>
				<div class='row'>
					<div class='col-md-2'>
						Unit:
					</div>
					<div class='col-md-6'>
						<input type="text" ng-model='entity.period.unit' class='form-control' />
					</div>
				</div>
				<div class='row'>
					<div class='col-md-2'>
						Duration:
					</div>
					<div class='col-md-6'>
						<input ng-model='entity.period.duration' type='number' class='form-control' />
					</div>
				</div>
			</ul>

			<hr/>
			<h3>Include</h3>
			<div class="row" ng-if='!isObject(entity.include.cost)'>
				<div class="col-md-2">
					Cost:
				</div>
				<div class="col-md-6">
					<input ng-model="entity.include.cost" type="text" class="form-control" />
				</div>
			</div>
			<div class="row cost" ng-repeat='cost in entity.include.cost track by $index' ng-if='isObject(entity.include.cost)'>
				<fieldset>
					<legend>Cost:</legend>
					<div class='row'>
						<div class='col-md-2'>
							Value
						</div>
						<div class="col-md-6">
							<input ng-model='cost.value' type='number' class='form-control' />
						</div>
					</div>
					<div class='row'>
						<div class='col-md-2'>
							Name
						</div>
						<div class="col-md-6">
							<input ng-model='cost.pp_includes_name' type='text' class='form-control' />
						</div>
					</div>
					<div class='row'>
						<div class='col-md-2'>
							External Id
						</div>
						<div class="col-md-6">
							<input ng-model='cost.pp_includes_external_id' type='text' class='form-control' />
						</div>
					</div>
				</fieldset>
			</div>			
			<div ng-repeat="(includeTypeName, includeType) in entity.include" ng-if='includeTypeName !== "cost"'>
				<div ng-if="isObject(includeType)">
					<fieldset>
						<legend>{{includeTypeName}}</legend>
						<div class="row">
							<div class="col-md-2">
								Cost:
							</div>
							<div class="col-md-6">
								<input ng-model="includeType.cost" type="text" class="form-control" />
							</div>
						</div>
						<div class="row">
							<div class="col-md-2">
								Usagev:
							</div>
							<div class="col-md-6">
								<input ng-model='includeType.usagev' type='number' class='form-control' />
							</div>
						</div>
						<div class='row'>
							<div class="col-md-2">
								Name:<commit_msg>fix charging plan edit after structure change<commit_after><style>
	.glyphicon-minus-sign {
		color: #bc2328;
		cursor: pointer;
	}
	.glyphicon-plus-sign {
		color: green;
		cursor: pointer;
	}
	#plan-include-groups-div {
		margin-top: 15px;
	}
	.clickable {
		cursor: pointer;
	}
	fieldset {
		padding: .35em .625em .75em;
		margin: 0 2px;
		border: 1px solid black;
	}
	legend {
		width:inherit; /* Or auto */
		padding:0 10px; /* To give a bit of padding on the left and right */
		border-bottom:none;
	}
	.cost {
		margin-right: -1px;
		margin-left: 0px
	}
</style>

<center>
	<h2 ng-if='action !== "duplicate"'>{{entity.name}}</h2>
	<h3>{{capitalize(action)}} Charging Plan</h3>
</center>
<div>
	<form class='form-inline' ng-submit='savePlan()'>
		<div ng-if='!advancedMode'>
			<div class='row' ng-if='action === "duplicate"'>
				<div class='col-md-2'>
					Name
				</div>
				<div class='col-md-6'>
					<input type='text' ng-model='entity.name' class='form-control'/>
				</div>
			</div>

			<div class='row'>
				<div class='col-md-2'>
					Description
				</div>
				<div class='col-md-6'>
					<input ng-model='entity.desc' type='text' class='form-control' />
				</div>
			</div>
			<div class='row'>
				<div class='col-md-2'>
					Service Provider
				</div>
				<div class='col-md-6'>
					<input ng-model='entity.service_provider' type='text' class='form-control' />
				</div>
			</div>
			<hr/>
			<h3>Include</h3>
			<div class="row" ng-if='!isObject(entity.include.cost) && entity.include.cost'>
				<div class="col-md-2">
					Cost:
				</div>
				<div class="col-md-6">
					<input ng-model="entity.include.cost" type="text" class="form-control" />
				</div>
			</div>
			<div class="row cost" ng-repeat='cost in entity.include.cost track by $index' ng-if='isObject(entity.include.cost)'>
				<fieldset>
					<legend>Cost</legend>
					<div class='row'>
						<div class='col-md-2'>
							Value
						</div>
						<div class="col-md-6">
							<input ng-model='cost.value' type='number' class='form-control' />
						</div>
					</div>
					<div class='row'>
						<div class='col-md-2'>
							Name
						</div>
						<div class="col-md-6">
							<input ng-model='cost.pp_includes_name' type='text' class='form-control' />
						</div>
					</div>
					<div class='row'>
						<div class='col-md-2'>
							External Id
						</div>
						<div class="col-md-6">
							<input ng-model='cost.pp_includes_external_id' type='text' class='form-control' />
						</div>
					</div>
					
					<h5>Period</h5>
					<ul>
						<div class='row'>
							<div class='col-md-2'>
								Unit:
							</div>
							<div class='col-md-6'>
								<input ng-model='cost.period.unit' class='form-control' type="text" />
							</div>
						</div>
						<div class='row'>
							<div class='col-md-2'>
								Duration:
							</div>
							<div class='col-md-6'>
								<input ng-model='cost.period.duration' type='text' class='form-control' ng-if='!isNumber(entity.include.cost)'/>
								<input ng-model='cost.period.duration' type='number' class='form-control' ng-if='isNumber(entity.include.cost)'/>
							</div>
						</div>
					</ul>

					
				</fieldset>
			</div>			
			<div ng-repeat="(includeTypeName, includeType) in entity.include" ng-if='includeTypeName !== "cost"'>
				<div ng-if="isObject(includeType)">
					<fieldset>
						<legend>{{includeTypeName}}</legend>
						<div class="row">
							<div class="col-md-2">
								Cost:
							</div>
							<div class="col-md-6">
								<input ng-model="includeType.cost" type="text" class="form-control" />
							</div>
						</div>
						<div class="row">
							<div class="col-md-2">
								Usagev:
							</div>
							<div class="col-md-6">
								<input ng-model='includeType.usagev' type='number' class='form-control' />
							</div>
						</div>
						<div class='row'>
							<div class="col-md-2">
								Name:
{'fraction_non_alphanumeric': 0.19944944944944945, 'fraction_numerical': 0.013513513513513514, 'mean_word_length': 2.433419243986254, 'pattern_counts': {'":': 0, '<': 234, '<?xml version=': 0, '>': 234, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '913473', 'n_tokens_mistral': 3996, 'n_tokens_neox': 2930, 'n_words': 567}